2006-06-01 04:34 AM
Problem with understanding function of PCA!
2011-05-17 03:09 AM
Hi all!
I am working with the uPSD3312D and i have a problem with understanding the functionality of the PCA Counter. The PWM is working, but what I am wondering is, why the PWM behaves in a different way to the controlling. For example: The CAPCOMH value is 0xFF, then my PWM output is almost zero. The other way round, with a CAPCOMH value of 0x00 the PWM output is full range. I would be more sensful to me, if it would be the other way round. Is there a hidden register, where the PWM polarity can be changed, or do I have to use an inverter at the output? Thanks harryplotter42011-05-17 03:09 AM
That is exactly what you suspected. If you looked at page 128/231 of the uPSd33xx datasheet. In 8-bit PWM mode, the PWMFm register holds the value for setting the frequency (or period) whereas the CAPCOMHn register holds the value to set the complement of the duty cycle. It is odd but that is how it works.
Han-Way Huang