Electronic – How to detect 1-Wire peripherals without constant polling

1-wireinterruptsmicrocontroller

I'm looking to bit bang 1-Wire from an Atmega uC. My design calls for the Atmega (acting as Host) to detect the presence of a single 1-wire eeprom when it's physically connected to the uC.

I don't want to continually poll the line, as that seems a waste of battery. I've not used 1-wire before, so I might be missing something obvious; for instance, can a peripheral assert a logic low on power up that I could use as an interrupt to wake the uC?

(I'm working on the assumption that the eeprom will be powered by the uC over the data line).

EDIT: I'm thinking something like this: http://datasheets.maximintegrated.com/en/ds/DS28E05.pdf

From what I understand, it will respond after the bus master initiates a reset pulse. But, this gets back to the polling method, which I don't want to use.

Does applying power to the EEPROM "look" like a reset pulse to it? (I doubt it).

Best Answer

If memory serves, one-wire devices define a reset pulse is any low pulse longer than a specified duration (I think about 600us) with no maximum duration. Being unplugged for four months and then having voltage applied would qualify as a 10,368,000,000us low pulse, which is certainly longer than 600us. Consequently, the devices generally assert a "presence" pulse shortly after power is first applied. Depending upon contact bounce, it is possible that touching a device may not cause a clean reset, in which case one might possibly not get the "present" pulse, but I've found that triggering on a falling edge triggered by a remote device seems to be pretty reliable.