;FILENAME:   STLAB102.ASM
;DATE:       March 16, 1996
;TITLE:      LED matrix character program
;HARDWARE:   MLAB-121

; JAZZ-31 utilities subroutine
DTSEC   EQU     0042H   ;delay 1/10 routine

; MAX7219 Interface declaration
DATAI   EQU     P1.4    ;DATA IN pin
LOADX   EQU     P1.5    ;LOAD pin
CLOCK   EQU     P1.6    ;CLOCK pin
;
        ORG     8100H
START:
        CLR     CLOCK
        CLR     LOADX
        LCALL   INIT_7219
        LCALL   OFF_LEDS
        LCALL   PTRN_LEDS        ;pattern LEDs of digits
        LJMP    0036H
;
; Command pattern to LEDs of 8 digits
;
PTRN_LEDS:
        MOV     DPTR,#PATTERN
        MOV     R0,#08H
        MOV     R1,#00H
PTRN_LED1:
        MOV     07H,00H
        MOV     A,R1
        MOVC    A,@A+DPTR
        MOV     R6,A
        LCALL   SEND_AD
        INC     R1
        DJNZ    R0,PTRN_LED1
        RET
; characters pattern
PATTERN:
        DB      0FFH, 0E0H, 0D0H, 0C8H, 0C4H, 0C2H, 0C1H, 0FFH

        $INCLUDE "STLAB10H.ASM"
        END

