I need to generate 3 seperate frequencies all with the same duty cycle (50%), I have been playing with a 28X2 but haven't been able to acheive this (it didn't help that I was sent an old 28X2 5V version), so i have been reading the forums and manuals and was hoping someone could clarify my understanding while I wait for the latest 28X2 to arrive.
The 28X2 has 4 PWM pins. C1 and C2 share the same frequency but can have different duty cycles. The same is true for B0 and B5. So this is the solution to getting two of my three frequencies.
Can hpwm then be used to generate the third frequency which will have the same duty as the first two but completely different frequency? I understand that C2 then becomes unavailable when using hpwm but hopefully C1 can have a unique frequency.
Also, if I use hpwm in single mode using only 1 pin, are the other 3 pins available for IN/OUT/ADC, etc?
If not, is there another way to generate the third tone (say 1kHz).
The plan is to combine these 3 frequencies into a speaker to generate a tone.
Many thanks.
The 28X2 has 4 PWM pins. C1 and C2 share the same frequency but can have different duty cycles. The same is true for B0 and B5. So this is the solution to getting two of my three frequencies.
Can hpwm then be used to generate the third frequency which will have the same duty as the first two but completely different frequency? I understand that C2 then becomes unavailable when using hpwm but hopefully C1 can have a unique frequency.
Also, if I use hpwm in single mode using only 1 pin, are the other 3 pins available for IN/OUT/ADC, etc?
If not, is there another way to generate the third tone (say 1kHz).
The plan is to combine these 3 frequencies into a speaker to generate a tone.
Many thanks.