2311 views|3 replies

1w

Posts

16

Resources
The OP
 

【GD32E231 DIY Contest】3. Light up a row of digital tubes [Copy link]

I feel a bit disadvantaged this time, because the digital tubes are one inch with common cathode, which are big and bulky. Each tube is connected to an 8050 transistor, and then connected to 8 wires. I said that when I usually make products, I have a digital tube control chip. But this time I didn't use it and had to bite the bullet. Today, I used timer 13 to distribute a 25HZ signal to each transistor, but it's not very good. I will slowly adjust it later. The following is the program of timer 13.
  1. void Timer13_Init(void) { timer_parameter_struct timer_initpara; rcu_periph_clock_enable(RCU_TIMER13); timer_deinit(TIMER13); /* TIMER configuration */ timer_initpara.prescaler = 719; timer_initpara.alignedmode = TIMER_COUNTER_EDGE; timer_initpara.counterdirection = TIMER_COUNTER _UP; timer_initpara.period = 999; //10MS timer_initpara.clockdivision = TIMER_CKDIV_DIV1; timer_initpara.repetitioncounter = 0; timer_init(TIMER13,&timer_initpara); timer_interrupt_enable(TIMER13, TIMER_INT_UP); /*Enable TIMER2*/ nvic_irq_enable(TIMER13_IRQn, 0); //Set priority to 0(0-2) /* auto-reload preload enable */ timer_auto_reload_shadow_enable(TIMER13); /* auto-reload preload enable */ timer_enable(TIMER13); } /*The interrupt handler function of tmer2*/ void TIMER13_IRQHandler(void) { if(RESET != timer_interrupt_flag_get(TIMER13, TIMER_INT_FLAG_UP)) { display_count++; } timer_interrupt_flag_clear(TIMER13, TIMER_INT_FLAG_UP); }
复制代码
The following is a photo of the operation. Although it is a bit flashy, the function has achieved the goal. I will adjust it next time.
This post is from GD32 MCU

Latest reply

What is the cardboard under the digital tube used for?  Details Published on 2019-5-13 12:59
Personal signaturehttp://shop34182318.taobao.com/
https://shop436095304.taobao.com/?spm=a230r.7195193.1997079397.37.69fe60dfT705yr
 

172

Posts

0

Resources
2
 
Thanks for sharing!
This post is from GD32 MCU
 
 
 

21

Posts

0

Resources
3
 
What is the cardboard under the digital tube used for?
This post is from GD32 MCU

Comments

I need to put a digital tube, and there are wires at the back, but my perforated board can't hold it at all.  Details Published on 2019-5-13 17:52
 
 
 

1w

Posts

16

Resources
4
 
cxmin posted on 2019-5-13 12:59 What is the cardboard under the digital tube used for?
It is used to place the digital tube. There are wires at the back. My perforated board can't fit it at all.
This post is from GD32 MCU
 
Personal signaturehttp://shop34182318.taobao.com/
https://shop436095304.taobao.com/?spm=a230r.7195193.1997079397.37.69fe60dfT705yr
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Related articles more>>

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

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