Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
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. See previous post for more details on the design of the "PSoC 4 Seven Eyes Dice". Here, I will describe the addition of the design for sounding the piezoelectric buzzer.
The environment used is as follows:
・PSoC Creator 4.3
PWM (PWM_2) and piezoelectric buzzer (external) were added to the previous circuit. The circuit of PSoC4 is as follows.
The pin assignments are as follows.
The added PWM_2 inputs a 1MHz clock, and the settings are as follows.
The program adds a start API for PWM_2.
uint32_t sw=0; //sw is off (Stop rolling dicce)
CyGlobalIntEnable; /* Enable global interrupts. */
/* Place your initialization/startup code here (e.g. MyInst_Start()) */