[Menu]>[Circuits Gallery]>[Signboard 2]>[Software]


Software for Signboard 2
[Slide-out]




This routine sholud be put on the main process.
Function
    This routine displays the data which was set to the workarea from right without shifting.
    The position of the displayed data is shifted.
    In the lighting-up interval, it is 100 milliseconds per row.
    In the animation which is shown above, it is culling to make a file size small.


Source code

001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024
025
026
027
028
029
030
031
032
033
034
035
036
037
038
039
040
041
042
043
044
045
046
047
048
049
050
051
052
053
054
055
056
057
058
059
060
061
062
063
;*********************  Slide-out  **********************
        cblock         h'40'
        slout_lp
        slout_adr
        slout_adrw
        slout_data
        slout_sft
        slout_sftw
        slout_to
        slout_fm
        endc

slide_out
        movlw   d'16'           ;Set loop count
        movwf   slout_lp        ;Save loop count
        movwf   slout_sft       ;Save shift count
        movlw   scrnwhd         ;Set screen work head adr
        addlw   d'15'           ;Set work adr
        movwf   slout_adrw      ;Save work adr
        movlw   scrnhd          ;Set screen head adr
        addlw   d'15'           ;Set write adr
        movwf   slout_adr       ;Save write adr
slide_out_lp
        decfsz  slout_sft,f     ;Need shift ?
        goto    slide_out_shift ;Yes. jump to shift proc
slide_out1
        movf    slout_adrw,w    ;Read work adr
        movwf   fsr             ;Set work adr
        movf    indf,w          ;Read work data
        movwf   slout_data      ;Save data
        movf    slout_adr,w     ;Read screen adr
        movwf   fsr             ;Set screen adr
        movf    slout_data,w    ;Read data
        movwf   indf            ;Write data to screen
        call    led_cnt         ;LED control
        call    t100m           ;Wait 100 msec
        decf    slout_adr,f     ;Screen adr - 1
        decf    slout_adrw,f    ;Work adr - 1
        decfsz  slout_lp,f      ;Slide end ?
        goto    slide_out_lp    ;No. Next
        return

slide_out_shift
        movf    slout_sft,w     ;Read shift count
        movwf   slout_sftw      ;Save shift count to work
        movlw   scrnhd          ;Set screen head address
        movwf   slout_to        ;Save TO address
        addlw   d'1'            ;Set FROM address
        movwf   slout_fm        ;Save FROM address
slideo_shift_lp
        movf    slout_fm,w      ;Read FROM adr
        movwf   fsr             ;Set FROM adr
        movf    indf,w          ;Read FROM data
        movwf   slout_data      ;Save data
        movf    slout_to,w      ;Read TO adr
        movwf   fsr             ;Set screen adr
        movf    slout_data,w    ;Read data
        movwf   indf            ;Write data
        incf    slout_to,f      ;TO adr + 1
        incf    slout_fm,f      ;FROM adr + 1
        decfsz  slout_sftw,f    ;Shift end ?
        goto    slideo_shift_lp ;No. Next
        goto    slide_out1      ;Yes. Shift end



Explanation
    The assignment of workarea is done among the 11th line from the 2nd line.

    In this processing, data in the screen area is shifted to the left about one line and data for one line is copied on to the screen area from the screen workarea. It is processed while changing the number of times of the shift and the copy position from the workarea. LED control subroutine is called every time it does each processing.
    In the interval of the processing of a row, it is 100 milliseconds. If changing this timer, the display speed can be changed.