LCD, Keyboard & USART
LCD, Keyboard & USART
• Clock Generator
– The clock generation logic consists of synchronization
logic for external clock input used by synchronous
slave operation, and the baud rate generator.
• The Transmitter
– The Transmitter consists of a
• Single write buffer
• A serial Shift Register
• Parity generator
• Control logic for handling different serial frame
formats.
• The UMSEL bit in USART Control and Status Register C (UCSRC) selects
between asynchronous and synchronous operation.
• When using Synchronous mode (UMSEL = 1), the Data Direction Register
for the XCK pin (DDR_XCK) controls whether the clock source is internal
(Master mode) or external (Slave mode).
Internal Clock Generation
( The Baud Rate Generator)
• Internal clock generation is used for the asynchronous and the
synchronous master modes of operation.
• The USART Baud Rate Register (UBRR) and the down-counter connected
to it function as a programmable prescaler or baud rate generator.
• The down-counter is loaded with the UBRR value each time the counter
has counted down to zero or when the UBRRL Register is written.
• The baud rate generator output is used directly by the receiver’s clock
and data recovery units.
• External Clock
– External clocking is used by the synchronous slave
modes of operation.
– External clock input from the XCK pin is sampled by a
synchronization register to minimize the chance of
meta-stability.
• The baud rate, mode of operation and frame format must be set
up once before doing any transmissions.
• The baud rate, mode of operation and frame format must be set
up once before any serial reception can be done.
• When the frame type bit is zero the frame is a data frame.