So I have my MSP430 launchpad with g2553 and g2452 lying around for year now and finally have a reason to use it.
I'm a total noob (I mean I programmed some assembler and C in college and know some basic stuff about MCUs but never actually put it to use), but my for my first project I've picked a tough one. That way I'll be challenged and won't get bored.
So I've just bought a motherboard that only has 2 fan connectors on it, but I need at least 4 of those, so I decided to make a fan controller. I could just use some 7805s but what's the fun in that? The idea is to use the inferior msp430g2452 controller from the launchpad to generate 4 pwm channels to control 4 fans by changing the duty cycle with potentiometers.
From what I've found on the internet, you can only have as many PWM channels as Capture/Compare Registers on a timer, but the first one will always be used for frequency and have 50% duty cycle. 2452 has only one timer with 3 CCRs, so I could only use 2 PWM channels. With g2553 in a 20 pin package that number is 3 and for SMD package you could have 4 PWM channels.
But from what I understand from page 6 in tidu761 design guide, you could have as many software PWM channels as you have GPIO pins available. They can all be the same frequency after all, I only need to change the duty cycle.
So far as I keep researching design guides and datasheets I have a few questions:
1) What frequency should I use for PWM? I'm guessing it should at least be outside the audible range, so 25 to 30khz should be fine, right?
2) What pins should I use? I would need at least 4 pins for potentiometers, say P1.0 through P1.3 and 4 pins for PWM, P2.0 to P2.3 would be fine? Or should I use some specific pins?
Thanks for reading this!