Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/21/08 08:16
Modified:
  06/21/08 09:40

Read: times


 
#156085 - Easy PCA Question SILABs 8051F04x
Hi all

Due to the limitations of the Crossbar in the Silabs devices. I have ended up in the situation where I have hardware that uses a PWM output on PWM_1 and I would like to use the PWM0 pin as a digital output.

According to the documentation (and I quote pg 206 of the datasheet) "Writes to the port registers (or associated Port Bits) will have no effect on the states of these pins" - Bugger.

Anyway, I thought that I could program around this limitation by simply setting the duty cycle of PWM0 to either 100% or 0% and then it is affectively what I want, albeit a little slow, at least my hardware would work.

Now the question is,

How do I do this?

This is what I have
PCA0CPM0 = 0X42;
PCA0CPH0 = 0xFF;





Then to either enable the output I set
PCA0CPH0 = 0x00;


or to disable the output I set

PCA0CPH0 = 0xFF;



Seems easy. However it doesn't work. any ideas? I thought that the output may flicker at the upper limits and then I could simply turn the ECOM0 off to stop the compare happening once it was set.


Turning off ECOM0 is done by setting PCA0CPM0 &= ~0x40;

Thanks in advance

Regards

Marshall



List of 5 messages in thread
TopicAuthorDate
Easy PCA Question SILABs 8051F04x            01/01/70 00:00      
   without investigating the issue ...            01/01/70 00:00      
   ECOM0 works            01/01/70 00:00      
   Thanks - It works - Sort of            01/01/70 00:00      
      External Pullup worked            01/01/70 00:00      

Back to Subject List