DAC output with timer | Cypress Semiconductor
DAC output with timer
Hi everyone, I am using CY8C27443
My task is to output the DAC value in a period of time (seconds), to be more precise, I attach a picture below
I offset the voltage to 2.5V so in first 100s, the DAC value is 2.05V, after that it's changed to 2.2V and so on (with rate of change equal 1V/s).
I implemented it using the DAC with a 8 bit timer. An interrupt is generated each 2ms, so I can get the 1s period (I attached my prj below). I update my DAC value for each phase. However the output didn't go like the picture but it was only true in the first phase (2.05V in 100s) then it went wrong. To be specific, it went up directly to 3.7V then went down to 2V, then it repeated (sorry the result was on the oscilloscope so I was unable to post it here).
Could you please take a look at my project and tell me what went wrong, thank you very much!