Phil,
I went over tos/lib/tossim/HilTimerMilliC as you suggested, but really am
not too sure of what's actually required to create a new sim interface. I
agree that a component on top of the I2C would be best.
Are there some "key" steps that need to be taken, like:
1) Create sim/ directory in chips/atm128/i2c directory
2) modify .platform in platforms/micaz/sim/ with something
3) what do you recommend including in terms includes(like headers,etc.?),
4) should I modify platform.h with 50kHz (the speed of the I2C bus as
default),
5) If I'm using Atm128I2CMasterC.nc, what should the file be called in the
sim/ directory (or am I looking at making multiple files?)- Atm128I2CMasterP
, Atm128I2CMasterPacketP, HplAtm128I2CBus.nc? I'm not sure which level to
start at and what will actually work (ie, "good enough" to at least be
recognized as valid by the compiler)?
6) (Not really expecting an answer on this one) how much of it do I need to
implement as simulating I2C functionality, vs can just hardcode a dbg
message? I'm less worried about response of i2C device on other end than I
am with timing and that the Atm128L stays active.
Answering these will help me start a new wiki entry to on this topic as I
muddle along.
Regards,
Kurt
----Original Message Follows----
From: Philip Levis <[EMAIL PROTECTED]>
To: KURT PETERS <[EMAIL PROTECTED]>
CC: [email protected]
Subject: Re: [Tinyos-help] TOSSIM Tinyos 2.0.2 with I2C
Date: Tue, 27 Nov 2007 20:18:59 -0800
On Nov 27, 2007, at 7:54 PM, KURT PETERS wrote:
Any tutorials available on how to write a module for TOSSIM? I know
there's a big one for interfacing, but that's not the same thing.
Not really. It seems like something that would be pretty useful, but I'm
pretty time limited these days. It might be a really good tutorial to put
on the doc WG wiki.
My guess is that writing a simulated I2C would be hard, because it has
addresses: you might be better off simulating the component that sits on
top of the I2C. Basically, the way that you make something happen in the
future (e.g., the completion of a split-phase operation) is to put an event
on the TOSSIM event queue.
Maybe the simplest example of this is the TOSSIM implementation is the
timer in tos/lib/tossim/HilTimerMilliC. Note that there's actually a full
implementation of the atm128 timer system, I just dropped this one in when
I was working on some groundwork for supporting other platforms.
Phil
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help