Re: dsPIC33 programming
2018/12/13 14:18:27
(permalink)
Hello,
My advice is to setup your toolchain first
IDE: MPLAB X
Compiler: XC16
Second, read the appropriate documentation :
MCU Datasheet
Family reference manual Sections: Oscillator, CPU, Interrupts, IO Ports
XC16 compiler doc.
Third: Code (assuming you have a previous knowledge of C programming.
your code will be something like the following:
#include <xc16.h>
void main(){
// Initialize fuses
//Initialize oscillator
//Assign PPS is applicable
//Set digital PINS with ANSEL registers
//Configure input or output pins with TRIS registers
while(1){
// Read or write the appropriate pins
// Perform more awesome tasks
}
}
Good luck