Marco, It is the DS18S20, with 3 leads. For some reason the examples in the book used 2 ports: Porta 4 to pull = down the line, and Portb x to read the line. I didn't know about A4 = being special open drain at the time, so I switched the code to B0 & B1, = and it still worked perfectly! Which was why I asked if another pin = could be substituted for A4. Is this normal? Lindy -----Original Message----- From: pic microcontroller discussion list = [mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of marco.genovesi@libero.it Sent: Friday, June 04, 2004 12:20 To: PICLIST@MITVMA.MIT.EDU Subject: Re: [PIC:] How to make pin RA4 on 16F877 I/O? >> ...and I was curious why it took 2 I/O pins to do the communication. = I thought 1-wire meant only one. (-: Lindy, what Dallas sensor do you have? a DS1820 - DS18S20.. use only 1 pin for communication (plus ground and = V+). Note that there are also other Dallas temperature sensors with different = protocols, as 2 wire (DS1721) and 3 wire (1620)... You can find an example of 1 wire protocol on TLOGGER.zip (16F84 & = DS1820) at: http://www.nexuscomputing.com/picarchive/files.html There are other examples on the web, I remember. Marco ---------- Initial Header ----------- From : "pic microcontroller -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.663 / Virus Database: 426 - Release Date: 4/20/2004 =20 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.663 / Virus Database: 426 - Release Date: 4/20/2004 =20 -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu