Electronic – Does any MPLAB compiler e.g XC8 have built in functions to control PIC peripherals like in CCS PIC C

mplabxpicpic-ccsxc8

The CCS compiler provides a lot of built-in functions to access and use the PIC microcontroller's peripherals. This makes it very easy for the users to configure and use the peripherals without going into in depth details of the registers associated with the functionality.

Examples:

D/A conversion: dac_write(), setup_dac()

RTOS: rtos_await(), rtos_msg_send(), rtos_run(), rtos_disable(), rtos_overrun() e.t.c

Non-volatile memory: erase_eeprom(), read_external_memory(), write_eeprom( ) e.t.c

Timers: get_timer_x(), set_timerx(), setup_timer_0() e.t.c

Is it possible to somehow get the same functionality in the MPLABX IDE as well or shall I have to write my own library functions like the ones shown above by writing code that tampers with registers at low level? I am using the XC8 compiler.

The CCS C Compiler having these type of functions is the main reason why I have used it in the past. But now I want to move over to MPLAB.

Best Answer

You should find documentation for Microchip's XC8 Peripheral Library in the 'docs' folder where you've got the XC8 compiler installed.
On my PC its at C:\Program Files (x86)\Microchip\xc8\v1.21\docs
The file you're looking for is MPLAB_XC8_Peripheral_Libraries.pdf

I don't particularly like the documentation or their automated Doc-O-Matic system which produces it since it doesn't feel particularly user-friendly to me, but YMMV ...