1. 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.
    Dismiss Notice

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

Discussion in 'Microcontrollers' started by be80be, Aug 13, 2017.

  1. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,803
    Likes:
    135
    Location:
    morristown,tn
    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.
     
  2. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,803
    Likes:
    135
    Location:
    morristown,tn
    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 (text):

    #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 (text):

    #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
     
  3. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,163
    Likes:
    909
    Location:
    Rochdale UK
    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..
     
    • Agree Agree x 1
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,803
    Likes:
    135
    Location:
    morristown,tn

    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.
     
  6. granddad

    granddad Active Member

    Joined:
    Jan 18, 2015
    Messages:
    750
    Likes:
    75
    Location:
    Worcestershire UK
    ONLINE
    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: Sep 4, 2017
    • Like Like x 1
  7. jpanhalt

    jpanhalt Well-Known Member Most Helpful Member

    Joined:
    Jun 21, 2006
    Messages:
    5,896
    Likes:
    502
    Location:
    Cleveland, OH, USA
    ONLINE
    Maybe Microchip figured it was cheaper to buy Atmel than fix MPLabX. ;)
     
    • Like Like x 1
  8. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,803
    Likes:
    135
    Location:
    morristown,tn
    Mplab X runs way better on liunx then windows
     
  9. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    And atmel studio is really Microsoft's visual studio. Which I am using with the ESP8266
     

Share This Page