51 single chip microcomputer LED dot matrix upward movement program! (Assembly)

Publisher:星尘散落Latest update time:2020-02-15 Source: 51hei Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Note: The row is driven by 74LS154+PNP transistor

The column is driven by two 74HC595!

This program can achieve upward movement! Below is the video link of the actual effect, please check it out! Link address: Video Xiangjian: http://www.tudou.com/programs/view/D0SCJyO4RBQ/
 
SDATA EQU P1.0 ;Serial data
SCLK EQU P1.1 ;Shift clock pulse
RCK EQU P1.2 ;Output latch control pulse
ORG 000H
JMP MAIN
ORG 0030H
MAIN: MOV SP,#5FH
MOV 20H,#00H
MAIN1: MOV R0,#5
MAIN2: MOV R3,#10H
MOV R1,#00H
MOV R2,20H
MAIN3: MOV DPTR,#TAB
CALL YIN
MOV A,R1
MOV P2,A
INC R1
MOV A,#0FFH
MOV P1,A
MOV R5,#6
D1: MOV R6,#100
DJNZ R6,$
DJNZ R5,D1
DJNZ R3,MAIN3
DJNZ R0,MAIN2
MOV A,20H
ADD A,#02
MOV 20H,A
CJNE A,#100,MAIN1
JMP MAIN

YIN: MOV A,R2
MOVC A,@A+DPTR
CPL A
CALL YIN1
INC R2
MOV A,R2
MOVC A,@A+DPTR
CPL A
CALL YIN1
INC R2
NOP
SETB RCK
NOP
CLR RCK
NOP
RET

YIN1: MOV R7,#8
D11: RLC A
MOV SDATA,C
NOP
SETB SCLK
NOP
CLR SCLK
NOP
DJNZ R7,D11
RET      
;------------------------------------------------------------------------------
TAB:
db 22H,08H,11H,08H,11H,10H,00H,20H
db 7FH,0FEH,40H,02H,80H,04H,1FH,0E0H
db 00H,40H,01H,84H,0FFH,0FEH,01H,00H
db 01H,00H,01H,00H,05H,00H,02H,00H
db 00H,00H,00H,04H,0FFH,0FEH,00H,04H
db 08H,04H,04H,04H,02H,04H,02H,24H
db 00H,0C4H,03H,04H,0CH,04H,30H,04H
db 10H,04H,00H,44H,00H,28H,00H,10H
db 02H,00H,02H,00H,02H,08H,03H,0FCH
db 02H,00H,02H,10H,3FH,0F8H,20H,10H
db 20H,10H,20H,10H,3FH,0F0H,00H,00H
db 29H,10H,24H,0C8H,44H,44H,80H,04H
db 00H,80H,78H,84H,4FH,0FEH,50H,80H
db 50H,0A0H,61H,20H,51H,28H,4BH,0FCH
db 48H,20H,48H,20H,68H,24H,57H,0FEH
db 40H,20H,40H,20H,40H,20H,40H,20H

;--------------------------------------------------------------
         END

Reference address:51 single chip microcomputer LED dot matrix upward movement program! (Assembly)

Previous article:Simulation and source code of temperature and humidity detection system based on single chip microcomputer + PT100 + SHT11
Next article:Digital Control Constant Current Source Based on 51 Single Chip Microcomputer

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号