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

Software for Signboard 2
[All LED goes OFF]

This routine sholud be put on the main process. Function This routine turns off all LEDs at the same time. Source code
    001
    002
    003
    004
    005
    006
    007
    008
    009
    010
    011
    012
    013
    014
    015
    016
    017
    ;*******************  All OFF Process  *****************
    all_off
            movlw   d'16'           ;Set loop count
            movwf   lpcnt           ;Save loop count
            movlw   d'15'           ;Set row index
            movwf   rowindex        ;Save row index
    all_off_loop
            movlw   scrnhd          ;Set table head address
            addwf   rowindex,w      ;Head + Index
            movwf   fsr             ;Set table address
            movlw   h'7f'           ;Set OFF data
            movwf   indf            ;Write data
            decf    rowindex,f      ;Index - 1
            decfsz  lpcnt,f         ;Loop end ?
            goto    all_off_loop    ;No. Next row
            call    led_cnt         ;LED control
            return
Explanation It sets going-out data '1' directly in the screen area(10h-1Fh). It calls LED control subroutine when finishing setting all data and it turns off LEDs. To turn off LEDs, it clears only screen area. The data of the screen workarea is saved. So, it is possible to make a display blink if it does combination with "Flash".