[Tinyos-devel] ATmega128 I2C and external pulldown
David Gay
dgay42 at gmail.com
Fri Mar 13 12:22:34 PDT 2009
The ATmega128 I2C code in tos/chips/atm128/i2c was hardwired (in
Atm128I2CMasterPacketP.nc) to assume no external pulldown. This is
problematical when using the mts300 sensorboard, which does have a
pulldown...
Fix: I've made the I2C check for an ATM128_I2C_EXTERNAL_PULLDOWN
#define to specify the presence/absence of the pulldown (defaults to
absent if symbol not defined).
Justification for #ifdef rather than an interface change:
- backwards compatibility
- the presence or absence of the pulldown is fixed by the attached
hardware, thus there's little obvious need or advantage in providing
software control
If someone wants to change the interface instead, go ahead, but please
change the mts300 sensor board to match, and email me so I can update
the TinyOS Programming example that uses the mts300 microphone (which
doesn't go via the mts300 sensor board code, as it's an example of
low-level access...).
FWIW, I don't know if the mts300 microphone code ever worked before
this change (I would have to assume it didn't), or if it works now...
David Gay
More information about the Tinyos-devel
mailing list