nDj8WYrW

STM8-DS1302 perpetual calendar

 
Overview

I have always wanted to design a small desktop decoration
, so a simple desktop clock was born.
It can display the year, month, day, hour, minute, second, week, temperature and humidity.
The time can be adjusted by buttons (subtract and add the next setting/confirm).
Type-C power supply, and the battery at the bottom keeps the power off and running.
DHT11
single bus protocol https://blog.csdn.net/Dustinthewine/article/details/125538284
Single bus protocol The timing needs to be very accurate. When writing a program, you must use an oscilloscope to test the delay time, otherwise it is easy to make mistakes.
The microcontroller collects four-bit data. The temperature integer bit, temperature decimal bit, humidity integer bit, humidity decimal bit. The
collected temperature and humidity are not very accurate.
DS1302
is a low-power real-time clock chip with trickle current charging capability launched by DALLAS, USA. It can time the year, month, day, week, hour, minute, and second, and has many functions such as leap year compensation. RTC (Real Time Clock): Real-time clock is an integrated circuit, usually called a clock chip.
Through a battery, accurate timing can be achieved after power failure, and the consumption is low.
The data of the chip is also read by operating the pin timing. As long as its protocol is met, the data can be read.
DS1302 stores data in the form of BCD code, so when the data is real, the BCD code must be converted to decimal
in the program. The following code is used for conversion
DS1302_Time[0]=Temp/16*10+Temp%16;
DS1302: https://blog.csdn.net/didi_ya/article/details/124249444
STM8 is a transition between C51 and STM32. The cost
of using IAR for program writing
is about 20-30. Lichuang provides free proofing
capacitors and resistors - a few pieces (a certain treasure
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-24 11:32:39
  • MSP430G2231 driver 7289 problem
  • How to use rosin
  • The leader has said that Japanese chips should not be used in the future.
  • FPGA Three Kingdoms
  • Classic or flawed?
  • 2008 Guangxi University Student Electronic Design Competition officially begins

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

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号