2 Implementation
It is possible to implement the 1-Wire protocol in software only, without using any special hardware. This solution has the advantage that the only hardware required is one general purpose I/O pin (GPIO). Since all GPIO pins on the AVR are bi-directional and have selectable internal pull-up resistors, the AVR can control a 1-Wire bus with no external support-circuitry. In case the internal pull-up resistor is not suitable for the current configuration of the host, only one external resistor is necessary. This solution uses the GPIO falling edge interrupt to capture the falling edge of the 1-Wire bus and then implements the protocol in the interrupt handler.