0 Replies Latest reply on Oct 15, 2020 11:06 PM by NoTa_4591161

    Let's make LED roulette on PSoC 4 for LED test

    NoTa_4591161

      Hi all,

       

      In order to study how to turn on and control many LEDs, I created a board with a matrix. I decided to make a roulette wheel using 36 LEDs. This time, it will be a program to test this LED display board.

       

      The environment used is as follows:

      PSoC Creator 4.3

      CY8CKIT-044

      36 LEDs are mounted on the Arduino board, and 12 GPIOs are used to configure a 6x6 matrix. The circuit looks like this:

      1.png  

      The actual Arduino board was made as shown in the picture below. There were quite a lot of wiring and it got messed up.

        2.png 3.png

      The circuit creates a counter to count 6 by combining the components of Coutner and Compare in column side. It is used to select the De-Multiplexer to select the output. The row side of the LED matrix is switched half alternately after 6 counts. As a result, the lighting of the three LEDs moves to shift. This will ensure that the LED board wiring is correct. The circuit and pin layout are as follows.

      4.png 

      5.png

      Since the purpose is to check the lighting of the LED, the PWM output is set to a slow frequency with a 5KHz clock as the input.

      6.png 

       

      The program just starts PWM_1.

       

      #include "project.h"
       
      int main(void)
      {
          CyGlobalIntEnable; /* Enable global interrupts. */
       
          /* Place your initialization/startup code here (e.g. MyInst_Start()) */
          PWM_1_Start();
          
          for(;;)
          {
              /* Place your application code here. */
          }
      }
      

       

      If the connection is successful, the lights will be as shown below. 

      8.png

       

      Thanks,

      Kenshow