Hi,
I am using Micaz and Tinyos-2.1.1 together with the MDA300 sensorboard. Taking as base the code from <http://tinyos.cvs.sourceforge.net/viewvc/tinyos/tinyos-2.x-contrib/uoit/mda 300ca/> http://tinyos.cvs.sourceforge.net/viewvc/tinyos/tinyos-2.x-contrib/uoit/mda3 00ca/ , I am actually trying to complete the driver for controlling the 8-Channel Digital I/O. On MDA300 the hardware component proposed for the 8-Channel Digital I/O is the PCF8574A and its work via the I2C interface. Two of the 8 channels are used for controlling two Relays. In order to control the I2C bus I am using the codes from .tos\chips\atm128\i2c (by the way, I have downloaded the last version from the trunk). At power on, the 8 channel ports on the PCF8574A are high (value 0xFF) I have no problem in reading the data from the device, once an Interrupt change from high to low the correspondent pin on the 8 channel ports, but the problems arise when I try to write on the device in order to control the two relays. In this case the PCF8574A stop to work. I am sure is not a hardware problem, because with the Tinyos-1.x everything is working properly. In order to debug the problem I check the Atm128I2CMasterPacketP.nc file, but apparently everything goes smoothly being the status codes called by I2C.status the proper ones (table 88 - Status Codes for Master Transmitter Mode in the ATmega128 Manual) along the writing process. So, I presume that something wrong is happening after data has been transmitted and ACK has been received, thus during and after the STOP condition is sent. Also I have noted that the data is reaching the device, because I verified that the correspondent bit on the PCF8574A port is effectively changed, but after that the device become irresponsive. Also, if I try to write the default value (0xFF) and in this case everything go fine and the device keep working. Somebody has any idea how to solve the problem? There is a way with the Atm128I2CMasterPacketP to check the status just before and after the STOP condition is sent? I should check with an oscilloscope the I2C behaviour, but I am not so familiar with them, so I hope to solve the problem in other way. Thank you in advance Franco Di Persio
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
