About the article

Microcontroller Basics Course (5)

the UART, timers and interrupts

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).
Downloading of this magazine article is reserved for Elektor Members only.
Already a member? click here to log in.
Loading comments...