??? 01/24/11 05:08 Read: times |
#180745 - Silabs PCA Question |
Hi all
I am using the C8051F040 Device from Silabs (although I suspect that all devices will behave the same) I want to change the value of the PCA Registers these are referred to as PCA0H and PCA0L The data sheet for the device on page 315 states that these registers are R/W but I can't change them. Any Idea why? <code> if (pwm_channels[i].sync_mode_active == TRUE){ //fast forward the clock so that we get an immediate match on the next channel, (ie turning it on straight away) PCA0L = pwm_channels[i].pwm_value[1]; PCA0H = pwm_channels[i].pwm_value[0]; } </code> What I am trying to do is set up a TDM (Time Division Multiplex) type arrangement. where I have 100% of time and this is divided into each of 4 PWM channels. As soon as an interrupt fires on channel 1, we immediately disable channel 1 and enable channel 2, changing the PCA registers to ensure that it matches immediately and so on I think that ths concept should work reasonably well, but I can't get the PCA registers to update, they keep on counting merrily. Am I supposed to stop the PCA first? The datasheet didn't seem to say that. THoughts are appreciated. Regards Marshall |
Topic | Author | Date |
Silabs PCA Question | 01/01/70 00:00 | |
the PCA cookbook | 01/01/70 00:00 | |
better asked at the SILabs forum | 01/01/70 00:00 | |
Another Approach May Be Needed | 01/01/70 00:00 | |
Freerunning | 01/01/70 00:00 | |
Thanks - that worked | 01/01/70 00:00 | |
For what it's (sill) worth | 01/01/70 00:00 | |
I tend to recall | 01/01/70 00:00 | |
I do have the WDT running | 01/01/70 00:00 | |
only when watchdog in PCA | 01/01/70 00:00 |