I am working on an embedded platform written in C for the PIC16F1503 chip. Whilst I'm an experienced programmer, I need some help with specific PIC principles. Specifically, I'm looking for a sample program to:
1) Configure and write PWM to all four pins
2) Configure input and output pins
3) Set the chip at various frequencies (250kHz, 500kHz, etc)
4) Read and write data to persistent PGM flash *key deliverable*
5) Provide clean, commented functions for the above that I can use as a reference
Based on the results of this project, additional work may follow.
The data sheet is here:
[login to view URL]
I'm using MPLAB X and the XC8 compiler.
Extra detail as requested:
1) I expect both ports to be outputs, with PWM-enabled pins being PWM and the rest digital outputs except one
2) I expect one pin to be digital input
3) I will provide the layout of my test circuit, and can test different pins as requested