Table addwf PCL,F
retlw b'00000000' ;Letter 'A'
retlw b'00111111'
retlw b'01001001'
retlw b'01001001'
retlw b'01001001'
retlw b'00111111'
retlw b'10000000' ;80h
;**************************
;Main routine
;**************************
Start call CLRREG ;clear all RAM variables
clrf Pointer
movlw .100
movwf Scan_Count
Show_Loop movf Pointer,W
call Table
movwf Col5 ;load to col 5
xorlw 80h ;end of letter??
btfsc STATUS,Z
goto Start
[COLOR="Red"]Loop1 call Scan
decfsz Scan_Count,F
goto Loop1
movlw .100
movwf Scan_Count[/COLOR]
call Shift
incf Pointer,F
goto Show_Loop
;*************************
;simple multiplex routine
;*************************
Scan bcf PORTA,2 ;reset SR-74HC164
nop ;//
nop ;//
bsf PORTA,2 ;
nop
bsf PORTA,1 ;enable data pin
movf Col1,W ;1
call Clock_Pulse
bcf PORTA,1 ;disable data pin
movf Col2,W ;2
call Clock_Pulse
movf Col3,W ;3
call Clock_Pulse
movf Col4,W ;4
call Clock_Pulse
movf Col5,W ;5
call Clock_Pulse
return
;**********************************
;Clock pulse routine to SR-74HC164
;**********************************
Clock_Pulse movwf Col_Data ;save column data
clrf PORTB
goto $+1
goto $+1
goto $+1
goto $+1
goto $+1
bsf PORTA,0 ;low to high transition
nop
bcf PORTA,0 ;make low for next transition
nop
movf Col_Data,W
movwf PORTB
goto $+1
goto $+1
return
;**************************************
;shift - moves one column data to left
;**************************************
Shift movf Col2,W ;2 to 1
movwf Col1
movf Col3,W ;3 to 2
movwf Col2
movf Col4,W ;4 to 3
movwf Col3
movf Col5,W ;5 to 4
movwf Col4
return