PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon Jun 13, 2005 11:37 am |
|
|
When you move to a new PIC, don't start with a complicated program.
Start with a simple program that just blinks a LED, or displays "Hello
World". Get that program running OK. Then try your big program.
Example:
Code: | #include <18F452.h>
#fuses XT, NOWDT,NOPROTECT, PUT, BROWNOUT, NOLVP
#use delay(clock = 4000000)
//========================================
void main()
{
while(1)
{
output_high(PIN_B0);
delay_ms(500);
output_low(PIN_B0);
delay_ms(500);
}
} |
|
|