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


Software for Signboard 2
[Split-out]




This routine sholud be put on the main process.
Function
    This routine displays the data which was set to the workarea from center 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
064
065
066
067
068
069
070
071
072
073
074
075
076
077
078
079
080
081
082
083
084
085
086
087
088
089
090
091
092
093
094
095
;*********************  Split-out  **********************
        cblock         h'40'
        spout_lp
        spout_adrl
        spout_adrr
        spout_adrwl
        spout_adrwr
        spout_data
        spout_sft
        spout_sftw
        spout_tol
        spout_fml
        spout_tor
        spout_fmr
        endc

split_out
        movlw   d'8'            ;Set loop count
        movwf   spout_lp        ;Save loop count
        movwf   spout_sft       ;Save shift loop count
        movlw   scrnhd          ;Set screen head adr
        addlw   d'7'            ;Set screen adr(Left)
        movwf   spout_adrl      ;Save screen adr(Left)
        addlw   d'1'            ;Set work adr(Right)
        movwf   spout_adrr      ;Save work adr(Right)
        movlw   scrnwhd         ;Set work head adr
        addlw   d'7'            ;Set work adr(Left)
        movwf   spout_adrwl     ;Save work adr(Left)
        addlw   d'1'            ;Set work adr(Right)
        movwf   spout_adrwr     ;Save work adr(Right)
split_out_lp
        decfsz  spout_sft,f     ;Need shift ?
        goto    split_out_shift ;Yes. jump to shift proc
split_out1
        movf    spout_adrwl,w   ;Read work adr(Left)
        movwf   fsr             ;Set work adr
        movf    indf,w          ;Read work data
        movwf   spout_data      ;Save data
        movf    spout_adrl,w    ;Read screen adr
        movwf   fsr             ;Set screen adr
        movf    spout_data,w    ;Read data
        movwf   indf            ;Write data(Left)
        movf    spout_adrwr,w   ;Read work adr(Right)
        movwf   fsr             ;Set work adr
        movf    indf,w          ;Read work data
        movwf   spout_data      ;Save data
        movf    spout_adrr,w    ;Read screen adr
        movwf   fsr             ;Set screen adr
        movf    spout_data,w    ;Read data
        movwf   indf            ;Write data(Right)
        call    led_cnt         ;LED control
        call    t100m           ;Wait 100 msec
        decf    spout_adrl,f    ;Screen adr - 1
        decf    spout_adrwl,f   ;Work adr - 1
        incf    spout_adrr,f    ;Work left adr + 1
        incf    spout_adrwr,f   ;Work right adr + 1
        decfsz  spout_lp,f      ;Split end ?
        goto    split_out_lp    ;No. Next
        return

split_out_shift
        movf    spout_sft,w     ;Shift loop count
        movwf   spout_sftw      ;Save shift loop count
        movlw   scrnhd          ;Set screen head address
        movwf   spout_tol       ;Save TO adr(Left)
        incf    spout_tol,w     ;TO adr + 1
        movwf   spout_fml       ;Save FROM adr(Left)
        addlw   d'13'           ;Set screen right index
        movwf   spout_fmr       ;Save FROM adr(Right)
        incf    spout_fmr,w     ;FROM adr + 1
        movwf   spout_tor       ;Set TO adr(Right)
splito_shift_lp
        movf    spout_fml,w     ;Read FROM adr(Left)
        movwf   fsr             ;Set FROM adr
        movf    indf,w          ;Read FROM data
        movwf   spout_data      ;Save data
        movf    spout_tol,w     ;Read TO adr
        movwf   fsr             ;Set TO adr
        movf    spout_data,w    ;Read data
        movwf   indf            ;Write data(Left)
        movf    spout_fmr,w     ;Read FROM adr(Right)
        movwf   fsr             ;Set FROM adr
        movf    indf,w          ;Read FROM data
        movwf   spout_data      ;Save data
        movf    spout_tor,w     ;Read TO adr
        movwf   fsr             ;Set TO adr
        movf    spout_data,w    ;Read data
        movwf   indf            ;Write data(Right)
        incf    spout_tol,f     ;TO adr(Left) + 1
        incf    spout_fml,f     ;FROM adr(Left) + 1
        decf    spout_tor,f     ;TO adr(Right) - 1
        decf    spout_fmr,f     ;FROM adr(Right) - 1
        decfsz  spout_sftw,f    ;Shift end ?
        goto    splito_shift_lp ;No. Next
        goto    split_out1      ;Yes. Shift end



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

    In this routine, first the data which is set on screen area is shifted by one row and the data is copied to center of screen area from center of screen workarea by one row and it calls LED control subroutine.
    The shift speed of the display is 100 milliseconds/row. If changing this timer, the display speed can be changed.