• AVR Freaks

Hot!HOW TO START MPLAB

Author
Jebastian
PIC-LEARN
  • Total Posts : 6
  • Reward points : 0
  • Joined: 2019/04/07 05:17:24
  • Location: 0
  • Status: offline
2019/05/08 05:44:02 (permalink)
0

HOW TO START MPLAB

Hi....Here i write an requeste regarding that how to use MCC and their Libraries .I am going to do project using these two core series PIC 16f and 18F series .So help me what are all the things i need to installed, MCC and Libraries etc.I am doing my first project using LCD Interface.Which is error accured by MCC File generating Etc..So help me to statr my project guys i am stuck in 4 weeks because of this errors. I am using MPLAB X IDE v5.15.
#1

10 Replies Related Threads

    du00000001
    Just Some Member
    • Total Posts : 2891
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: online
    Re: HOW TO START MPLAB 2019/05/08 08:45:55 (permalink)
    4 (1)
    Continue with providing as many details as possible about your issue(s) - including the exact designation of your chip, MCC version, compiler version, host OS etc.

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #2
    katela
    Super Member
    • Total Posts : 1329
    • Reward points : 0
    • Joined: 2013/06/11 05:25:18
    • Location: South Africa
    • Status: online
    Re: HOW TO START MPLAB 2019/05/08 08:52:54 (permalink)
    2 (1)
    Which PIC you are using? which error you are getting? Can you write the full error message? What versions of the software you are using?

    Free online Microcontroller Tutorials and Projects for Hobbyists and students. From beginners to advanced. Website: www.studentcompanion.co.za
    YouTube Tutorials: https://www.youtube.com/StudentCompanionSA
    #3
    Jebastian
    PIC-LEARN
    • Total Posts : 6
    • Reward points : 0
    • Joined: 2019/04/07 05:17:24
    • Location: 0
    • Status: offline
    Re: HOW TO START MPLAB 2019/05/09 09:20:29 (permalink)
    0
     Hi,,,
       I am using MPLAB (v5.15) and the compiler XC8 (v2.05). And using Pic18f2620 device.In my Project Header file am add LCD.H file and also add LCD.C on Source file still precense so many errors.
     
    1. newmain.c:23:5: warning: implicit declaration of function 'putrsXLCD' is invalid in C99 [-Wimplicit-function-declaration]putrsXLCD("JEBASTIAN");  //Display JEBASTIAN//
    2. newmain.c:24:5: warning: implicit declaration of function 'setDDRamAddr' is invalid in C99 [-Wimplicit-function-declaration]setDDRamAddr(0x40);      //Move cursor second line //
     
        3.newmain.c:35:1: warning: implicit declaration of function 'OpenXLCD' is invalid in C99 [-Wimplicit-function-declaration]OpenXLCD (FOUR BIT & LINES_5*4); //Configure 4 bit DATA interface mode//
    newmain.c:35:11: error: use of undeclared identifier 'FOUR'
    OpenXLCD (FOUR BIT & LINES_5*4); //Configure 4 bit DATA interface mode//
    ^
     
    #4
    du00000001
    Just Some Member
    • Total Posts : 2891
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: online
    Re: HOW TO START MPLAB 2019/05/09 09:25:33 (permalink)
    0
    And which files does your newmain.c (or however it's name is) include ?

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #5
    Jebastian
    PIC-LEARN
    • Total Posts : 6
    • Reward points : 0
    • Joined: 2019/04/07 05:17:24
    • Location: 0
    • Status: offline
    Re: HOW TO START MPLAB 2019/05/09 11:57:13 (permalink)
    0
    which is main.c file in source tree.
    post edited by Jebastian - 2019/05/09 11:59:15
    #6
    qhb
    Superb Member
    • Total Posts : 9998
    • Reward points : 0
    • Joined: 2016/06/05 14:55:32
    • Location: One step ahead...
    • Status: offline
    Re: HOW TO START MPLAB 2019/05/09 13:42:18 (permalink)
    0
    onlinesbi.26
    which is main.c file in source tree.

    I don't understand what you are asking.
    The error message you showed indicates that your main C file is named "newmain.c"
    In general, your "main" C file is the one that contains a function named "main".
     
    The question from du00000001 is still relevant.
    Does your "newmain.c" file have a #include for "lcd.h" ?
    If you want to call LCD functions from it, then it must.
     
    Also, I suspect you are using files intended for older versions of XC8. You are using XC8 v2.xx in "C99 mode", which will probably be incompatible with these old files. You might have more success switching XC8 to "C90" mode in the project properties.
    Have a read of https://microchipdevelope..m/xc8:moving-to-xc8-2-0
     
    post edited by qhb - 2019/05/09 13:43:27

    Nearly there...
    #7
    Jebastian
    PIC-LEARN
    • Total Posts : 6
    • Reward points : 0
    • Joined: 2019/04/07 05:17:24
    • Location: 0
    • Status: offline
    Re: HOW TO START MPLAB 2019/05/09 19:45:05 (permalink)
    0
    As you said,am added the LCD.c and LCD.h files.In the LCD.c files all the code were shown errors.Iam using XC8 V2.05.
     
    shall i move from xc8(v2.05) to xc8(v2.0)?
     
    While i open MCC tool error msg shown like this below.
    WARNING: The project's device is not supported by the currently loaded libraries. All library versions are available 
    post edited by Jebastian - 2019/05/09 19:50:26
    #8
    qhb
    Superb Member
    • Total Posts : 9998
    • Reward points : 0
    • Joined: 2016/06/05 14:55:32
    • Location: One step ahead...
    • Status: offline
    Re: HOW TO START MPLAB 2019/05/09 20:20:50 (permalink)
    4 (1)
    onlinesbi.26
    As you said,am added the LCD.c and LCD.h files.In the LCD.c files all the code were shown errors.Iam using XC8 V2.05.

    That is not what I said.
    lcd.c needs to be added to your project, and any C file that calls LCD functions needs to #include lcd.h.
     

    shall i move from xc8(v2.05) to xc8(v2.0)?

    No. That would not make any difference. The page I linked to explains how to switch XC8 between C99 andC90 mode.
     

    While i open MCC tool error msg shown like this below.
    WARNING: The project's device is not supported by the currently loaded libraries. All library versions are available

    It sounds like MCC doesn't support that old PIC.
    Where did your lcd.c and lcd.h files come from?
    Were they produced by MCC, or did you find them somewhere else?
     

    Nearly there...
    #9
    cobusve
    Super Member
    • Total Posts : 493
    • Reward points : 0
    • Joined: 2012/04/02 16:15:40
    • Location: Chandler
    • Status: offline
    Re: HOW TO START MPLAB 2019/05/09 22:55:55 (permalink)
    4 (1)
    There are some projects for getting people started posted at Microforum.
    I would recommend you start with this series :
    https://www.microforum.cc/blogs/entry/30-getting-started-with-embedded-software/
     
    Work your way thought blinking an LED 
    https://www.microforum.cc/blogs/entry/32-getting-started-with-embedded-software-pt-2/

    And if you want to udnerstand including headers into C files you can read this more advanced article
    https://www.microforum.cc/blogs/entry/37-about-translation-units-and-how-c-code-is-compiled/
     

    Also take a look at https://www.microforum.cc/ - a great resource for information on PIC and AVR microcontrollers and embedded programming in general. You can also post questions to the experts there.
    #10
    Tim Cruise
    Junior Member
    • Total Posts : 94
    • Reward points : 0
    • Status: offline
    Re: HOW TO START MPLAB 2019/05/24 01:09:18 (permalink)
    0
    Click "New Project" from the menu of MPLAB X IDE.  Enter the project name.  Choose your target MCU.  Then, MPLAB will guide you through.
     
    I am new and I can still understand it quite well.   Smile
    #11
    Jump to:
    © 2019 APG vNext Commercial Version 4.5