Parasitic 1wire without external components

Motivation

Have you ever had the need to speak to parasitic-powered 1-wire-devices, but without having brought any electrical components (i.e.: a proper pull-up resistor) with you? Well, I did, since all I had with me was a readily built ATmega8-board, only offering the internal AVR-pullups.

However, these pullups are really weak (about 100kOhm), so the 1-wire-slave wasn't able to draw enough power from the data line while idle. I "solved" this by pulling the line hard to +5V at times, instead of just releasing it, and letting the pull-up resistor pull it up.

This is a really nasty hack, it violates the 1-wire specification, and in the worst case it can probably damage the hardware (because the slave could pull down the line to GND at any time)... But it worked for me

Download
Get the 1wire.c and 1wire.h files.