Functions of the smart electronic clock:
1. Full calendar timing.
2. 12/24 hour conversion.
3. 8-way timing output (can be turned on/off)
4. Error: 15S+1uS
5. Automatic tracking of large and small months, leap years, weeks 2.
Adjustment:
After power on, the electronic clock displays "1:00".
1. 8-way timing time query
Press K1 key to display 8-way timing time in turn. Week position display: "H" means: turn on the current timing output; "L" means: turn off the current timing output. At this time, press K2 key to switch between "H" and "L". All outputs are output by the buzzer!
2. Display status control
Press K2 key to enter the following working states:
1) 12 hours/sun and moon alternate display.
2) 12 hours fixed display.
3) 24 hours/sun and moon alternate display
. 4) 24 hours fixed display.
3. Time adjustment
Press K2 key for 3S to enter the time adjustment menu. Press K1 to enter the time calibration state in sequence: minute, hour, day, month, year, fine-tuning coefficient. Press K2 at this time to complete +1. When "d" is displayed, it means that the fine-tuning coefficient (0-99) needs to be adjusted. The smaller the value, the slower the clock runs. When the 6MHz crystal oscillator used has a large deviation, the fine-tuning coefficient should be carefully adjusted! When "out" is displayed, press K2 to exit! After exiting, press any key to start the clock.
4. Set the timing time
. Press K1 for 3S to enter the setting menu. Press K1 to enter the 8-way timing adjustment state in sequence: hour, minute. Press K2 at this time to complete +1. When "out" is displayed, press K2 to exit!
;2001.5.24
;***************
;all_clk1 _program 2000-10-12
;***************
fl_250ms bit 00h
fl_500ms bit fl_250ms+1
set_clk_f bit fl_500ms+1
set_al4_f bit set_clk_f+1
am_f bit set_al4_f+1
fl_3s bit am_f+1
al1_f bit fl_3s+1
al2_f bit fl_3s+2
al3_f bit fl_3s+3
al4_f bit fl_3s+4
set_over bit al4_f+1
ha_f bit set_over+1
ha_over bit ha_f+1
fl_ms_f bit ha_over+1
fl_s_f bit fl_ms_f+1
key_over bit fl_s_f+1
;**************************************************
key_data equ 08h
timers equ key_data+1
t_30ms equ timers+1
t_20ms equ t_30ms+1
t_1s equ t_20ms+1
k1_data equ t_1s+1
k2_data equ k1_data+1
stat_work equ k2_data+1
stat_LED equ stat_work+1
t_1ms equ stat_led+1
t_20m equ t_1ms+1
beep equ t_20m
al1 equ beep+1
al2 equ beep+2
al3 equ beep+3
al4 equ beep+4
al5 equ beep+5
al6 equ beep+6
al7 equ beep+7
al8 equ beep+8
ret_timer equ al8+1
;**************************************************
sec equ 23h
min equ sec+1h
hour equ min+1h
day equ hour+1h
mon equ day+1h
year equ mon+1h
w_adj equ year+1h
week equ w_adj+1h
;***************************************
al1_h equ week+1h
al1_m equ al1_h+1h
al2_h equ al1_m+1h
al2_m equ al2_h+1h
al3_h equ al2_m+1h
al3_m equ al3_h+1h
al4_h equ al3_m+1h
al4_m equ al4_h+1h
al5_h equ al4_m+1h
al5_m equ al5_h+1h
al6_h equ al5_m+1h
al6_m equ al6_h+1h
al7_h equ al6_m+1h
al7_m equ al7_h+1h
al8_h equ al7_m+1h
al8_m equ al8_h+1h
beep_t equ al8_m+1
frist equ beep_t+1
;**************************************
led1 equ frist+1
led2 equ led1+1
led3 equ led2+1
led4 equ led3+1
led5 equ led4+1
sp_data equ led5+1
;**************************************
led_1 bit p3.5
led_2 bit p3.4
led_3 bit p3.3
led_4 bit p3.2
led_5 bit p3.1
beep_f BIT P3.7
key_f bit p3.0
;********************************************************
t_h_100ms equ 05dh ;100 ms for 6MHz
t_l_100ms equ 07fh ;c6 for 100ms
timer_no equ 8d ;3c90+30d=3cb0h
w_adj_dat equ 50d
key_da equ 00000110b
;*********************************************************
blk_led equ 20d
dot_led equ 21d
f_led equ 22d
n_led equ 23d
u_led equ 24d
t_led equ 25d
b_led equ 26d
d_led equ 27d
oRG 0000H; ;
sJMP start
ORG 0003H; ;
reti;
ORG 000BH ;
;ajmp t0
reti ;
ORG 0013H
reti ;
ORG 001BH ;
aJMP T1 ;
ORG 0023H ;
RETI; AJMP RS_485 ;
;**************************************
start:
call clr_ram
MOV SP,#sp_data ;
call int_t0
call timer_int
call timer_20ms
STAR_BI:
call cLOCk
call week_auto
call al_out
CALL KEY_bord
call key_del
call set_clk_al
call key_jmp
call reback
call led_jmp
sjmp star_bi
Previous article:Design and Analysis of 6-bit Digital Clock Circuit for Single Chip Microcomputer
Next article:Design and production of multifunctional AT89C2051 countdown timer circuit
Recommended ReadingLatest update time:2024-11-15 14:31
- Popular Resources
- Popular amplifiers
- Learning MCU Technology from Scratch (Liu Jianqing)
- Wireless doorbell alarm based on AT89C2051 single chip microcomputer
- Infrared remote control LED electronic clock using real-time clock chip DS1302+AT89C2051
- Infrared remote control LED electronic clock using real-time clock chip DS1302+AT89C2051.rar
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- Brief Analysis of Automotive Ethernet Test Content and Test Methods
- How haptic technology can enhance driving safety
- BLDC driver based on GD32
- The development board mounts the NFS server shared directory
- Origin of "Circuit Observation Room"
- Want to learn about Microchip PIC32MZ DA Disc Graphics Development Board? Welcome to sign up for the online seminar
- ADXL345 sensor acceleration detection in vibration environment
- Contactless facial recognition access control system
- Look! Moderator benefits have increased again! New rules for moderators announced
- Basic knowledge of NFC architecture and standards involved
- [Perf-V Evaluation] Exception (interrupt) handling of Hummingbird E203
- Calculation and setting of baud rate of msp430 microcontroller