Lucky guy, i feel generous today 
Code:
asm
ifdef PM_USED
device pic16F877A, xt_osc, wdt_on, lvp_off, protect_off
else
__config _XT_OSC & _WDT_ON & _LVP_OFF & _CP_OFF
endif
endasm
PORTA = 0
PORTB = 0
TRISA = 0
TRISB = 0
ADCON1 = 7
CMCON = 7
CounterA VAR BYTE
Start:
for CounterA = 0 to 5
PORTA = DCD CounterA
PAUSE 250
NEXT
PORTA = 0
FOR CounterA = 0 TO 7
PORTB = DCD CounterA
PAUSE 250
NEXT
PORTB = 0
GOTO Start
make sure you properly filter the PSU line and the PIC is powered
, make sure MCLR line is tied to Vdd, make sure PGM pin is loaded to GND while programming, and also make sure you have a crystal + caps attached to the PIC. The above assume a 4MHz crystal/resonator.
Bookmarks