Hi,
I am using MSP430F5328 controller.
I need to dim the LED brightness.
Could anyone please suggest how i can implement dimming LED using MSP430F5XX controller.
Regards,
Johnson
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
I am using MSP430F5328 controller.
I need to dim the LED brightness.
Could anyone please suggest how i can implement dimming LED using MSP430F5XX controller.
Regards,
Johnson
Hi Clemens,
Thank you so much. I am able to dim the LED based on example code.
I have to set PWM frequency to 900 Hz. Could you please help to calculate the PWM frequency.
This is basic math: If your SMCLK runs at 1MHz and you source the timer from SMCLK without any divider and want to have 900Hz as PWM base frequency, simply calculate:
1,000,000Hz / 900Hz = 1111
So your CCR0 value is 1111 (or 1110 because the timer requires one clock cycle to jump back to 0 in up mode) and your CCRx value can vary up to this value for the duty cycle.
Dennis
Hi,
Sorry I haven't seen i was external crystal of 16MHz.
I am able to set 900Hz successfully.
Thank you so much :)
**Attention** This is a public forum