I have just started to pre-program with the dsPIC33CK64MP102 and I want to turn on an LED that I have on the RA0 pin.
I have used mplabX's mmc to configure the pins and clock.
I have only activated the GPIO output of the RA0 and selected the Primary Oscillator at 8000KHz.
my code is the following:
#include "mcc_generated_files/system.h"
#include "mcc_generated_files/pin_manager.h"
int main(void)
{
SYSTEM_Initialize();
while (1)
{
LED_Toggle();
}
return 1;
}
From what I have seen in the pin_manager.h file with LED_Toggle (); I should be able to turn on the led.
In principle when I debug with the PICKIT3 I don't have any errors.
Do I need to call any other instruction to be able to turn on the LED?
The clock configuration is correct?