You have to add a pull-up network to both I2C lines Data and Clk. On the MDA300 
board, just put a 10kOhm resistor between the Data and Vcc pins, and another 
one between Clk and Vcc.

Chris

 

________________________________

From: Antonio Prados Vilchez [mailto:[EMAIL PROTECTED] 
Sent: June 27, 2008 7:50 AM
To: Christopher Leung; tinyos-help@millennium.berkeley.edu
Subject: RE: [Tinyos-help] ADC&MDA300

 

Thanks for your help Christopher.

I'm following the steps to read from the ADC ADS7828 in the MDA300 board, using 
the I2C interface. However, event I2CPacket.writeDone never occurs. I thought 
that it could be because of a mistake in my code, but I did a bit of research 
about the sensors of the MTS300 sensorboard which use the I2C interface 
(Microphone and magnetometer). In those components it also happens, the event 
I2CPacket.writeDone is never signaled. Does anybody know how to solve this 
problem?

Thanks in advance.


-----Mensaje original-----
De: Christopher Leung [mailto:[EMAIL PROTECTED]
Enviado el: lun 23/06/2008 18:30
Para: Antonio Prados Vilchez; tinyos-help@millennium.berkeley.edu
Asunto: RE: [Tinyos-help] ADC&MDA300

You also need to use the interface Resource from the Atm128I2CMasterC component.
Here are the steps you will need to do: Resource.request, wait for 
Resource.granted, I2C.write, wait for I2C.writeDone, I2C.read, wait for 
I2C.readDone, Resource.release.  It's important that you release the I2C 
resource especially if you have other components relying on it.
Chris

________________________________

From: Antonio Prados Vilchez [mailto:[EMAIL PROTECTED]
Sent: Mon 6/23/2008 5:16 AM
To: Christopher Leung; tinyos-help@millennium.berkeley.edu
Subject: RE: [Tinyos-help] ADC&MDA300



Thanks for your help, Christopher.

Now I'm trying to use the I2C interface, as you said, but it doesn´t work. I 
get a lot of compiling errors in the I2CPacket and Atm128I2CMasterC files, so I 
think it's because of the instantiation. Am I doing it right? Should I upgrade 
my TinyOS files to a newer version? The way I instantiate these interfaces and 
components is:
-----------
implementation
{
    ...
    components new Atm128I2CMasterC();

    ...       
    App.I2CPacket -> Atm128I2CMasterC;
}

-----------
module SensorToRadioC
{
    uses
    {
        ...
        interface I2CPacket<TI2CBasicAddr>;
    }
}
-----------

Thanks in advance




 

 

________________________________


Este mensaje se dirige exclusivamente a su destinatario, y puede contener 
información confidencial sometida a secreto profesional, o cuya divulgación 
esté legalmente prohibida.Cualquier opinión en él contenida es exclusiva de su 
autor y no representa necesariamente la opinión de la empresa. Si ha recibido 
este mensaje por error, le rogamos nos lo comunique de forma inmediata por esta 
misma vía y proceda a su eliminación, así como a la de cualquier documento 
adjunto al mismo. El correo electrónico vía Internet no es seguro y no se puede 
garantizar que no haya errores ya que puede ser interceptado, modificado, 
perdido o destruido, o contener virus. Cualquier persona que se ponga en 
contacto con nosotros por correo electrónico se considerará que asume estos 
riesgos.

This e-mail is addressed exclusively to the recipient and may contain 
privileged information under a professional confidential agreement or it may be 
against the law to disclose its contents. Any opinion contained in it belongs 
exclusively to his/her author and does not necessarily reflect the company's 
view. If you receive this e-mail in error, please let us know immediately (by 
return e-mail) and proceed to its destruction, as well as any document attached 
to it. The sending of e-mails through the Internet is not safe and, therefore, 
error-free communications cannot be guaranteed, as they can be intercepted, 
changed, misled or destroyed or they might contain a virus. Any user contacting 
us through e-mails shall be understood to be assuming these risks.

________________________________

 

_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to