Latest News
|NewsletterEdited by Martin Rowe and Fran Granville -- EDN, 9/4/2008
This circuit controls a remote LED display by the 1-wire network through an SPI-compatible display controller.
Many 1-Wire-compatible peripherals are available, but, for those that lack the 1-Wire capability, the circuit in Figure 1, pg 80, illustrates one way to implement it. The example controls a remote LED display by the 1-Wire network through an SPI (serial-peripheral-interface)-compatible display controller.
To produce the three-wire SPI that a MAX7221 display controller requires for the (chip-select), DIN (serial-data), and CLK (clock) signals, the 1-Wire network serially addresses three DS2405 1-Wire switches. The first switch directly creates
; the second switch directly creates DIN; and the third switch, aided by three exclusive-OR gates, creates CLK.
The edge detector and one-shot IC4A, IC4B, and IC4C combine the outputs of IC2 and IC3—Data 1 and Data 0—to create a clock signal for the SPI. This one-shot clock-generation circuit improves the data rate by requiring only a single 1-Wire transaction per SPI bit, instead of the three transactions—data, clock low, and clock high—that would be necessary if you directly use the IC3 output as a clock signal.
To transmit data to the SPI inputs, first set the output of IC1 low. Then, transmit the data bits using the following rules: If the current data bit differs from the previous bit, set IC2’s Data 1 output accordingly. If the current data bit is the same as the previous bit, toggle IC3’s Data 0 output. The circuit automatically generates a clock pulse each time and requires only one 1-Wire command for each data bit sent. When data transmission is complete, send a final 1-Wire command to set the IC1 output high.
This circuit allows a 1-Wire network to control a remote temperature display, but similar techniques can provide an interface to I2C (inter-integrated-circuit)-compatible devices and to other SPI peripherals, such as ADCs and DACs. You can also produce a bidirectional-data capability by adding a fourth DS2405. Note that the SPI data rate and updates to the peripheral are relatively slow, but speed is not an issue for many remote-monitoring applications.