Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

I'm glad I'm not crazy LOL the joy of MPlab X

Status
Not open for further replies.

be80be

Well-Known Member
You can't have the new 4.00 with your older 3.xx Mplab x it messes them up But on a side note I figured out how to get UART 1 output working in Mplab x so it's all good
and Mplab X like linux I think better then windows.
 
Figured I share this with you I'm sure not all of us no we can output serial using debug in MPlab x
Needed code to make it work
Code:
#include <pic18f1220.h>  // make this the chip your using and look at the rest to see if the bits are right

void putch(unsigned char data) {
    while(TXSTA1bits.TRMT == 0)          // wait until the transmitter is ready
        continue;
    TXREG1 = data;                     // send one character
}
void init_uart(void) {
    TXSTA1bits.TXEN = 1;               // enable transmitter
    RCSTA1bits.SPEN = 1;               // enable serial port
}
Open this window and set to use UART1 io option
Screenshot from 2017-08-14 01-47-40.png

use code like this to spit it out
Code:
#include <xc.h>
#include <stdio.h>



// Application begins here
void main(void) {
    init_uart();
        
 int i;

for (i = 0; i < 5; i++)
{
        printf("Loop iteration %d\n", i);
}
}
And have fun
Screenshot from 2017-08-14 01-46-04.png
 
My biggest problem ( when trying to help ) is I hate MPLABX... Its awful!! I can still do everything in MPLAB V8.xx so I never use it... The multi project thing never works good.. You almost always need to have only one project at a time..

You can't port the project.. ie.. send me the code.. The project is fixed to your directory structure... I can never build a project posted without creating the whole thing from scratch..
 
Maybe microchip should forget Mplab x LOL atmel studio works great bet it be no big deal to add xc8 to it lol.
on a fip note mplab x 4.00 can use avr now.
 
Hi be80be
I had been looking at installing MPLABX 4 on my win 7 PC, since its release, but as the 3.50 version I use was stable ( most of the time ) tried 3.6x :( .. so I held off . Last week I was given an old Compaq Presario PC and asked to recover some pictures for a relative , just a 1000 or so ! , " do what you want with the box " She said... Did I need another box ?:meh: This was not a fast beast from 2009 ... Pentiun 4 28ooMhz 200gig HD 512Mb , XP home , I had some old 1Gig DDR memory, so upgraded that, took out the Modem ! and second HD..and loaded Linux Mint 18.2 ... Hey I was expecting loads of command line typing , but not a lot.... then installed MPLABX 4 ... and XC16 and tested with Pickit3 ( clone ) did not want to risk a genuine ... and really impressed... looks good and responsive. OK Not installed anything else yet but felt like a modern geek :cool:... Never considered Linux as an win alternative I did UNIX ... sorry unix back in the 1980's so some similarities there , and all for free ! .... hope to get my new/yery.old box www connected and try out the pre-installed FireFox and thunderbird mail . so far MPLABX 4 and Linux mint 18.2 10/10 ...

Why aren't there any unix viruses ? unix is a virus....
 
Last edited:
Maybe microchip should forget Mplab x LOL atmel studio works great bet it be no big deal to add xc8 to it lol.
on a fip note mplab x 4.00 can use avr now.

Maybe Microchip figured it was cheaper to buy Atmel than fix MPLabX. ;)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top