On Sat, 25 Oct 2008, Piclist Vanzo wrote: > I use it to write and read floats to an external eeprom via I2C. > Everthing is fine if I already have data on the eeprom. But with a new > one it reads NaN (not a number) and I don't > have no idea of how to detect it. > Would like to check on setup and put in all 0x0000. I haven't used C30 but you might find something like "isnan" in math.h. so you would do something like: _long.data = HDReadI2CFloat(ControlByte, HighAdd, LowAdd); if (isnan(_long.data)) { _long.data = 0; } if there is no "isnan" you could instead try: if (_long.data != _long.data) Regards Sergio Masci -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist