I have programmed a pic to flash one Led from the book by Chuck. I have used copy and paste so it must be ok. I have programmed the chip having set the fuses to __CONFIG _CP_OFF & _WDT_off & _BODEN_ON &_PWRTE_ON & _HS_OSC & _LVP_OFF &_DEBUG_OFF
I have built the circuit which is perfect but when it is switched on the led lights and stays on. I have changed the 4mhz resonator but it made no diference it still stays on. I have grounded both the legs of 4mhz with 68p capacitors I presume this is correct. This is what I have programmed in. I cant see where I could have gone wrong. Thanks to anybody who can help.


symbol LED = 0 'Rename pin 0 of portb (PIC 16F876 pin 21) to LED

TRISB = %11111110 'Setup port b as RB7-RB1 inputs, RB0 as output
main: 'Label for beginning of main loop
High LED 'Set pin 0 of portb high (5 volts) which turns the LED on
pause 1000 'Pause 1000 milliseconds (1 second) with LED on
Low LED 'Set pin 0 of portb low (0 volts) which turns the LED off
pause 1000 'Pause for 1 second with LED off
goto main 'Jump to the main label and do it all again and again

END 'This line is not needed but its safe to put it here just in case
' the program gets lost.


Thanks Ged.