Hello, I am trying to use Raspberry Pi 2's PWM pin to control an LED driver. I am using the wiringpi2 library. The driver needs a PWM frequency of 100Hz to 1KHz. Since I don't have an oscilloscope I cannot see which frequency PWM pin Raspberry Pi 2 is running.
So can anybody tell me what the hardware PWM frequency is on Raspberry Pi 2 by default? And if I can adjust it?
Re: What is the hardware PWM frequency?
My piscope will let you see the frequency.
You don't say if you want a fixed or variable frequency. I.e. do you want to vary the frequency between 100 and 1000 Hz or do you want any fixed frequency within that range.
wiringPi defaults to balanced mode rather than mark space which means the frequency will change with dutycycle. Make sure you use mark space with wiringPi.
You don't say if you want a fixed or variable frequency. I.e. do you want to vary the frequency between 100 and 1000 Hz or do you want any fixed frequency within that range.
wiringPi defaults to balanced mode rather than mark space which means the frequency will change with dutycycle. Make sure you use mark space with wiringPi.
Re: What is the hardware PWM frequency?
Thanks for the piscope recommendation. I don't havejoan wrote:My piscope will let you see the frequency.
You don't say if you want a fixed or variable frequency. I.e. do you want to vary the frequency between 100 and 1000 Hz or do you want any fixed frequency within that range.
wiringPi defaults to balanced mode rather than mark space which means the frequency will change with dutycycle. Make sure you use mark space with wiringPi.
As long as the frequency is fixed between 100Hz and 1KHz when I set the duty cycle, it is fine for me. I don't need a particular frequency.