2718 views|9 replies

1w

Posts

16

Resources
The OP
 

Timer [Copy link]

 
This post was last edited by ddllxxrr on 2019-5-26 20:13
Project Name: Timer
Project Introduction:
In my daily life, I think that besides clocks, timers are also very useful, such as cooking and steaming buns. I want to make a timer that is low in cost and easy to use. It can be powered by a 5V USB charging wire. It is powered when in use and can be removed when not in use. In addition to the basic functions, I also thought of using other functions of the chip as an extension.
The expandable functions are:
1. Using the RTC function, you can compile a program to expand it to a clock.
2. This design has a serial port that can communicate with WIFI, so it can be expanded to WIFI control timing.
This time only realizes the most basic function---timer. The longest time that can be set is 1 hour and 60 seconds.
System Function Introduction:
In order to reduce the cost, the pins are used directly to drive the 1-inch digital tube. At the beginning, there were too many wires and I gave up a bit. Later, after connecting them and lighting up, the effect was pretty good. The program is like this. At the beginning, each pin and each timer are initialized. This design uses two timers, one for digital tube scanning and one for timing. The display function is completely driven by pins. The minutes are placed in the first two digits of a 4-unit array, and the seconds are placed in the last two digits of the array. When powered on, it displays 0000. Only when the minutes and seconds are set and the third key is pressed, can it be started. When the timing is completed, an alarm will be issued.
System block diagram:
[attach]415 266[/attach]
Flow chart:
Photo:
Code:
MYLED.rar (241.47 KB, downloads: 24)
[size =4]Video:
https://training.eeworld.com.cn/course/5150/learn?preview=1#lesson/20216 https://training.ee world.com.cn/c…view=1#lesson/20216 Postscript: Although it was made this time, I think it is better to find a digital chip to drive the digital tube in the future. It costs a few yuan each. This time I spent a lot of effort and was about to give up. But after trying it, the display is OK, but it doesn't look good when pressing the button. There is no way. As for the timing, it is very accurate. I measured it with a mobile phone and it was exactly the same.
[ /align]


GD32E231C.1jpg.jpg (29.97 KB, downloads: 0)

GD32E231C.1jpg.jpg
This post is from GD32 MCU

Latest reply

The original poster can also: 1. Click Reply under your post; 2. Select Advanced Mode. Files can be uploaded in Advanced Mode.   Details Published on 2019-6-20 21:05
Personal signaturehttp://shop34182318.taobao.com/
https://shop436095304.taobao.com/?spm=a230r.7195193.1997079397.37.69fe60dfT705yr
 

2w

Posts

0

Resources
2
 
"The display is OK, but it doesn't look good when pressing the buttons." Is it because the display and buttons share pins?
This post is from GD32 MCU

Comments

The button processing is very time-consuming, the MCU is completely occupied, and the digital tube is delayed.  Details Published on 2019-5-26 20:16
The button processing is very time-consuming, the MCU is completely occupied, and the digital tube is delayed.  Details Published on 2019-5-26 14:53
 
 
 

85

Posts

0

Resources
3
 
maychang posted on 2019-5-26 11:35 "The display is OK, but it doesn't look good when pressing the buttons." Is it because the display and buttons share pins?
The button processing is dead, the MCU is completely occupied, and the digital tube refresh is delayed.
This post is from GD32 MCU

Comments

"The key processing is very time-consuming, the MCU is completely occupied, and the digital tube refresh is delayed." If this is the case, it is a software programming problem. Why not use a timer interrupt to check the key and refresh the display at the same time?  Details Published on 2019-5-26 20:17
"The key processing is very time-consuming, the MCU is completely occupied, and the digital tube refresh is delayed." If this is the case, it is a software programming problem. Why not use a timer interrupt to check the key and refresh the display at the same time?  Details Published on 2019-5-26 15:21
 
 
 

2w

Posts

0

Resources
4
 
sf116 posted on 2019-5-26 14:53 The key processing is waiting, the MCU is fully occupied, and the digital tube refresh is delayed.
"The key processing is waiting, the MCU is fully occupied, and the digital tube refresh is delayed." If so, it is a software programming problem. Why not use a timer interrupt to check the key and refresh the display at the same time?
This post is from GD32 MCU
 
 
 

1w

Posts

16

Resources
5
 
maychang posted on 2019-5-26 11:35 "The display is OK, but it doesn't look good when pressing the button." Is it because the display and the button share the same pin?
No, it's what the person below said, that when pressing the button, the display is delayed
This post is from GD32 MCU
 
Personal signaturehttp://shop34182318.taobao.com/
https://shop436095304.taobao.com/?spm=a230r.7195193.1997079397.37.69fe60dfT705yr
 
 

1w

Posts

16

Resources
6
 
sf116 posted on 2019-5-26 14:53 The key processing is dead, the MCU is completely occupied, and the digital tube refresh is delayed.
This can be considered, there is room for optimization in the future
This post is from GD32 MCU
 
Personal signaturehttp://shop34182318.taobao.com/
https://shop436095304.taobao.com/?spm=a230r.7195193.1997079397.37.69fe60dfT705yr
 
 

824

Posts

190

Resources
7
 

OP, don’t forget to upload the word document of your work!

This post is from GD32 MCU
Add and join groups EEWorld service account EEWorld subscription account Automotive development circle

Comments

It can no longer be uploaded. No modification is allowed.  Details Published on 2019-6-11 19:46
 
Personal signature在路上……

EEworld 有你有我
 
 

1w

Posts

16

Resources
8
 
lightxixi posted on 2019-6-11 15:44 OP, don’t forget to upload the word document of your work!

It can no longer be uploaded. No modification is allowed.

This post is from GD32 MCU

Comments

Yes, please add my QQ: 454909423, give it to me through QQ  Details Published on 2019-6-12 16:16
 
Personal signaturehttp://shop34182318.taobao.com/
https://shop436095304.taobao.com/?spm=a230r.7195193.1997079397.37.69fe60dfT705yr
 
 

824

Posts

190

Resources
9
 
ddllxxrr posted on 2019-6-11 19:46 It can no longer be uploaded, and modification is not allowed

Yes, please add my QQ: 454909423, give it to me through QQ

This post is from GD32 MCU
Add and join groups EEWorld service account EEWorld subscription account Automotive development circle

Comments

The original poster can also: 1. Click Reply under your post; 2. Select Advanced Mode. Files can be uploaded in Advanced Mode.  Details Published on 2019-6-20 21:05
 
Personal signature在路上……

EEworld 有你有我
 
 

824

Posts

190

Resources
10
 
lightxixi posted on 2019-6-12 16:16 Yes, please add my QQ: 454909423, and give it to me through QQ

The original poster can also: 1. Click Reply under your post; 2. Select Advanced Mode. Files can be uploaded in Advanced Mode.

This post is from GD32 MCU
Add and join groups EEWorld service account EEWorld subscription account Automotive development circle
 
Personal signature在路上……

EEworld 有你有我
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews

Room 1530, Zhongguancun MOOC Times Building, Block B, 18 Zhongguancun Street, Haidian District, Beijing 100190, China Tel:(010)82350740 Postcode:100190

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list