• AVR Freaks

Hot!How can I use functions from PLIB in the online Xpress IDE

Author
oliverb
Super Member
  • Total Posts : 163
  • Reward points : 0
  • Joined: 2009/02/16 13:12:38
  • Location: 0
  • Status: offline
2018/06/24 03:31:10 (permalink)
0

How can I use functions from PLIB in the online Xpress IDE

Changed the title to clarify, I know PLIB works with locally installed MPLAB X and older XC8 versions I should have made that clearer
 
Specifically I'd like to use some I2C master functions on a PIC18F4520. Using regular MPLAB X I can import the header and instruct the linker to link the peripheral library. Edit: but the online compiler does not have that linker option as far as I'm aware.
 
As I understand it MCC doesn't support that PIC.
 
I'm not a fan of the peripheral library, generally I prefer the Mikroelektronika library functions but they are not portable. I've considered writing my own but the entry and exit conditions for peripheral functions are often unclear.
 
post edited by oliverb - 2019/06/06 11:29:36
#1

2 Replies Related Threads

    katela
    Super Member
    • Total Posts : 1248
    • Reward points : 0
    • Joined: 2013/06/11 05:25:18
    • Location: South Africa
    • Status: offline
    Re: How can I use functions from PLIB 2018/06/24 11:10:28 (permalink)
    0
    You can still use the PLIB. You should be able to access them form XC8 v1.34 or earlier which can still be downloaded from microchip website. And if you are using the latest XC8 compiler, you can download them separately from the same XC8 compiler download page (now called legacy peripheral libraries) and install them manually into your compiler.
    There is a PIC18F Peripheral library help document (MPLAB_XC8_Peripheral_Libraries.pdf) found inside the compiler installation directory under the docs folder.
    Use this document to learn how to use the PLIB functions.
    Start by searching your PIC, then "CLICK HERE for peripheral library support for this device", then I2C. 

    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
    #2
    oliverb
    Super Member
    • Total Posts : 163
    • Reward points : 0
    • Joined: 2009/02/16 13:12:38
    • Location: 0
    • Status: offline
    Re: How can I use functions from PLIB 2018/07/01 11:26:39 (permalink)
    0
    I've just edited the title to clarify that I'd like to use the libraries in Xpress, but the compiler options in Xpress don't appear to include PLIB support. With X obviously you can choose how/where the compiler is installed, but with Xpress it is pre-installed so the installation choices are baked in.
     
    If I look at the project options in Xpress there is no linker option to link the PLIB either.
     
    I've had some success importing the required source and header files from PLIB into the project. It is dirty, but it works. Incidentally I'm getting some "interesting" warnings compiling it.
     
    Alternatively if the answer is "you shouldn't be still using PLIB, use "this thing" instead then I'm open to suggestions, but right now I'm limited to parts that are supported by the 5V MikroICD programmer and that pretty much rules out MCC.
    post edited by oliverb - 2018/07/01 12:15:46
    #3
    Jump to:
    © 2019 APG vNext Commercial Version 4.5