; *** Junebug 18F1320 LED sequencer demo ***
; Flashes LEDs1 thru 6 from left to right forever
; DIP Switch (SW6) must have TUTOR on (SW6-1,2,3) all other switches off
list p=18F1320
include <p18F1320.inc>
CONFIG OSC = INTIO2, WDT = OFF, LVP = OFF
org 0x000 ; RESET vector
; INIT
INIT movlw b'01111110'
movwf TRISA
movlw b'00000001'
movwf PORTA
movlw b'00100101'
movwf TRISB
bsf INTCON2,RBPU ; Set pullups
movlw 0x7F
movwf ADCON1 ; Set to all digital
; MAIN
MAIN
btfss PORTB,RB2
goto MAIN
movlw b'10000000'
movwf PORTA
goto MAIN
END