2. Introduction
Embedded Systems talk with the outside world
via peripherals, such as:
• Keyboard
• Displays
• Touch screen
• Discrete IO: General Purpose
Input/Output (GPIO)
• Analog to Digital/Digital to Analog Converters
(ADC/DAC)
9. Contd…
• Two signals generated by the keyboard controller are
– KBINT(Keyboard interrupt)
– TxD (Transmit Data)
• KBINT is the interrupt from the keyboard controller.
• TxRDY is the transmit buffer ready interrupt that has
been sent from controller to the process.
• RxRDY sends the acknowledgement of the interrupt.
10. Debouncer
• Bounces create on pressing─ Each bounce creates
a false pulse.
• Keyboard controller has hardware debouncer to
the care of bouncing of a key.
Scan Clock
• Keyboard controller has counter driven by a scan
clock, which continuously increments at certain
rate and scans each key whether that is in
pressed or released state.
keyboard
11. Encoder
• To encode the keyboard output for a ROM.
• ROM generates the ASCII code output for the
pressed key.
• The code accounts the multiple keys
simultaneously pressed.
• Example, Shift key is also pressed then
generate the code for upper case character.
14. LCD controller ─ A processing element
(single purpose processor)
• 3 bits for E, RS and R/W
• 8 output data.
• One 8-bit port is used for output data for
display.
• Another port is used for 3 bits.
15. Contd…
• Processing element generates all required signals
for LCD matrix displays (multi-lane).
• Interfaces Eight-bit parallel output port B pins
PB0-PB7, which sends commands for
programming the controller and send data for
display.
• Three control signals IO PC0-PC2 as inputs to LCD
controller.
• PB0 to PB7 8 input/output bits for parallel set of
8 IO bits for commands and data
16. Control bits
• LCD controller is sent control words and data
words for initialization and programming by
setting the PB0-PB7, PC0 and PC1 outputs for
each word to LCD controller.
17. Register Select Control bit
• One bit PC0 at an output port for RS(register
select).
• When RS is reset as 0, the PB0-PB7
communicates a control word to control
register of the LCD controller.
• When RS is set as 1, the PB0-PB7
communicates data to LCD controller
18. R/W (read/write) Control bit
• One bit PC1 at an output port
• Set to 1 when status register of LCD controller
is read using PB0-PB7.
• PC1 is reset to 0 when write into LCD
controller using PB0-PB7 bits.
19. Enable Control bit
• After setting R/W, RS and data-bits the LCD
controller enables
• Enables by setting 1 at E pin.
• LCD controller connects to one bit PC2 at an
output port for E (enable). There is an interval
depending on the LCD controller, the controller is
disabled. This is because during this interval, the
LCD controller cannot accept instructions or data
through output of other port pins.
20. CGRAM
• M displayed character ROM addresses.
• M = 128 for 128 ASCII codes.
• For Each distinct ASCII character, there is 64-
bit graphic.
• LCD controller has internal CGRAM (Character
graphic RAM).
• For each ASCII character, 8 bytes are sent from
the ROM to the CGRAM.
23. DAC
• DAC─ PWM(Pulse width modulator) circuit
and an integrator.
• PWM─ internal device in a microcontroller
• A pulse width register (PWR) is programmed
according to a required analog output.
24. PWM functioning
• A counter/timer device, which generates two
internal- interrupts one on timer overflow and
another after an interval proportional to equal
to PWR.
• On first interrupt, the output becomes 1 and
on second interrupt it becomes 0.
25. Integrator
• Generates the analog output as per the period
of output = 1 (period between first and
interrupts) compared to total period of output
pulses (period between successive first
interrupts).
27. ADC
• Start of conversion pulse generator circuit,
• A sample hold amplifier circuit to hold the
signal constant for the conversion period and
signal conditioner
• Voltage references + and − for providing the
reference for conversion of analog input