Well, with everything else fixed in my empegs (except for one missing cs4231a chip..), I figured I may as well fix the "broken" ds1821 temperature sensors in a couple of them.

The chip isn't really broken, it's just confused -- it thinks it is a thermostat rather than a temperature sensor. To get it back into sensor mode, it has to be re-configured.

This requires a special reprogramming sequence, whereby pin-8 is temporarily grounded while software pulses pin-2 (DQ) low 16 times, and then pin-8 is set to +5V. Software must then write the configuration register of the device to have it remember the setting for subsequent power-ons.

So I wrote a small addition to Hijack to handle the reprogramming, including a prompt for me to switch the voltage on pin-8, and then wired up a 3-pole switch to handle the hardware side. The switch and stuff get removed again once the operation has succeeded.

It worked great on my first unit. Now I just have to identify which other ones also require the fix.

Cheers


Attachments
b.jpg

Description: Pin-8, lifted and wired to the switch instead of Vcc.

a.jpg

Description: The switch, with a debounce resistor and jumpers to +5V and GND.