How many pins can I PWM at one time with the MSP430G2253. Where in the device spec is that stated/
Regards,
Randy
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.
How many pins can I PWM at one time with the MSP430G2253. Where in the device spec is that stated/
Regards,
Randy
Hi Randy,
This is not something that is given as an explicit specification, but rather inferred from the timer peripherals on-board and the amount of capture/compare channels that are routed out to pins.
For example, take a look at the MSP430G2253IRHB32 which is the 32 pin QFN package flavor of the G2253 MCU. You will see that there are 2 TimerA peripherals with 3 capture/compare channels each with all of these signals being routed out to pins on the device (this is confirmed by the TAx.x pins on the device pin-out in the datasheet). For a timer peripheral, one of the capture/compare channels sets the PWM frequency while the others can be used as PWM signals. So in that case, you can PWM 4 signals at once with 2 unique frequencies (one for each Timer on chip).
If you need additional information, please refer to the TimerA chapter in the device family user's guide.
Best regards,
Matt
Thanks Matt,
I should have stated in my question, can the 20 pin version of G2253 PWM on three pins.
Regards,
Randy
Randy,
According to the pin-out, there are 5 CC channels that are routed out to pins so you would be able to PWM 3 signals at once with 2 unique frequencies.
Best regards,
Matt
Matt,
So it's not possible to have three individual PWM signals in the 20 pin package. Do you know of anyone that attemped to do that? I'm trying to control a RBG LED.
Regards,
Randy
Then you don't need three frequencies. Controlling the duty cycle on three pins, each with the same frequency should work fine for an RGB LED.
Thanks again Matt,
Last question:
I've seen code on the web with two Pins. I'm not sure how to do the three pins. Is that dne using CCR0,CCR1,CCR2 with the timmer in continuous mode?
Regards,
Randy
Randy,
You can refer to the PWM example code provided in the TI Resource Explorer for examples of how to properly initialize PWM on the MSP430G2253. For example, msp430g2xx3_ta_16.c shows how to set up a 75% duty cycle PWM signal on TA1 CCR1. In order to do 3 PWM signals on the 20 pin package, you would have to use TA1 CCR1, TA1 CCR2, and TA0 CCR1.
Best regards,
Matt
**Attention** This is a public forum