Successfully reported this slideshow.
Your SlideShare is downloading. ×

Chap_3L08Emsys3ERealWorldInterfacingPart3KeyBoardLCD.pdf

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Loading in …3
×

Check these out next

1 of 22 Ad
Advertisement

More Related Content

Recently uploaded (20)

Advertisement

Chap_3L08Emsys3ERealWorldInterfacingPart3KeyBoardLCD.pdf

  1. 1. 2015 Chapter-3 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 1 8051, AVR, ARM MICROCONTROLLERS AND REAL WORLD INTERFACING AND IOs USING BUSES – Lesson-8 Interfacing examples with keyboard, displays, D/A and A/D Conversions
  2. 2. 2015 Chapter-3 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 2 1. Keyboard
  3. 3. 2015 Chapter-3 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 3 Keyboard Interface to Serial Interface at Microcontroller Processor or Microcontroller SI INTR INTA Keys t0 t1 t2 TxD Debouncer ROM Keycode 8- bit buffer Scan clock, counter, decoder Interface KBINT RxD
  4. 4. 2015 Chapter-3 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 4 Two signals KBINT and TxD from a keyboard controller • KBINT is interrupt from keyboard controller. • TxD is serial UART data output of controller connected to RxD at SI in 8051 or UART Intel 8250 or UART 16550, which includes a 16-byte buffer
  5. 5. 2015 Chapter-3 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 5 Debouncer • Bounces create on pressing─ Each bounce creates a false pulse. • Keyboard controller has hardware debouncer to the care of bouncing of a key.
  6. 6. 2015 Chapter-3 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 6 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.
  7. 7. 2015 Chapter-3 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 7 • 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. Encoder
  8. 8. 2015 Chapter-3 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 8 TxD • The code bits are serially transferred as TxD output
  9. 9. 2015 Chapter-3 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 9 2. LCD display controller
  10. 10. 2015 Chapter-3 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 10 LCD Controller Interface Processor or Microcontroller E Port RS t0 t1 t2 TxDE ROM Display Font table, CGRAM and LCD driver R/W
  11. 11. 2015 Chapter-3 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 11 • 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 • Section 3.3.4 for details. Interface to LCD display controller
  12. 12. 2015 Chapter-3 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 12 3. DAC
  13. 13. 2015 Chapter-3 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 13 • DAC ─ PWM circuit and an integrator. • PWM ─ internal device in a microcontroller • A pulse width register (PWR) is programmed according to a required analog output. DAC using PWM and integrator
  14. 14. 2015 Chapter-3 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 14 • 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. PWM Functioning
  15. 15. 2015 Chapter-3 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 15 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).
  16. 16. 2015 Chapter-3 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 16 DAC Using a DAC external chip Processor or Microcontroller Port WR CS Vref+ Vref- t0 t1 t2 Write data 8- lines Filter OPAMP DAC Chip select Control signal- Write
  17. 17. 2015 Chapter-3 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 17 4. ADC
  18. 18. 2015 Chapter-3 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 18 ADC Using ADC external chip Processor or Micro- controller Port Start ChAddr Vref+ Vref- t0 t1 t2 Read data 8- lines Signal conditioners Multi channel analog sample inputs ADC Ch Addr INTR CS t3 t4
  19. 19. 2015 Chapter-3 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 19 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
  20. 20. 2015 Chapter-3 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 20 n-bit ADC • A four or eight channel ADC is inbuilt in microcontrollers or • an external ADC for example, ADC0808 • Interfacing similar to that to the ports.
  21. 21. 2015 Chapter-3 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 21 Summary We learnt • Keyboard controller and its interfacing • Keyboard units- scan clock, debouncer, encoder, ROM, driver • LCD display controller interface • DAC interface using PWM and integrator • DAC interface using external DAC • ADC interface using external ADC
  22. 22. 2015 Chapter-3 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 22 End of Lesson 8 of Chapter 3 on Real World Interfacing- Part 3

×