Sorry another new user with very basic questions... I have the PIC18F4550 with the PICDEM FSUSB Demo Board. I'm trying to load a blinking light function below using the FSUSB Demo Tool in bootload mode. It successfully erases & programs flash but when I hit the execute button I get a WARNING - Failed to RESET board message and D1 & D2 LEDs are alternately flashing as they did with the FW that came installed on the card. I've tried reseting with the S1, S2 and even S3 buttons on the board but it doesn't change anything. Any suggestions other than give up will be appreciated 
//
#include <p18cxxx.h> // Device specific header file
// Function Prototypes
//--------------------
void delay1(void);
// Main Code
//--------------------
void main(void)
{
// The D4 LED is driven by PORTD, bit3
LATD &= 0xF0;
TRISD &= 0xF0;
PORTD &= 0xF0;
// Loop forever to blink LED on/off
while (1)
{
PORTDbits.RD3 = 1; // Turn LED on
delay1();
PORTDbits.RD3 = 0; // Turn LED off
delay1();
}
} // end main()
//-------------------------
void delay1(void)
{
long int loop1 = 0;
for (loop1=0; loop1 <=30000; loop1++)
{
}
}
//
#include <p18cxxx.h> // Device specific header file
// Function Prototypes
//--------------------
void delay1(void);
// Main Code
//--------------------
void main(void)
{
// The D4 LED is driven by PORTD, bit3
LATD &= 0xF0;
TRISD &= 0xF0;
PORTD &= 0xF0;
// Loop forever to blink LED on/off
while (1)
{
PORTDbits.RD3 = 1; // Turn LED on
delay1();
PORTDbits.RD3 = 0; // Turn LED off
delay1();
}
} // end main()
//-------------------------
void delay1(void)
{
long int loop1 = 0;
for (loop1=0; loop1 <=30000; loop1++)
{
}
}
Last edited: