[Tinyos-help] TinyOS 2.x how best to support timers

2005-12-15 Thread Cormac Duffy
HI, I am porting tinyos 2.x to the dsys25z, its a platform very similar
in architecture to the miaz, in that it has an atmega128 processor and a
cc2420 radio. Unfortunately the architecture doesnt support a 32khz
external oscillator to externally clock timer0 as in the case of the
micaz. After looking up the atmega128 source tree i noticed that the
AlarmCounterMilliC.nc passes in prescaler values directly to the
hardware components, so there seems to not be too much flexibilty,
unless I change that file (obviously any changes I make I would like to
just keep to my platform directory).  

So i recon because I dont have this 32khz oscillator, i cant prescale
the timer to a millisecond, so i suppose the best thing to do would be
prescale the 8mhz oscillator as far down as i can and use a variable to
prescale the rest maybe interrupt it processor when it reaches a number
or something. Any advice for implementing it, it terms of specific
components i should use where to put the director wise etc. Alss the
best Cormac
   

Cormac Duffy B.Sc, M.Sc Computer Science Dept. University College
Cork, College Rd., Cork, Ireland. 

email: [EMAIL PROTECTED] telephone: 0872039750 


___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] TinyOS 2.x how best to support timers

2005-12-15 Thread Cory Sharp
I'm more of an MSP430 guy, so others can comment better about
particular choices for the ATMega128 platform.

But from the sound of it, yes, scale the 8MHz clock down.  If you
scale to some precision that isn't 32khz or microseconds, then define
a custom timer precision tag for it in your platform.  Then use the
timer library helper components -- specifically, TransformCounterC and
TransformAlarmC -- to convert it the rest of the way to 32khz.

See TEP 102 Timers in tinyos-1.x/beta/teps/.

Hope that helps, best,
Cory

On 12/15/05, Cormac Duffy <[EMAIL PROTECTED]> wrote:
> HI, I am porting tinyos 2.x to the dsys25z, its a platform very similar
> in architecture to the miaz, in that it has an atmega128 processor and a
> cc2420 radio. Unfortunately the architecture doesnt support a 32khz
> external oscillator to externally clock timer0 as in the case of the
> micaz. After looking up the atmega128 source tree i noticed that the
> AlarmCounterMilliC.nc passes in prescaler values directly to the
> hardware components, so there seems to not be too much flexibilty,
> unless I change that file (obviously any changes I make I would like to
> just keep to my platform directory).
>
> So i recon because I dont have this 32khz oscillator, i cant prescale
> the timer to a millisecond, so i suppose the best thing to do would be
> prescale the 8mhz oscillator as far down as i can and use a variable to
> prescale the rest maybe interrupt it processor when it reaches a number
> or something. Any advice for implementing it, it terms of specific
> components i should use where to put the director wise etc. Alss the
> best Cormac
>
>
> Cormac Duffy B.Sc, M.Sc Computer Science Dept. University College
> Cork, College Rd., Cork, Ireland.
>
> email: [EMAIL PROTECTED] telephone: 0872039750
>
>
> ___
> Tinyos-help mailing list
> Tinyos-help@Millennium.Berkeley.EDU
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>

___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] TinyOS 2.x how best to support timers

2005-12-15 Thread Cory Sharp
On 12/15/05, Cory Sharp <[EMAIL PROTECTED]> wrote:
> See TEP 102 Timers in tinyos-1.x/beta/teps/.

Check that, see tinyos-2.x/doc/.

- Cory

___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help