Home

Difference between a Counter and PWM in PSoC1

E-mail Print PDF
( 0 Votes )
Question: What is the difference between Counter and PWM user modules in PSoC1?

Answer: In hardware, there is no difference between a Counter and a PWM.  Both are implemented by configuring a digital block as a counter.  The difference is only in the name of the user modules and the APIs.  In PWM, the APIs are named with respect to the functions of a PWM and in Counter, the APIs are named after functions of a Counter. 

You can implement a PWM by placing a Counter user module and bringing out the Compare Out signal of the counter.  The pulsewidth may be modified by calling the Counter_WriteCompareValue API which is the same as the WritePulseWidth API of a PWM.
Comments (0)
Only registered users can write comments!