Serial connection of LED display

Z MAM wiki

Přejít na: navigace, hledání

To connect LED display to the microcontroller, we can use different approaches:

  • Static solution: a display is connected directly to the microcontroller (thru current limiting resistors, of course), or via coder or latch - see lecture 5, pages 17 ... 19. Number of connected displays is limited by the number of available ports. Each display requires 4 (in the case of coder usage), or 8 port pins.
  • Dynamic solution: (usually) segment cathodes are connected to single microcontroller port, or decoder, or display driver. Anodes are switched by PNP transistors. At the same time, only one digit is on. The digits are switched on and off sequentially. The required number of wires is 8 + N, where N is the number of digits. Since the digit is lighting just part of a time (1/N is on, and (N-1)/N is off), the segment current must be increased (this is the same principle, as the PWM brightness regulation). However, this is limiting factor as the maximum current of the port, or latches is limited to 50 - 70 mA. See lecture 5, page 20.
  • Serial solution: shift registers are connected to the microcontroller. It ensures the minimum number of wires is required - shift register clock, data, and storage register clock. Data outputs of the shift registers must be supplemented by latches, which ensure that the segments will not blink when data in the shift registers are updated. In this manner is possible to connect theoretically any number of digits in a static manner. It may be implemented by separate shift registers, as 74595, or by special single chip shift register / latch / output driver circuits, as M5450.
  • Serial display drivers: These include, e.g. AS1106, MC14489, SAA1064, ... It is effective, single-chip solution. It combines serial connection of a driver, which requires just two wires in minimum connection (data and clock; it can be eked by chip enable signal), with dynamic control of a display. No, or just single resistor is required. The segment drivers are slew-rate limited to reduce electromagnetic interference (EMI).

We will implement serial solution. One-digit display will be connected to the microcontroller by means of the 74HC595 8-bit shift register with 3-state output registers. This circuit include both serial shift register and output D-latches.

In contrast to previous tasks, it will be completely individual task.

[editovat] Assignments:

  1. Draw the circuit diagram of a one digit LED display serially connected to the microcontroller by means of the 74HC595 shift register.
  2. Write a program in the assembly language, which will periodically display numbers 0 ... 9, and letters A, B, C, D, E, F. The interval between distinct symbols will be adjustable by the matrix keyboard in 10 steps from 0 to 1 second.
  3. Connect the circuit on the breadboard and demonstrate its functionality.

External link: 74HC595 datasheet.

Osobní nástroje