Quote Originally Posted by hoops2006 View Post
To try and fault find i have stuck leds on my outputs porta 0 1 2. And wrote a program to light them one at a time with a 1sec delay. Even this doesnt work. One of the leds doesnt light one stays on at half brightness and the other led does what it should. Can anyone see why this program isnt working.

@ DEVICE pic16F628A, INTRC_OSC_NOCLKOUT
@ DEVICE pic16F628A, WDT_ON
@ DEVICE pic16F628A, PWRT_ON
@ DEVICE pic16F628A, MCLR_OFF
@ DEVICE pic16F628A, BOD_ON
@ DEVICE pic16F628A, LVP_OFF
@ DEVICE pic16F628A, CPD_ON
@ DEVICE pic16F628A, PROTECT_ON
DEFINE OSC 4
cmcon=7:TRISB=0:TRISA= 0
main:
PORTA.0 = 1 : Pause 1000 : PORTA.0 = 0 : PORTA.1 = 1 : Pause 1000
PORTA.1 = 0 : PORTA.2 = 1 : Pause 1000 : PORTA.2 = 0 : GoTo main
End
Got a pullup on MCLR? (i know you've got mclr_off)
Try an external oscillator and switch your clock modes.
Turn off your watchdog timer.
Just ideas...