#include <P12F509.inc>
__CONFIG _MCLRE_ON & _WDT_OFF & _IntRC_OSC
cblock 0x07
count,temp
dc1
dc2
dc3
count1
rot
endc
org 0x000
main movlw b'11001000' ;clear T0CS for output on GPIO2
option
movlw b'00001000' ;set pins to all outs
tris GPIO
movlw .08
movwf count1
upperla movlw b'10000000' ; Shifts out all 8 bits to second shift register for the layer's
movwf temp
call shift5
movlw b'1000000'
movwf rot
rlf rot,f ; Shifts out 8 bits to the first shift register lighing one led every loop
movwf temp
call shift5
movlw .05
call delay10
decfsz count1,f
goto upperla
call latch
midla movlw b'01000000'
movwf temp
movlw b'1000000'
movwf rot
rlf rot,f ; Shifts out 8 bits to the first shift register lighing one led every loop
movwf temp
call shift5
movlw .05
call delay10
decfsz count1,f
goto midla
call latch
lowerla movlw b'01000000'
movwf temp
movlw b'1000000'
movwf rot
rlf rot,f ; Shifts out 8 bits to the first shift register lighing one led every loop
movwf temp
call shift5
movlw .05
call delay10
decfsz count1,f
goto lowerla
call latch
goto main