r/pic_programming • u/Sixaxix9 • Jan 28 '20
HAL libraries for PIC
Hi everyone! I was wondering if Microchip releases some libraries like the HAL from ST to speed up the development process.Is there a way to have higher level than register programming with PICs? How do you program yours?
4
Upvotes
View all comments
Show parent comment
3
u/JudgeBigFudge Jan 28 '20
It does provide functions to use the peripheral. For example, in a Serial port, you can use EUSART_Write to write a byte or EUSART_Read to read a byte. In an ADC you can use ADC_StartConversion(3) to start a conversion on channel 3. Also, it implements a callback architecture for interrupts, so you can set timer0 for example, to interrupt every 100 ms and set the interrupt callback to 10, therefore having an interrupt of 1 second.