No output after load program
Posted: Wed Feb 29, 2012 11:07 pm
I using PIC18F4550 with the sk40c. The program can be load but the PIC doesn't seen got any function.
Even i using a simple led turn on coding.
Any idea for my problems?
Hereby is my coding.
Even i using a simple led turn on coding.
Any idea for my problems?
Hereby is my coding.
- CODE: SELECT_ALL_CODE
#include <18F4550.h>
#fuses XT,NOWDT,NOLVP,NOPROTECT
#use delay (clock=20M)
#define LED1 PIN_B6
#define LED2 PIN_B7
#define SW1 PIN_B0
#define SW2 PIN_B1
void main()
{
set_tris_b(0x3F);
output_b(0x3F);
while(TRUE)
{
if (!input(SW1))
{
output_high(LED1);
output_low(LED2);
}
else if (!input(SW2))
{
output_high(LED2);
output_low(LED1);
}
else
{
}
}
}