Let's make the dice of seven eyes on PSoC 4 for LED test

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Kenshow
Level 8
Level 8
Distributor - Marubun (Japan)
50 solutions authored 25 solutions authored 10 solutions authored

5.pngHi all,

The electronic dice I posted last time was very popular. Many people have requested that we make on PSoC 4 version, so I made it based on CY8CKIT-044. I have also created a new LED lighting board. This time it is based on Arduino. Before introducing the actual electronic dice program, I will first introduce the program for hardware confirmation. If you make a mistake, it will be difficult to debug, so please use this LED test program as one of the electronic dice courses. Here I make a roulette to check the lighting of each LED.

1.png

The environment used is as follows:

PSoC Creator 4.3

CY8CKIT-044

The block diagram of the hardware is the same as the 7 eyes dice. In the case of dice, the decoding part is changed and timer control is performed by S/W. This time it's an LED test, so it's for confirming that all the LEDs are lit properly.

The H/W block diagram is shown below. I will explain in order from the right of the block. The LED part is the Arduino custom board.

2.png

The LED parts are connected to the Arduino connector on the kit. The circuit of the connector and LED used is shown below.

3.png

  4.png

5.png

By using the demux component for the counter value, the decoder section can shift the blinking of the LED by one each time it counts up. Since the LED lights up at Low, the output is inverted.

The counter uses the Basic Counter component and the Digital comparator component in combination. Resetting the counter with a count of 5 represents a Modulo 6 counter.

The whole circuit is as follows.

6.png

The timer for period adjustment is PWM. Use HFClk divided by 10 KHz as the clock source. The setting of PWM_1 is as follows.

7.png

The program is only the start setting of 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. */

    }

}

/* [] END OF FILE */

Run and check everything when the LEDs light up like a roulette wheel shift. If it does not blink or if the operation is strange, check the H/W of your custom board.

Thanks,

  Kenshow

1 Reply
Aashita_R
Moderator
Moderator
Moderator
50 likes received 100 solutions authored 250 replies posted

Hi NoriakiT_91​,

Thank you for your contribution to the community. It is really thought processing.

Best Regards,

Aashita