Ece428 Uart
Ece428 Uart
Haibo Wang
ECE Department
Southern Illinois University
Carbondale, IL 62901
1-1
Serial Data Transfer
Asynchronous v.s. Synchronous
— Asynchronous transfer does not require clock signal. However, it transfers extra bits
(start bits and stop bits) during data communication
— Synchronous transfer does not transfer extra bits. However, it requires clock signal
Frame
Asynchronous data
Data transfer
Start
bit B0 B1 B2 B3 B4 B5 B6 Stop bits
Parity
clk
Synchronous
Data transfer
data
B0 B1 B2 B3 B4 B5
11-2
1-2
Overview of UART and RS-232
Signal swing +10V, -10V
UART
RS232
TxD
Trans.shift
Shift Reg.
D[7:0]
Rec. Shift Reg.
RxD
Ground
Standard logic level
Interface Baud
rate ckt.
Most materials presented here are from “FPGA Prototyping by Verilog Examples” by Pong Chu.
You can download the UART chapter of the book at: http://academic.csuohio.edu/chu_p/rtl/fpga_vlog.html
1-3
UART Parameters
1-4
How to Assign UART Parameters
Fix the parameters at the design stage (this example)
Make it programmable with using configuration (mode) register
Example: 8251 chip
7 6 5 4 3 2 1 0 Mode register
1-6
ASMD of UART Receiving Subsystem
FSM (Finite State Machine)
ASM Chart (Algorithmic State Machine)
FSMD (Finite State Machine with Data Path)
ASMD (ASM with data path)
1-7
HDL Coding for UART Receiving Subsystem
The ASMD chart contains four states: idle, start, data, stop
1-8
HDL Coding for UART Receiving Subsystem
Coding for operations within one state
1-9
Clocking Issue of Receiver Design
Functionally OK Better
1-10
Interface Circuit of UART Receiving Subsystem
1-11
Complete UART Circuit
1-12
Configure HyperTerminal to test UART Circuit
1-13