??? 03/29/05 07:02 Modified: 03/29/05 07:04 Read: times |
#90577 - Varying both frequency and duty cycle. Responding to: ???'s previous message |
Dear Sushil,
Its not possible to vary both frequency and volume using PCA. Using PCA in PWM mode you can vary the duty cycle but frequency is constant. If you use PCA in high speed output mode or use T2 you can vary the frequency but the duty cycle is 50% [ fixed ]. Here's one method using which you can get both varying duty cycle and frequency. (1) First set the PCA base source as either external event or timer 0 overflow. (1-A) In case of external event use timer 2 to generate required base frequency and tie the T2 output pin to ECI pin. and then run timer two to generate the desired frequency to change the frequency change the timer 2 register values. (1-B) In case of timer 0 overflow set the timer 0 register to get the desired frequency. (2) Next use the PCA module in PWM mode and set the desired duty cycle to control volume. This gives you control over both frequency as well as volume :) Regards, Prahlad Purohit Use PCA in PWM mode and set the desired value in registers for getting desired duty cycle. |
Topic | Author | Date |
PWM generation using microcontroller | 01/01/70 00:00 | |
Whats your intention. | 01/01/70 00:00 | |
PWM generation using microcontroller | 01/01/70 00:00 | |
Freq. or duty cycle or both ? | 01/01/70 00:00 | |
PWM? | 01/01/70 00:00 | |
Amplitude? | 01/01/70 00:00 | |
Amplitude control by PWM | 01/01/70 00:00 | |
I agree... | 01/01/70 00:00 | |
Back to the question | 01/01/70 00:00 | |
Remote hugging.. | 01/01/70 00:00 | |
Sorry guys... | 01/01/70 00:00 | |
PWM generation using microcontroller | 01/01/70 00:00 | |
Not at all! | 01/01/70 00:00 | |
Varying both frequency and duty cycle. | 01/01/70 00:00 | |
possibly this way | 01/01/70 00:00 | |
thanxs but.................. | 01/01/70 00:00 | |
PWM and frequency | 01/01/70 00:00 | |
This thread is fuzzy because | 01/01/70 00:00 | |
Both frequency and amplitude? Yes!![]() | 01/01/70 00:00 |