SLAAEC7 September   2024

 

  1.   1
  2. Description
  3. Required Peripherals
  4. Compatible Devices
  5. Design Steps
  6. Design Considerations
  7. Software Flow Chart
  8. Application Code
  9. Hardware Design
  10. Results
  11. 10Additional Resources
  12. 11E2E
  13. 12Trademarks

Description

The Connected Diode Matrix example demonstrates how to use a matrix format to reduce the number of necessary GPIO pins when using six or more LEDs. This specific example uses nine LEDs and six GPIOs to form and control a 3 × 3 LED matrix. The matrix format creates a grid that uses two GPIOs per LED (or diode). This format is especially useful when creating a sign or display out of LEDs. The GPIO pins for the LED matrix are divided into row and column pins. When the row pins connect the cathodes of the LEDs, as Figure 1-1 shows, the matrix is a common row cathode. Common row anode is when the row pins connect the anodes of the LEDs. Depending on the configuration of the LEDs in the LED matrix, the row and column pins are set to active high or active low. For this subsystem example, the row pins are active low and the column pins are active high. For the LED matrix to function properly, the LEDs in the matrix must be controlled one row at a time. The application code for this example uses a state machine to cycle continuously through the rows to turn the LEDs on and off.

MSPM0G3507SRGE Subsystem Functional Block DiagramFigure 1-1 Subsystem Functional Block Diagram