junconvn
10-02-2012, 03:54 PM
list p = 16f84a
#include p16f84a.inc
x1 = 0x0c
x2 = x1+1
x3 = x2+1
status = 0x03
trisa = 0x85
trisb = 0x86
porta = 0x05
portb = 0x06
goto main
delay_
movwf x3
delay_1
decsfz x3,1
goto delay_1
return
main
movlw 0x20
movwf x2
movwf x1
bsf status,5
movlw 0xff
movwf trisb
movlw 0x00
movwf trisa
bcf status,5
here
bsf porta,0
nop
nop
bcf portb,0
goto here
movlw 0x25
movwf x2
movwf x1
goto main
end
#include p16f84a.inc
x1 = 0x0c
x2 = x1+1
x3 = x2+1
status = 0x03
trisa = 0x85
trisb = 0x86
porta = 0x05
portb = 0x06
goto main
delay_
movwf x3
delay_1
decsfz x3,1
goto delay_1
return
main
movlw 0x20
movwf x2
movwf x1
bsf status,5
movlw 0xff
movwf trisb
movlw 0x00
movwf trisa
bcf status,5
here
bsf porta,0
nop
nop
bcf portb,0
goto here
movlw 0x25
movwf x2
movwf x1
goto main
end