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


Software for Signboard 2
[Flash]




This routine sholud be put on the main process.
Function
    This routine displays the data which was set to the workarea at once.


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
;***********************  Flash  ************************
        cblock         h'40'
        flash_lp
        flash_id
        flash_idw
        flash_data
        endc
flash
        movlw   d'16'           ;Set loop count
        movwf   flash_lp        ;Save loop count
        movlw   scrnhd          ;Set screen head adr
        movwf   flash_id        ;Save screen adr
        movlw   scrnwhd         ;Set screen work head adr
        movwf   flash_idw       ;Save screen work adr
flash_loop
        movf    flash_idw,w     ;Read "FROM" adr
        movwf   fsr             ;Set "FROM" adr
        movf    indf,w          ;Read "FROM" data
        movwf   flash_data      ;Save "FROM" data
        movf    flash_id,w      ;Read "TO" adr
        movwf   fsr             ;Set "TO" adr
        movf    flash_data,w    ;Read "FROM" data
        movwf   indf            ;Write data
        incf    flash_id,f      ;"TO" adr + 1
        incf    flash_idw,f     ;"FROM" adr + 1
        decfsz  flash_lp,f      ;Copy end ?
        goto    flash_loop      ;No. Copy next
        call    led_cnt         ;LED control
        return



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

    In this routine, it copies the data of the screen workarea on to the screen area. It calls LED control subroutine when finishing copying all data and it controls LEDs.