Look back a bit on this list. I think TimerJiffy is what you want to
generate a 32Khz signal. You may also be able to setup one of the
internal counter/timer components to do the job (which is probably
what TJ does anyway...) See the controller's manual for details.
On the ATMEGA it is possible to run the ADC at those rates with
the right pre-scaler setting. You just want to make sure the clock
rate and setup take less time than the 32Khz pulse.
ADCControl.setSamplingRate(uint8_t rate); sets the pre-scaler, but
I'm not sure I'd believe the comments w/o checking against the manual.
This is all T1 advice...
MS
Fernando Brunetti wrote:
Hi everybody,
I am trying to interface an ad-hoc sensor which has strict timing
requirements. First, i have to generate a 32kHz clock signal for the
sensor, and be able to do adc at the same frequency.
The first problem is that with TinyOS 1.0, I just can cause
interrupts with the timer component every millisecond and this is not
enough.
So, here are my questions:
What is the most convenient way to do it? What about writing a C
Macro to interact directly with the HW?
If I use TinyOS 2.0, am i going to be able to generate this 32kHz
signal to interface the sensor using the new timer components of this
version?
Thank you in advance.
Fernando
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help