Electronic Circuits - Electronic Tutorials - Electronic Hobby Projects - A Complete Electronic Resource Centre
Electronic,  Microprocessor,  Mircro Controller and PC  based Projects / Circuits for Engineering Students, Hobbyiest and R&D persons

MICROCONTROLLER TUTORIALS - 8052

Tutorials

 

Circuits

8051

Introduction

Chapter 1
Types of Memory

Chapter 2
Special Function Registers

Chapter 3
Basic Registers

Chapter 4
Addressing Modes

Chapter 5
Program Flow

Chapter 6
Low Level Information

Chapter 7
Timers

Chapter 8
Serial Port Operations

Chapter 9
Interrupts

Additional Features in 8052

8052 Instruction Set
 

Google
 
Web Hobbyprojects.com

8052 Microcontroller
Time 2 as a Baud Rate Generator

Author : Craig Steiner

Source : 8052.com

Book : The 8051/8052 Microcontroller:
       
 Architecture, Assembly Language, And Hardware Interfacing (Paperback)

TIMER 2 AS A BAUD-RATE GENERATOR

Timer 2 may be used as a baud rate generator. This is accomplished by setting either RCLK (T2CON.5) or TCLK (T2CON.4).

With the standard 8051, Timer 1 is the only timer which may be used to determine the baud rate of the serial port. Additionally, the receive and transmit baud rate must be the same.

With the 8052, however, the user may configure the serial port to receive at one baud rate and transmit with another. For example, if RCLK is set and TCLK is cleared, serial data will be received at the baud rate determined by Timer 2 whereas the baud rate of transmitted data will be determined by Timer 1.

Determining the auto-reload values for a specific baud rate is discussed in Serial Port Operation; the only difference is that in the case of Timer 2, the auto-reload value is placed in RCAP2H and RCAP2L, and the value is a 16-bit value rather than an 8-bit value.

NOTE: When Timer 2 is used as a baud rate generator (either TCLK or RCLK are set), the Timer 2 Overflow Flag (TF2) will not be set.


<<< Click here to come back on (8052 - Addition Features / Tutorial)

<<<<  Back to 8051 / 52  Microcontroller Tutorial