~~~
include <stdio.h>
include <stdlib.h>
include <p33Fxxxx.h>
include <libpic30.h>
int FBS
attribute((space(prog), address(0xF80000))) = 0xFFFF ;
//
FBS(
// BWRPWRPROTECT
OFF & // Boot Segment Write Protect (Boot Segment may be written)
// BSSNO
FLASH // Boot Segment Program Flash Code Protection (No Boot program Flash segment)
//);
int FGS attribute((space(prog), address(0xF80004))) = 0xFFFF ;
//FGS(
// GWRP
OFF & // General Code Segment Write Protect (General Segment may be written)
// GSSOFF // General Segment Code Protection (User program memory is not code-protected)
//);
int FOSCSEL
attribute((space(prog), address(0xF80006))) = 0xFFFF ;
//
FOSCSEL(
// FNOSCFRCDIVN & // Oscillator Source Selection (Internal Fast RC (FRC) oscillator with postscaler)
// IESO
ON // Internal External Switch Over Mode (Start up device with FRC, then automatically switch to user-selected oscillator source)
//);
int FOSC attribute((space(prog), address(0xF80008))) = 0xFFFF ;
//FOSC(
// POSCMD
NONE & // Primary Oscillator Source (Primary oscillator disabled)
// OSCIOFNCOFF & // OSC2 Pin Function (OSC2 is clock output)
// IOL1WAY
ON & // Peripheral Pin Select Configuration (Allow only one reconfiguration)
// FCKSMCSDCMD // Clock Switching and Monitor (Clock switching and Fail-Safe Clock Monitor are disabled, Mon Disabled)
//);
int FWDT
attribute((space(prog), address(0xF8000A))) = 0xFFFF ;
//
FWDT(
// WDTPOSTPS32768 & // Watchdog Timer Postscaler (1:32,768)
// WDTPRE
PR128 & // WDT Prescaler (1:128)
// WINDISOFF & // Watchdog Timer Window (Watchdog Timer in Non-Window mode)
// FWDTEN
ON // Watchdog Timer Enable (Watchdog timer always enabled)
//);
int FPOR attribute((space(prog), address(0xF8000C))) = 0xFFFF ;
//FPOR(
// FPWRT
PWR128 // POR Timer Value (128ms)
//);
int FICD attribute((space(prog), address(0xF8000E))) = 0xFFDF ;
//FICD(
// ICS
PGD1 & // Comm Channel Select (Communicate on PGC1/EMUC1 and PGD1/EMUD1)
// JTAGENOFF // JTAG Port Enable (JTAG is disabled)
//);
/*
*
*/
static void vCheckTask( void *pvParameters );
int main(void) {
TRISA = 0x0000;
TRISB = 0x0000;
LATA = 0x0000;
LATB = 0x0000;
xTaskCreate( vCheckTask, “Check”, 105 * 2, NULL, 3, NULL );
/* Start the task that will control the LCD. This returns the handle
to the queue used to write text out to the task. */
/* Finally start the scheduler. */
vTaskStartScheduler();
}
static void vCheckTask( void *pvParameters )
{
while(1) {
LATA = 0xFFFF;
LATB = 0xFFFF;
}
}
~~~
Ive been working on this for 2 days now. Im usingf ree RTOS because its need for our project. I dont have any background on RTOS. Ive succesfuly build the program and uploaded it to the controller but the LEDs does not turn on. I badly need your help