??? 02/28/06 10:11 Read: times |
#110909 - PWM with PCA (P87C51FA-4B,Assembler) |
Hi!
I have a problem with PWM-generation with the PCA (Programmable Counter Array) in P87C51FA-4B MCU. The PWM-generation already works, but I can´t force the output pin for PWM-Signal to 0. I ever can detect a short 1-phase. This is because the constraint for the compare-function is compre-value (CAPLn) greather or equal than timer-value. So I ever get a short 1 also when I use FF as compare-value. For my application I need a clean 0-level. My idea was: mov A,myValue ; load compare-value jz f1_aus ; is compare-vlaue = 0? mov CAPH0,A ; to PCA-Array (8Bit PWM) mov CAPM0,#%01000010 ; turn 8-Bit PWM on ljmp f1_end ; jump over switch PWM off f1_aus: mov CAPM0,#%00000000 ; switch 8-Bit PWM off CLR P1.3 ; set PWM-pin to 0 f1_end: I have tryed many other combinations, but without any success. I need a example for my problem. Is someone here, who have one? Thanks in advance, Daniel PS: In the PCA Cookbook I can´t find a solution for my problem. |
Topic | Author | Date |
PWM with PCA (P87C51FA-4B,Assembler) | 01/01/70 00:00 | |
if this is what you mean![]() | 01/01/70 00:00 |