[Tinyos-help] 128 kHz clock
Michael Schippling
schip at santafe.edu
Mon Mar 12 13:36:44 PDT 2007
I -was- going to say you're in luck because I just modified my
mica (atmega) code to use two of the timer/counters as PWM
and frequency generator outputs...however you are using the
"other" chip. (If anyone wants this, just ping me...I'd post
it, but it's pretty ugly, undocumented, and special purpose).
A quick look at the MPS430 user's guide shows that there are
two internal timers that are purported to be capable of producing
PWM outputs...but I can't find anything that says to what pins
of the chip such output might be sent. In fact I can't find any
pinouts at all, so there must be a doc specific to the actual
chip you are using. Reading up on TimerA and TimerB for your
chip should help with your problem. Probably one of them is
used for internal TOS timing, so you will have to figure out
what resources are available.
The T/C modules are so general purpose as to be incomprehensible.
But the basic idea would be to setup one timer in a repeating mode
counting from the system clock. Then fiddle with the pre-scale
divider and the on and off count settings in order to get the
freq and pulse width that you want. The payoff is that, after
the setup, it's all done in hardware so there is no processor
overhead once it's running.
MS
Nicolas de Vicq wrote:
> Hello,
>
>
>
> I’m working with TinyOS 1.1 on a small sensor node using the MSP430
> microcontroller. I need to provide a 128 kHz clock to my front-end chip
> (chopping amplifier). So, I want to take the 8 MHz signal from the
> MSP430 XTAL input and to divide it by 64 for having the 128 kHz.
>
>
>
> It seems to be impossible to achieve a clock bigger than 1 kHz in TinyOS
> 1.1… but I have to ! :o)
>
> Somebody can explain me how to do that ?
>
>
>
> Thanks in advance !
>
> NDV
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at Millennium.Berkeley.EDU
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
More information about the Tinyos-help
mailing list