> Adam Field wrote: > >> No, in this case strong pullup implies TRISA.0=3D0 AND LATC.0=3D1 (i.e > >> put the port in output mode and drive it high) > > > > Yes, "strong" pull-up as in PIC's output FET R-on driving RA0. >=20 > No. That's not a pullup but rather explicitly driving the line high. I > haven't looked at the DSxxxx datasheet, but from what was said here earli= er > it needs a "strong" pullup when in parasitic power mode. This is so that= it > can derive power from the line to operate when it is high. But the "pull= up" > part also implies the device will in certain cases drive the line low. S= o > pullup means what it says, which is not TRIS 0 (driven) and LAT 1 (high). >=20 > What is needed therefore is a pullup external to the PIC since there is > nothing in the PIC that can act like the required strong pullup. This ca= n > be a resistor to Vdd if it can always be present, or a resistor to anothe= r > PIC pin that is either driven high or left floating. >=20 Now would have been a good time to read the datasheet before replying since= =20 this will most likely confuse the OP more than it will help. A strong pullup for a 1-wire device means that the data line needs to be ab= le=20 to supply enough current at a certain minimum voltage during a certain mini= mum=20 time while the 1-wire device is performing an operation which consumes more= =20 power than usually. In this case, the operation is a temperature conversion= =20 which will consume up to 1.5mA during 100ms - 750ms (depending on resolutio= n)=20 at a minimum voltage of 3.0V. During this time, no other activity can take= =20 place on the data line, not by the uController and not by any of the 1-wire= =20 devices on this data line (the 1-wire bus). A quick ohms law calculation sh= ows=20 that a pullup of 4700 ohm to 5V will not be enough. One way to solve this is to drive the data line high with the uController p= ort=20 pin during the conversion time. Sicne all communication is initiated by the= =20 uController, this will not be a problem, even if the pin is held high for a= =20 longer duration than the temperature conversion time. However, this may not be the best approach since the 1-wire bus can be seve= ral=20 100 feet long and you don't want to expose the uController pin to the real= =20 world in this way. I have been using the following circuit with good result:=20 =20 It uses two I/O pins (one bidirectional and one pure output) instead of one= ..=20 However, the text in the article is wrong. It says that the input signal to= Q3=20 has to be set low in order to activate the pullup circuit. This is wrong.=20 Setting the base of Q3 low only switches off the pulldown. In order to=20 activate the pullup, the input line also has to be switched to an output an= d=20 set low. The pullup will be activated when the clamping resistor has pulled= up=20 the line higher than around 0.6V. So it only is activated if there isn't=20 anything else on the line that pulls it low, preventing a short.=20 I also use a lot lower pull up resistor than 4.7k ohms. I think it is down = to=20 510 ohms. This is possible since the PIC isn't driving the data line direct= ly.=20 I also terminate each 1-wire trunk with a RC network to avoid ringing and d= ata=20 corruption on long lines.=20 The output is protected by two 3.3 ohm resistors in series and inbetween th= em=20 there are two shottky diodes (BAT54S), one connected to ground and another= =20 connected to a 6.8V (breakdown, Vrm=3D5.8V) TVS diode. The TVS can not be=20 directly connected to the 1-wire line because of its relatively high intern= al=20 capacitance.=20 This has served me well for several hundreds installations with some of the= m=20 with more than 1000 sensors (not all at the same 1-wire bus though). Another thing to look out for is to keep the data line relatively stable du= ring=20 the strong pullup (temperature conversion) since not doing so can disturb t= he=20 sensor and it may not produce the correct temperature.=20 /Ruben =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Ruben J=F6nsson AB Liros Electronic Box 9124, 200 39 Malm=F6, Sweden TEL INT +46 40142078 FAX INT +46 40947388 ruben@pp.sbbs.se =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .