ASM
; Single Message, Moving Message Display
A3 BIT 80H.1; clear for brightness set, then set and leave set.
; to set brightness send the following out to the data D_BUS.
; MSD-LSD 0=100% 1=80% 2=53% 3=40% 4=27% 5=20% 6=13% 7=blank
;***************************************************************************
;* FIRMWARE For Control Of The HDSP-2112 Display *
;* A MOVING MESSAGE DISPLAY *
;* FOR THE PHILLIPS 87C750 MICROCONTROLLER *
;***************************************************************************
fetch: acall getchr ; RAM BLANK done , get first character to be diplayed
doit: xch a,@r0 ; SWAP ACC data with display RAM data
inc r0 ; increment to next RAM address
djnz r5,doit; check if END of RAM location, if not keep going
mov r0,#20h; again load first RAM address
mov r4,#7 ; address to select first digit
; ( far right ) on display
acall msgout ; send message digit to display
ajmp fetch ; return to routine FETCH.
msgout1: mov a,r4 ; load digit address for display digit selection
mov A_BUS,a ; select digit position on display
dec r4 ; 1st digit=7 ( right side of display ) decrement for
mov a,@r0 ; next, then load ACC with data to display.
mov D_BUS,a ; move data to display
clr wr ; WRITE STROBE for display
setb wr ; write data to display on LOW to HIGH transition
inc r0 ; increment RAM pointer to next data digit for display
djnz r5,msgout1 ; if not=8 total digits keep going
acall delay2 ; delay to prevent JERKY look between digit updates.
; and to set our display ( SCROLL SPEED ).
ret ; return to calling routine.
power_down: mov 87h,#2 ; Set bit "PD" of the PCON Special Function Register
; This will cause the controller to Power Down.
; routine DELAY2 sets the SCROLL SPEED, and will prevent a JERKY APPEARANCE
; between display digit updates. by changing the value first loaded into
; R1 in the first line to a lower number the scroll speed is faster, and by
; changing it to a higher number the scroll speed will be slower.
END