Wild Results for Zero Cross Timer | Cypress Semiconductor
Wild Results for Zero Cross Timer
I am working on my final project for a PLD course using the CY8CKIT-050BU board. I am trying to create an AC light dimming circuit controlled by the PSoC. The concept is simple and I've got the zero cross detector interrupt working and stable, but every timer/counter combination I've tried to count the wait time before firing the trigger interrupt has had inconsistent timing, resulting in a light blinking in varying intensity. I am testing it with an LED and trigger it on with the Zero Cross interrupt and shut it off with the end of count interrupt. The oscilloscope show that the zero cross is ok, but the wait timer is sporadic, what am I missing? Attached is the latest version of this trouble.