Hi Steve,
I have a couple of more questions regarding I2C slave. I used your code and
it worked out of the box for tmotes. 

I tried to reproduce your code for tinyos-1.x using the primitives in 
MSP430I2CM.nc file. Actually my system is written in tinyos-1.x so I prefered
using it. Though the writes from the master generates an interrupt
at the slave, a read request doesnot generate any interrupt. Can you suggest
what could be the possible cause for it.


Do you know what the max speed of communication over I2C is that the MSP430
can support. How do we vary the speed ?

Thanks a lot for your help,
Nilanjan 


Quoting "R. Steve McKown" <[EMAIL PROTECTED]>:

> On Thursday 28 September 2006 03:42 pm, [EMAIL PROTECTED] wrote:
> > Hi,
> > Is there any code in the tinyos tree for the tmote to act as a I2C slave.
> > I could find code (MSP430I2CPacket) for it to act as I2C master.
> 
> You might want to check Boomerang; it apparently has features for the TMote 
> platform not in vanilla TinyOS.
> 
> I recently hacked on the current development snapshot of TinyOS-2.x to add
> I2C 
> slave support for MSP430.  It might work on TMote without changes. The code 
> is ugly, put together quickly to help me understand some I2C mechanics.  I'm
> 
> not up to speed on I2C, and this code is surely not the right way to 
> integrate slave support.  But it might be useful as a guide.  I've attached a
> 
> tar.gz file with the code.  I'm not sure it's kosher to send attachments to 
> the list -- please send flames my way if not.
>  
> The MSP430's I2C hardware peripheral is super easy to use as a slave.  Just 
> initialize slave mode by calling:
> 
> Create an Msp430I2CConfigure component having the correct slave address in
> the 
> msp430_i2c_config structure's i2coa field.
> call HplI2C.setSlaveMode();
> call HplI2C.setReceiveMode();
> call HplI2C.enableTransmitReady();
> call HplI2C.enableReceiveReady();
> 
> I hacked the above into a copy of Msp430I2CP.nc as a new command 
> I2CSlave.listen().  Then, in the same component, I2CInterrupts.fired() will 
> call nextRead() and nextWrite() as the I2C hardware exposes requests from a 
> master targeting the slave.  These two functions can signal new I2CSlave 
> events to either send I2C data from the bus to the app or vice versa, as 
> required.
> 
> Steve
> 




-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to