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


Software for Signboard 2
[Slide-in]




This routine sholud be put on the main process.
Function
    This routine displays the data which was set to the workarea from right with shifting.
    The position of the displayed data isn't 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
064
065
066
067
;*********************  Slide-in  ***********************
        cblock         h'40'
        slin_lp
        slin_adr
        slin_id
        slin_idw
        slin_data
        slin_sft
        slin_sftw
        slin_to
        slin_from
        endc

slide_in
        movlw   d'16'           ;Set loop count
        movwf   slin_lp         ;Save loop count
        movlw   scrnhd          ;Set screen head adr
        addlw   d'15'           ;Head address + 15(Right)
        movwf   slin_adr        ;Save screen adr(fix)
        movwf   slin_id         ;Save screen adr(variable)
        movlw   scrnwhd         ;Set screen work head adr
        movwf   slin_idw        ;Save screen work adr
        movlw   d'1'            ;Set initial shift count
        movwf   slin_sft        ;Save shift count
slide_in_lp
        decfsz  slin_sft,w      ;Need shift ?
        goto    slide_in_shift  ;Yes. jump to shift proc
slide_in1
        incf    slin_sft,f      ;Shift count + 1
        movf    slin_idw,w      ;Read work address
        movwf   fsr             ;Set work address
        movf    indf,w          ;Read data
        movwf   slin_data       ;Save data
        movf    slin_adr,w      ;Read screen adr(fix)
        movwf   fsr             ;Set screen addres
        movf    slin_data,w     ;Read data
        movwf   indf            ;Write data
        call    led_cnt         ;LED control
        call    t100m           ;Wait 100 msec
        decf    slin_id,f       ;Screen adr - 1
        incf    slin_idw,f      ;Screen work adr + 1
        decfsz  slin_lp,f       ;Loop end ?
        goto    slide_in_lp     ;No. Next data
        return

slide_in_shift
        movf    slin_sft,w      ;Read shift count
        movwf   slin_sftw       ;Save shift work count
        decf    slin_sftw,f     ;Work count - 1
        movf    slin_id,w       ;Read screen address
        movwf   slin_to         ;Save "TO" address
        incf    slin_to,w       ;"TO" adr + 1
        movwf   slin_from       ;Save "FROM" address
slidei_shift_lp
        movf    slin_from,w     ;Read "FROM" adr
        movwf   fsr             ;Set "FROM" adr
        movf    indf,w          ;Read "FROM" data
        movwf   slin_data       ;Save "FROM" data
        movf    slin_to,w       ;Read "TO" adr
        movwf   fsr             ;Set "TO" adr
        movf    slin_data,w     ;Read "FROM" data
        movwf   indf            ;Write data
        incf    slin_to,f       ;"TO" adr + 1
        incf    slin_from,f     ;"FROM" adr + 1
        decfsz  slin_sftw,f     ;Shift end ?
        goto    slidei_shift_lp ;No. Shift next
        goto    slide_in1       ;Yes. Shift end



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

    In this routine, it shifts the data to have copied on to the screen area from the screen workarea to the left. The data of the screen workarea is copied on to the right end in the screen area. The shift speed of the display is 100 milliseconds/row. If changing this timer, the display speed can be changed.