7s digital tube electronic clock assembly program

Publisher:ching80790Latest update time:2015-06-18 Source: 51hei Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
TWO EQU 31H
 THR EQU 32H
 FOU EQU 33H

 ORG 0000H 
 LJMP START
 ORG 000BH
 LJMP INT_T0


  START: SETB ET0
     SETB OF

 MOV TMOD,#01H
 MOV TH0, #3CH
 MOV TL0,#0B0H;50ms initial value
 SETB TR0

 MOV R5, #00H
 MOV DPTR,#TAB

 LOOP:   CLR P1.0
         SETB P1.3
 MOV A,ONE
 MOVC A,@A+DPTR
 MOV P2,A
 LJMP TWO

 CLR P1.3
 SETB P1.2
 MOV A,TWO
 MOVC A,@A+DPTR
 MOV P2,A
 LJMP TWO

CLR P1.2
SETB P1.1
MOV A,THR
MOVC A,@A+DPTR
MOV P2,A
LJMP TWO

CLR P1.1
SETB P1.0
MOV A,FOU
MOVC A,@A+DPTR
MOV P2,A
LJMP TWO
LJMP LOOP

DY: MOV R3,#200
D1:  MOV R4,#100
    DJNZ R4,$
DJNZ R3,D1
RIGHT
 
 INT_T0:MOV TH0,#3CH
MOV TL0, #0B0H
INC R5
CJNE R5,#20,EXIT
MOV R5, #00H
INC ONE
MOV A,ONE
CJNE A,#10,EXIT
MOV ONE,#00H
INC TWO
MOV A,TWO
CJNE A,#6,EXIT
MOV TWO,#00H
INC THR
MOV A,THR
CJNE A,#10,EXIT
MOV THR,#00H
INC FOU
MOV A,FOU 
CJNE A,#3,EXIT
MOV FOU,#00H

EXIT: NETWORK


 TAB:   DB 01H,4FH,12H,06H,4CH
        DB 24H,20H,0FH,00H,04H
        END
Reference address:7s digital tube electronic clock assembly program

Previous article:3D Rotating LED Assembly Programming
Next article:51 single chip microcomputer drives stepper motor __ ultimate (full version)

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号