中文English
单片机语音芯片ichaiyang 2024-05-10 2:51 43
Org 00hajmp mainorg 30hmain: lcall dismov 20h,# 1mov 21h,# 2mov 22h,# 3mov 23h,# 4ajmp maindisp: mov a, 20h call seg7mov p0, asetb p2.0 call lyclr p2.0mov a, 21h call seg7mov p0, a...

AT89C51 microcontroller how to use assembly language to let 4 digital tubes display 1234 at the same time?

Org 00hajmp mainorg 30hmain: lcall dismov 20h,# 1mov 21h,# 2mov 22h,# 3mov 23h,# 4ajmp maindisp: mov a, 20h call seg7mov p0, asetb p2.0 call lyclr p2.0mov a, 21h call seg7mov p0, asetb p2.1 call lyclr p2.1mov a, 22h call seg7mov p0, asetb p2.2 call lyclr p2.2mov a, 23h call seg7mov p0, asetb p2.2 call lyclr p2.3ret: mov r7,# 2d1: mov r6,# 40djnz r6,$ djnz r7, d1retseg7:Inc . amovc a, @a pcretdb 00h; 0db 0f9h; 1db 0a4h; 2db 0b0h; 3db 099h; 4db 092h; 5db 082h; 6db 0f8h; 7db 080h; 8db 090h; 9end扩展资料:注意事项1,至少包括4个功能:时间清零,启动计时,暂定计时,继续计时。

2, the minimum timing unit 0.1 seconds, the maximum timing time 999.9 seconds, 3, with a digital tube display time, while pressing any function key must have a sound prompt. 4, use method: with start key K1 and pause\/clear key K2. Press k1 to start the timing, press k2 to pause the timing, and press k2 again to clear the clock. 5, the digital tube dynamic display interface is one of the most widely used display methods in the single chip microcomputer, the dynamic driver is to all the digital tube 8 display strokes " a,b,c,d,e,f,g,dp" The ends of the same name are joined together. In addition, add a bit strobe control circuit for the common pole COM of each digital tube, and the bit strobe is controlled by their independent I\/O lines. When the single chip microcomputer outputs the font code, all digital tubes receive the same font code, but which digital tube will display the font depends on the control of the single chip microcomputer on the bit strobe COM terminal circuit. So as long as the gate control of the digital tube that needs to be displayed is turned on, the bit will display the font, and the digital tube without a gate will not light up.

By taking turns to control the COM end of each digital tube, each digital tube takes turns to control the display, which is dynamic drive.