Microprocessor Systems Course (EC 482)
Tutorial 6
Q1- If the 16550 is to generate a serial signal at a baud rate of 2400
baud and the baud rate divisor is programmed for 16, what is the
frequency of the signal?
Answer
The frequency of the signal: 2400 x divisor rate = 2400 x 16 = 38,400 Hz
Q2- Hundred characters are serially transmitted per second using
16550 PCI. Each character consists of 1 start bit, 8 data bits, 1
parity bit and 2 stop bits. Sixteen clock periods per bit time are
used. Calculate the Baud Rate (B), the bit time, clock period per
bit time and the data rate.
Answer:
B = 100 characters/s × 12 bits/character = 1200 baud
Bit Time = 1 / Baud rate = 1/1200 = 0.000833 seconds
clock periods = Bit time / 16
Data Rate = 100 characters/s × 8 data bits/character = 800 bits/s
Q3- Sketch the logic waveform appearing at the output of the
UART when it transmits a character ' A ' at a baud rate of
9,600 . The sketch should show the bit durations in
microseconds, in addition to the waveform. The frame format
is of 1 start bit, 8 data bits, an odd parity bit, and 2 stop bits.
Hint character A in ASCII Hexadecimal (41)
Answer:
Bit duration = 1/Baud rate =104.17 microseconds
1. Start Bit: Low (0) for one bit duration
2. Data Bits: The binary representation of 'T' is 01000001.
- Bit 1: high (1) for one bit duration.
- Bit 2: low (0) for one bit duration.
- Bit 3: low (0) for one bit duration.
- Bit 4: low (0) for one bit duration.
- Bit 5: low (0) for one bit duration.
- Bit 6: low (0) for one bit duration.
- Bit 7: high (1) for one bit duration.
- Bit 8:low(0) for one bit duration.
3. Parity Bit: high (1) for one bit duration.
4. Stop Bits: : high (1) for two bit duration
Tutorial 6
Q4- Programming the control Registers and Baud rate generator
for the 16550 PCI having the following specification:
Asynchronous mode, 8-bit character even parity, 2 stop bits,
38400 baud.
Answer: The Baud rate can be calculated as: 18.432MHz/ ( 16*divisor rate)
MOV AL, 10011111 ; enable Baud divisor
OUT LINE, AL
MOV AL, 120 ; program Baud rate
OUT LSB, AL
MOV AL, 0
OUT MSB, AL
MOV AL, 00011111B ; program 7 data bit; odd parity
OUT LINE, AL ; &1 stop bit