HT48R50A 5X7 LED dot matrix display example program
; ********************************************
; Function: 5X7 LED dot matrix display sample program *
; MICroProcessor : HT48R50A-1/28SKDIP-A *
; Author: www.picavr.com *
; Crystal : 4MHz *
; ********************************************
#INCLUDE HT48R50A-1.INC
;---------------------------------------------
DATA .SECTION AT 60H 'DATA'
LOOP_COUNTER DB ? ;[60H]
DISPLAY_COUNTER DB ? ;[61H]
DISPLAY_DATA DB ? ;[61H]
INDEX DB ? ;[62H]
SCAN_DATA DB ? ;[63H]
SCAN_COUNTER DB ? ;[64H]
DELAY_COUNTER DB ? ;[65H]
;---------------------------------------------
CODE .SECTION AT 00H 'CODE'
ORG 00H
JMP START
START:
CLR PAC
CLR PBC
CLR PCC
CLR TBLP
CLR INDEX
MOV A,10H
MOV LOOP_COUNTER,A
LOOP:
MOV A,0C0H
MOV DISPLAY_COUNTER,A
DISPLAY:
MOV A,INDEX
MOV TBLP,A
TABRDL DISPLAY_DATA
MOV A,DISPLAY_DATA
MOV PA,A
CLR PB
CALL DELAY
SET PB
CALL DELAY
INC TBLP
MOV A,0F7H
MOV SCAN_DATA,A
MOV A,04H
MOV SCAN_COUNTER,A
SCAN:
TABRDL DISPLAY_DATA
MOV A,DISPLAY_DATA
MOV PA,A
MOV A,SCAN_DATA
MOV PC,A
CALL DELAY
SET PC
CALL DELAY
INC TBLP
RR SCAN_DATA
SDZ SCAN_COUNTER
JMP SCAN
SDZ DISPLAY_COUNTER
JMP DISPLAY
MOV A,5
ADDM A,INDEX
SDZ LOOP_COUNTER
JMP LOOP
JMP START
RET
;---------------------------------------------
DELAY PROC
MOV A,0FFH
MOV DELAY_COUNTER,A
WAIT:
SDZ DELAY_COUNTER
JMP WAIT
RET
DELAY ENDP
;---------------------------------------------
ORG 0F00H
DC 0C1H,0BEH,0BEH,0BEH,0C1H ;0
DC 0FEH,0FEH,080H,0DEH,0FEH ;1
DC 0CEH,0B6H,0BAH,0BCH,0CEH ;2
DC 0C9H,0B6H,0B6H,0BEH,0DDH ;3
DC 0FBH,080H,0DBH,0EBH,0F3H ;4
DC 0B9H,0B6H,0B6H,0B6H,086H ;5
DC 0D9H,0B6H,0B6H,0B6H,0C1H ;6
DC 08FH,0B3H,0BCH,0BFH,09FH ;7
DC 0C9H,0B6H,0B6H,0B6H,0C9H ;8
DC 0C1H,0B6H,0B6H,0B6H,0CDH ;9
DC 0E0H,0DBH,0BBH,0DBH,0E0H ;A
DC 0C9H,0B6H,0B6H,0B6H,080H ;B
DC 0DDH,0BEH,0BEH,0BEH,0C1H ;C
DC 0E3H,0DDH,0BEH,0BEH,080H ;D
DC 0BEH,0B6H,0B6H,0B6H,080H ;E
DC 0BFH,0B7H,0B7H,0B7H,080H ;F
;---------------------------------------------
END
Previous article:HT48R50A LCD Display Sample Program
Next article:HT48R50A 7-segment digital tube display program
Recommended ReadingLatest update time:2024-11-16 21:29
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- EEWORLD University Hall----Electrical Engineering and Electronic Technology (China University of Mining and Technology)
- Where is the best place to place the ESD on the PCB?
- 【EasyARM-RT1052 Review】+ MQTTClient transplantation
- EEWorld adds double bonus to ELEXCON Shenzhen International Electronics Exhibition and sincerely invites you to participate
- The 32.768K crystal does not vibrate, so the selection is very important!
- Without calibration before testing, how much do you know about the real results?
- A set of common codes suitable for small projects
- MicroPython upgraded to v1.14
- Baby education is a bit difficult...
- What TI DSP Power Knows