Home › Magazines › 2002 › May › Microcontroller Basics Course (5)

Microcontroller Basics Course (5)

the UART, timers and interrupts

Published in issue 310, May 2002

The previous instalments of the Microcontroller Basics Course have primarily concentrated on programming languages. Now it’s time to take a closer look at the microcontroller hardware. This instalment deals with the UART, timers and interrupts.The internal serial interface of every 8051 microcontroller makes it possible to create a simple data link to a PC. Since the interface is implemented as an autonomous hardware UART, the processor is scarcely burdened by this task. Bytes are received and sent by the UART operating fully in the background. The only things requiring attention are correct initialisation and the ongoing transfer of data to and from the UART.To understand exactly how the UART is programmed, we need to look at the special function registers (SFR) for the serial interface. To initialise the interface, we must first load SCON register with suitable parameters (see Table 1).

Free downloads

010208-16.zip

Free download

Click below to download a PDF copy of this article from Elektor magazine.

 

Downloads 

PDF Article (e025030.pdf)
10 Elektor Credits
 

Free downloads 

010208-16.zip

Free download

Please note. In view of the complexity of international markets, Elektor cannot guarantee the availability of components for this project.

Spotlight

Design your own Embedded Linux Control Centre on a PC

These days a lot of options exist if you want to control home electrical appliances. This book covers a do-it-your-self system made from recycled components.