- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
The actual Arduino board was made as shown in the picture below. There were quite a lot of wiring and it got messed up.
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.
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.
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.
Thanks,
Kenshow
- Labels:
-
PSoC 345 LP