PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Mar 09, 2007 5:31 pm |
|
|
1. You have two oscillator types in your #fuses statement: HS and INTRC
You should only have one.
2.You don't have a while() loop at the end of your program. Because of
this, the program will fall off the end of main() and execute the hidden
SLEEP instruction that CCS puts there, the PIC will go to sleep.
Try this program instead. It will blink an LED on pin B0.
Code: | #include <16F88.H>
#fuses INTRC_IO, NOWDT, BROWNOUT, PUT, NOLVP
#use delay(clock=8000000)
void main()
{
while(1)
{
output_high(PIN_B0);
delay_ms(500);
output_low(PIN_B0);
delay_ms(500);
}
} |
|
|