Browse Prior Art Database

Stop Bit Detection for the 8031 Microcontroller

IP.com Disclosure Number: IPCOM000061105D
Original Publication Date: 1986-Jun-01
Included in the Prior Art Database: 2005-Mar-09
Document File: 2 page(s) / 72K

Publishing Venue

IBM

Related People

McDuffie, PK: AUTHOR [+2]

Abstract

Two interrupt routines permit the 8031 microcontroller to detect a stop bit incoming on the serial start/stop interface, when parity checking is "on". In order for the 8031 to receive serial data, onboard Timer 1 is programmed for the specific baud rate of the attached serial data line. Each time this timer times out, the serial port clocks in the next bit. Each character in the data stream is 8 data bits followed by a parity bit, if parity checking is "on", and a stop bit-a total of 10 bits. The 8031 has a 9-bit serial data receive buffer (SBUF). Since a Communication Interrupt occurs after the ninth bit is received, indicating a full buffer, the next incoming bit is not detected. When parity checking is "on", the ninth bit is the parity bit, and therefore the following stop bit is not read.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 52% of the total text.

Page 1 of 2

Stop Bit Detection for the 8031 Microcontroller

Two interrupt routines permit the 8031 microcontroller to detect a stop bit incoming on the serial start/stop interface, when parity checking is "on". In order for the 8031 to receive serial data, onboard Timer 1 is programmed for the specific baud rate of the attached serial data line. Each time this timer times out, the serial port clocks in the next bit. Each character in the data stream is 8 data bits followed by a parity bit, if parity checking is "on", and a stop bit-a total of 10 bits. The 8031 has a 9-bit serial data receive buffer (SBUF). Since a Communication Interrupt occurs after the ninth bit is received, indicating a full buffer, the next incoming bit is not detected. When parity checking is "on", the ninth bit is the parity bit, and therefore the following stop bit is not read. The user has a need to know if that next bit is a valid stop bit, to check for framing errors and break characters. This problem is resolved by a Communications Interrupt routine, shown in Fig 1, and a Time 1 Interrupt, shown in Fig 2, which together permit checking for framing errors or break characters with parity checking either "on" or "off". Fig. 1 shows that when the Communications Interrupt 1 occurs, the byte of data in the SBUF is saved (2) in a temporary location. If parity checking is not "on" (3) there is no parity bit and the stop bit, being the ninth bit, is available and is read (4) and its value checked (5). If the stop bit is 0 (invalid) (5) an error has occurred. The value of the data byte in temporary storage is checked, (6). If the data value is 0, a break has been detected and is signalled (7). If the value of the data byte is not 0, a f...