STMicroelectronics AN1753 Software UART Using ST7 12-Bit Autoreload Timer

This application note describes a software implementation of a Universal Asynchronous Receiver/Transmitter (UART) that can be used on devices, like the ST7LITE0, with no on-chip SCI peripheral. In this example, a software UART is implemented for the ST7FLITE0, using the 12-bit Autoreload timer and two I/O ports for asynchronous receive and transmit. The UART software provides features such as half-duplex operation, asynchronous operation, flexible data formats (7 or 8 data bits, 1 or 2 stop bits), and baud rates ranging from 2400 to 19200 baud. The interrupt-driven software UART can be tested using the Hyperterminal application on a Windows PC. The program code is small (357 bytes) and can be easily adapted to specific application requirements.


STMicroelectronics AN1753 Software UART Using ST7 12-Bit Autoreload Timer - cover page
Brand
STMicroelectronics
Category
microcontrollers
Document type
Application Note
Language
English
Pages
22
File format
PDF
File size
174 KB
Published
07 August, 2012
Updated
29 September, 2023
MD5 checksum
671A109D58625CCFE1B97BE33680DFE0

About this manual

This document details a software implementation of a Universal Asynchronous Receiver/Transmitter (UART) designed for ST7LITEO devices that lack an on-chip SCI peripheral. The solution utilizes the 12-bit autoreload timer and two I/O ports to handle asynchronous receive and transmit operations.

The application supports half-duplex and asynchronous operation with flexible data formats, including 7 or 8 data bits and 1 or 2 stop bits. Supported baud rates range from 2400 to 19200. The note provides configuration instructions for the ST7FLITEO, including clock source setup, input initialization, and timer register configuration, along with a functional software flow and test procedures.

What's inside

  • UART Communication
  • RS232 Communication with PC
  • ST7FLITEO Configuration
  • UART Implementation
  • Hardware Setup
  • Functional Software Flow
  • Test Procedure

Specifications

Supported Baud Rate2400 to 19200 baud
Data Bits7 or 8 data bits
Stop Bits1 or 2 stop bits
Operation ModeHalf-duplex
Clock Frequency8 MHz internal clock

Frequently asked questions

What devices is this software UART designed for?

It is designed for devices like the ST7LITEO that have no on-chip SCI peripheral.

What is the program code size?

The program code is 357 bytes.

Which pins are used for transmission and reception on the ST7FLITEO?

Pin PA3 is used for transmission and Pin PA7 is used for reception.

Download PDF (174 KB)

More STMicroelectronics Manuals


View all STMicroelectronics manuals →