1850 views|15 replies

968

Posts

0

Resources
The OP
 

In the 51 MCU serial communication mode 1, what kind of clock does timer 1 provide to the serial port module? [Copy link]

 

邀请:@maychang   @damiaa   @jimtien   @huo_hu   参与回复

I would like to ask what kind of clock does timer 1 provide to the serial module in the 51 single-chip microcomputer serial communication mode 1? Is this clock generated by the overflow of timer 1? What is this overflow? Does anyone have more detailed information? Thank you.

This post is from 51mcu

Latest reply

STM32?   Details Published on 2022-10-8 22:13
 

2w

Posts

0

Resources
2
 

What kind of clock does Timer 1 provide to the serial module?

This clock signal is a rectangular wave, and its frequency is determined by the quartz crystal oscillation frequency of the microcontroller, the timer reload value, and the highest bit of PCON.

This post is from 51mcu
 
 
 

2w

Posts

0

Resources
3
 

"Is this clock generated by the overflow of timer 1?"

Yes, it is generated by the overflow of Timer 1.

This post is from 51mcu
 
 
 

2w

Posts

0

Resources
4
 

What is this overflow?

The overflow of a timer/counter means that the timer/counter keeps counting, and when the timer/counter is full, it counts another number, causing each digit of the timer/counter to carry, and each digit of the timer/counter becomes 0, and the timer/counter carries. This carry is the overflow of the timer/counter.

This post is from 51mcu

Comments

Thank you. When the timer overflows, its overflow flag will be set to 1, but it is only a bit in the register. It is different from the clock provided to the serial communication module. How is the clock provided to the serial communication module generated?  Details Published on 2022-8-14 15:16
Thank you. When the timer overflows, its overflow flag will be set to 1, but it is only a bit in the register. It is different from the clock provided to the serial communication module. How is the clock provided to the serial communication module generated?  Details Published on 2022-8-14 15:16
 
 
 

968

Posts

0

Resources
5
 
maychang posted on 2022-8-14 15:10 "What is this overflow?" The overflow of the timer/counter means that the timer/counter keeps counting, and when the timer/counter is full, it counts again...

Thank you. When the timer overflows, its overflow flag will be set to 1, but it is only a bit in the register. It is different from the clock provided to the serial communication module. How is the clock provided to the serial communication module generated?

This post is from 51mcu

Comments

"When the timer overflows, its overflow flag will be set to 1, but it is only a bit in the register" It is not "a bit in the register", but a bit outside the register. Of course, it is invisible to the program, and this bit is physically no different from other bits in the register.   Details Published on 2022-8-14 15:41
"When the timer overflows, its overflow flag will be set to 1, but it is only a bit in the register" It is not "a bit in the register", but a bit outside the register. Of course, it is invisible to the program, and this bit is physically no different from other bits in the register.   Details Published on 2022-8-14 15:36
"When the timer overflows, its overflow flag will be set to 1, but it is only a bit in the register" It is not "a bit in the register", but a bit outside the register. Of course, it is invisible to the program, and this bit is physically no different from other bits in the register.   Details Published on 2022-8-14 15:35
"When the timer overflows, its overflow flag will be set to 1, but it is only a bit in the register" It is not "a bit in the register", but a bit outside the register. Of course, it is invisible to the program, and this bit is physically no different from other bits in the register.   Details Published on 2022-8-14 15:32
 
 
 

2w

Posts

0

Resources
6
 
maychang posted on 2022-8-14 15:10 "What is this overflow?" The overflow of the timer/counter means that the timer/counter keeps counting, and when the timer/counter is full, it counts again...

What is this overflow?

Specifically for the generation of the baud rate of the 51 single-chip microcomputer, since the low 8 bits of the timer/counter are used for counting, when the count reaches 255 (0XFF) and another number comes (a pulse is input), the low 8 bits of timer/counter 1 become 0 (and the high 8-bit storage value is reloaded into the low 8 bits), and the carry makes the carry bit of the timer/counter become 1 (this carry bit is invisible to the program), which is the overflow of the low 8 bits of timer/counter 1.

This post is from 51mcu
 
 
 

2w

Posts

0

Resources
7
 
Yishayishi published on 2022-8-14 15:16 Thank you, the overflow of the timer will set its overflow flag, but it is only one bit in the register, which is different from the one provided to the serial communication module...

"When a timer overflows, its overflow flag will be set to 1, but it is only one bit in the register."

It is not "a bit in a register", but a bit outside the register. Of course, it is invisible to the program, and the bit is physically no different from other bits in the register.

"This is different from the clock provided to the serial communication module."

Consider the lowest bit of the timer/counter. When the lowest bit is 1, count another number, the lowest bit becomes 0, this is the "overflow" of the lowest bit. The overflow signal is the input signal of the second lowest bit, which increases the second lowest bit by 1. When the timer/counter is used as a 16-bit, the overflow signal of the lower 8 bits is the input signal of the higher 8 bits. By analogy, the overflow signal of the highest bit (that is, the 7th bit) of the lower 8 bits of the timer/counter can of course be the input signal of a certain module, that is, the clock of the serial communication module.

This post is from 51mcu
 
 
 

2w

Posts

0

Resources
8
 
Yishayishi published on 2022-8-14 15:16 Thank you, the overflow of the timer will set its overflow flag, but it is only one bit in the register, which is different from the one provided to the serial communication module...

"This is different from the clock provided to the serial communication module."

According to the analysis in the previous post, the overflow of the lower 8 bits of timer/counter 1 and the clock provided to the serial communication module are the same thing.

This post is from 51mcu
 
 
 

2w

Posts

0

Resources
9
 
Yishayishi published on 2022-8-14 15:16 Thank you, the overflow of the timer will set its overflow flag, but it is only one bit in the register, which is different from the one provided to the serial communication module...

From the question you asked, it seems that you have not read the textbook "Digital Circuits". This is a shortcoming that should be made up.

This post is from 51mcu
 
 
 

2w

Posts

0

Resources
10
 
Yishayishi published on 2022-8-14 15:16 Thank you, the overflow of the timer will set its overflow flag, but it is only one bit in the register, which is different from the one provided to the serial communication module...

"Digital Circuits" talks about various gate circuits, such as AND gates, OR gates, NOT gates, etc., and also talks about various triggers, such as RS triggers, JK triggers, etc. Single-chip microcomputers and even more complex CPUs are composed of various gates and triggers.

This post is from 51mcu

Comments

OK. Thanks. I need to find a book on digital circuits to learn more. Thank you very much.  Details Published on 2022-8-14 16:12
 
 
 

968

Posts

0

Resources
11
 
maychang published on 2022-8-14 15:41 "Digital Circuits" talks about various gate circuits, such as AND gates, OR gates, NOT gates, etc., and also talks about various triggers, such as RS triggers, JK triggers, etc...

OK. Thanks. I need to find a book on digital circuits to learn more. Thank you very much.

This post is from 51mcu

Comments

"I have to find a book on digital circuits and study it carefully." Analog is the basis of digital. If you have not studied "Analog Circuits", at least find an analog circuit textbook to read first. You don't have to read it carefully, but you should know what is covered in the textbook so that you can quickly look it up when you need it.  Details Published on 2022-8-14 16:17
 
 
 

2w

Posts

0

Resources
12
 
Yishayishi published on 2022-8-14 16:12 OK. Thanks. I need to find a book on digital circuits to study. Thank you very much.

"I need to find a book on digital circuits to study hard."

Analog is the foundation of digital. If you have not studied "Analog Circuits", at least find an analog circuit textbook and read it first. You don't have to read it carefully, but you should know what is covered in the textbook so that you can quickly look it up when you need it.

This post is from 51mcu
 
 
 

4005

Posts

0

Resources
13
 

Don't study old stuff.

This post is from 51mcu

Comments

Thank you. What are you researching?  Details Published on 2022-9-3 13:27
 
 
 

968

Posts

0

Resources
14
 
huo_hu posted on 2022-9-2 15:55 Don’t study the outdated stuff

Thank you. What are you researching?

This post is from 51mcu
 
 
 

224

Posts

0

Resources
15
 
maychang posted on 2022-8-14 15:36 From the question you asked, it seems that you have not read the textbook "Digital Circuits". This is a shortcoming and should be made up.

When I first learned 51 a few years ago, it was because I had never studied "Digital Circuits" before, and I felt like I was reading a book from a foreign language.

This post is from 51mcu
 
 
 

224

Posts

0

Resources
16
 
Yishayishi published on 2022-9-3 13:27 Thank you. What are you researching?

STM32?

This post is from 51mcu
 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

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