I need to create 4 different asynchronous pulse waveforms using 4 outputs of an MSP430. The first one is high for 10 minutes, then goes low and the second output starts a minute pulse; then, when the second pulse finishes, the third output goes high for 5 minutes, and so on. What is the best way to approach this problem ?
well, I find it hard to call something that is high for ten minutes a pulse but I guess it’s all a matter of perspective.
read up on how to program the timer. You will probably have to set up a system clock that ticks every couple hundred mS and then just count the clock ticks. Time for 10 minutes, set that output. then time for 1 minute and set that output and so on. I’d use a timer interrupt to get the ticks so you can spend most of the time in a low power state. If running on batteries, you should be able to last for a very long time.
If you have a watch crystal installed you can use the watch dog timer and WDT_ADLY_1000 from the ti code composer thing to setup a 1sec time out eg:WDTCTL = WDT_ADLY_1000;.
After this you need to count 3,600 events for an hour. See slac011h.zip from ti as it has the code fragments you need with the interrupt handlers. Run it in _BIS_SR(LPM3_bits + GIE); mode and the battery will live for ever.