0
\$\begingroup\$

I was learning serial communication of 8051, in datasheet I have found this: enter image description here

it looks like both of the SBUF transmitter and SBUF receiver are parallel in serial out and serial in parallel out shift registers. so, to transmit data serially(receive), they must need clocks. And it is clear that for transmission, the baud rate should be nothing but the frequency of the clock who is feeding SBUF transmitter. But in my book it is written that the UART circuit is providing timer 1 around 28800 HZ. And the timer is loaded with -3 to get a baud rate of 9600.

My question is , why the UART will provide clock to the timer ? how the timer is responsible for for setting the baud rate? I did not see any connection between counting delay of the timer 1 and the clock (the one who determines the baud rate of sbuf) who is actually driving sbuf transmitter.

Edit: after doing some research, I have two main question :

  1. Is The timer flag (TF1) is tied to the SBUF clock pin?(when operating)
  2. When we are operating in serial mode, who drives TIMER 1? my guess is it's UART (28800Hz), but one of the commentator said, this time, the timer is still driven by the processor clock.
\$\endgroup\$
1
  • 1
    \$\begingroup\$ The timer provides a clock signal to the UART. The clock is typically 16 times the baud rate (but it is a looong tme since I used an 8051, so I don't recall the details.) \$\endgroup\$ Jul 31, 2021 at 18:48

1 Answer 1

2
\$\begingroup\$

I found this data sheet (ATmel datasheet AT80C51RD2 https://datasheetspdf.com/pdf-file/956674/ATMEL/AT80C51RD2/1).

Clock source of UART are multiple (Timer1, Timer2, or BRG) as stated in this picture by choosing 4 bits. But 8051 has been reworked so long ...

Not remembering if 28800 Hz was used as clock ?

enter image description here

This old one come from Philips Semiconductors 1998. In this case, only Timer 2 was used as BRG.

enter image description here

\$\endgroup\$
8
  • 1
    \$\begingroup\$ The problem is that we have nomore the original schematic of these 8051... Only a software model ! Must search in my very old docs :-) \$\endgroup\$
    – Antonio51
    Jul 31, 2021 at 19:48
  • 1
    \$\begingroup\$ I think so. Here is also a link interresting for programming ... ee.ncu.edu.tw/~jztsai/EE3046/lecture/… \$\endgroup\$
    – Antonio51
    Jul 31, 2021 at 20:06
  • 2
    \$\begingroup\$ @Sayan: the UART does not provide a clock to the timer. The timer clocks are derived from the main processor clock. \$\endgroup\$ Jul 31, 2021 at 21:22
  • 1
    \$\begingroup\$ @Sayan: the speed of 28800 Hz was used by some old modems, unless I am wrong... \$\endgroup\$
    – Antonio51
    Aug 1, 2021 at 6:56
  • 1
    \$\begingroup\$ " But in my book it is written that the UART circuit is providing timer 1 around 28800 HZ. And the timer is loaded with -3 to get a baud rate of 9600. " What book ? \$\endgroup\$
    – Antonio51
    Aug 2, 2021 at 14:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.