SCLA077 September   2024 TPLD1202 , TPLD1202-Q1

 

  1.   1
  2. 12
  3.   Trademarks

What are 7-Segment Displays?

7-segment displays are simple LED configurations that display single numerical characters and a limited selection of letters, such as can be found in digital clocks, microwaves, or calculators. Typically, in these devices, multiple 7-segment displays are used to display a multi-digit number, with each 7-segment display showing one number.

Each 7-segment display has at least 8 inputs – one for each LED, and a power input. Circuits using multiple 7-segment displays need progressively more inputs for each display used. If each input were controlled directly by a microcontroller, this can use at least 28 GPIO pins for a simple 4-digit clock. To reduce the GPIO requirements, IO expander such as shift registers can be used to control multiple display inputs using fewer microcontroller outputs.

TI programmable logic devices (TPLD) can be used to integrate IO expansion function with control logic before outputting to a 7-segment display. This allows designers reduce the necessary size and function of the MCU.

Using I2C GPIO Expansion in TPLD

One method of controlling a 7-segment display using fewer IO pins is I2C addressing. Some devices within the TPLD portfolio such as the TPLD1202 have integrated I2C registers that can be programmed using an MCU. These internal registers can be connected to the TPLD IOs to drive a 7-segment display. The configuration of an I2C block in InterConnect Studio is shown in Figure 1.

 Simple I2C GPIO Expansion in ICSFigure 1 Simple I2C GPIO Expansion in ICS

Multiple TPLDs can be configured with different I2C addresses and connected to the same I2C input to allow for further GPIO expansion. Each TPLD can either be configured with a different I2C address, or can have a different I2C address set through hardware. This allows for control of multiple 7-segment displays using only 2 I2C pins from the MCU, as shown in Figure 2.

 Multiple I2C GPIO Expanders in ParallelFigure 2 Multiple I2C GPIO Expanders in Parallel

Using a State Machine in TPLD

Another method of controlling a 7-segment display using fewer IO pins is to use the TPLD’s state machine. This allows for less direct control of a 7-segment display than using the I2C method, as the MCU cannot directly write to the 7-segment display, but can allow the TPLD to control the display less external direction. Figure 3 shows a configuration that uses the state machine to display a count down from 3 that reduces after a triggering signal is sent. Unlike the I2C method, this configuration requires only a single external line and does not need to be in any communication protocol.

 Simple State Machine in
                    ICS Figure 3 Simple State Machine in ICS

This method also allows for more complex designs using the internal logic elements of the TPLD, such as the controller shown in Figure 4. In this design, when an input signal is sent, the devices sets the display to output “3” and counts down to 0 over the course of 3 seconds.

 State Machine with Integrated
                    Control Elements in ICS Figure 4 State Machine with Integrated Control Elements in ICS

Building a Comprehensive Controller

Advantages of TPLD in controlling a 7-segment display include:

  • Integrates multiple controlling elements into a single device
  • Reduces the BOM of the system and reducing board space requirements
  • Allows for a limited amount of independent control of the display

These advantages are exemplified in the configuration shown in Figure 5. In this configuration, the 7-segment display is directly controlled by I2C, but after 5 seconds of no new I2C command being received, the display can instead cycle through the message “NO I2C” until a new I2C command is sent.

 Comprehensive 7-Segment
                    Display Controller with Integrated I2C and State Machine Control Schemes Figure 5 Comprehensive 7-Segment Display Controller with Integrated I2C and State Machine Control Schemes

TPLD allows for the integration of multiple logic and signal handling blocks into a single device. This can reduce the total design size while also offering new capabilities for designers to utilize. For more information on TPLD, visit the TPLD1201 product page or ask our engineers a question on the TI E2E™ Logic Support Forum.