#include<P18F2550.inc>
CONFIG WDT=OFF; disable watchdog timer
CONFIG MCLRE = ON; MCLEAR Pin on
CONFIG DEBUG = ON; Enable Debug Mode
CONFIG LVP = OFF; Low-Voltage programming disabled (necessary for debugging)
CONFIG FOSC = INTOSCIO_EC;Internal oscillator, port function on RA6
org 0; start code at 0
Delay1 res 255 ;reserve 1 byte for the variable Delay1
Delay2 res 255 ;reserve 1 byte for the variable Delay2
Start:
CLRF PORTA ; Initialize PORTA by
; clearing output
; data latches
CLRF LATA ; Alternate method
; to clear output
; data latches
CLRF TRISA
CLRF Delay1
CLRF Delay2
Alpha:
BSF PORTA,RA5; set on
DECFSZ Delay1,1 ;Decrement Delay1 by 1, skip next instruction if Delay1 is 0
GOTO Alpha
DECFSZ Delay2,1
GOTO Alpha
Beta:
BCF PORTA,RA5; clear
DECFSZ Delay1,1 ;Decrement Delay1 by 1, skip next instruction if Delay1 is 0
GOTO Beta
DECFSZ Delay2,1
GOTO Beta
GOTO Alpha
end