2015-09-03 09:50 AM
Hi,
i am searching for a openscource code to dim and change the frequency the leds over a potentiometer on the stm32f4 discovery board. I researched on the net but did not find anything. Can somebody help me please.
Thank You !
2015-09-03 10:13 AM
Assume that everything isn't on the Internet, and sometimes you have to code things to do specifically what you want. The DISCO board doesn't have a pot on it, so it would be hard to assume what specific pin it might attach too.
This STM32F4-DISCO PWM Servo example outputs via the LEDs on TIM4, you could modify this to change the frequency, and duty of the signal driving the LEDs You could add code to use the ADC to read the value from a POT, and translate that into settings for the PWMs2015-09-03 10:18 AM
Hi,
thank you! I have two two extern pot over that i want to dimm the leds and change the frequency (adc..timer..?) can you help how i can modfie the code that or how to implent that?would be great if you can help me.thanks a lot!2015-09-04 10:26 AM
Sounds very homeworky...
The are Standard Peripheral Library examples for the ADC within the F4 DSP and F4 DISCO firmware downloads.The frequency can be changed via the TIM4->ARR register. The duty can be controlled via the TIM4->CCR1..4 registers.