On Thursday 05 October 2006 07:03 am, [EMAIL PROTECTED] wrote:
> I have a couple of more questions regarding I2C slave. I used your code and
> it worked out of the box for tmotes.

Some days you get lucky, I guess.

> 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.

I'm not sure I'm clear on what you are seeing.  Are you saying that a master 
write request triggers an operation at the slave but a master read request 
fails to trigger an operation at the slave?  This would mean a master write 
triggers execution of nextRead() in the slave (via I2CInterrupts.fired()) and 
a master read fails to trigger execution of the slave's nextWrite() (both 
methods in Msp430I2CP.nc).  If this is the case, it sounds like the I2CIE 
(I2C interrupt enable) register may not be set correctly.  The 
Hpl12C.setXXXReady() methods are used to set the bits in this register.

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

Per the data sheet, the MSP430x15x, ...x16x and ...x161x microcontrollers 
support I2C spec v2.1 and only standard mode (up to 100kbps) and fast mode 
(up to 400kbps).  To control the speed, you need to set the various bitfields 
in the msp430_i2c_config structure (see SlaveI2CConfC.nc as an example).  
These bitfields map a clock source with a prescaler, etc. to allow you to set 
the speed of the I2C clock.
_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to