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
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
- 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
- Android 5.0 BLE low-power Bluetooth slave device application
- JHL HOOD 1969 small class A amplifier board
- Solutions to several difficult problems in the CCS debugging process
- Xunwei iTOP4418 development board Qt system ported 4G-EC20
- How do you calculate the cost of PCB materials?
- [MM32 eMiniBoard Review] Part 7: IIC Read and Write EEPROM
- Altium Designer's dirty tricks to combat piracy
- TMS320F2812 generates PWM waveform process
- TI Power Stage Designer Tool Introduction Documentation
- I would like to ask you, the STM32CUBEMX+SPI+DMA method always sends incorrectly. My chip is STM32F103RC