Tony Nixon wrote: I forgot to mention that this will only work for 1 device on the bus at a time. There is a much more complicated procedure to use if multiple devices are on the bus and need identification, but I haven't used that method yet. > This is in assembler, but perhaps you can port it to C without much > bother. > > Data in buffer after execution = 8 bytes > > Family Code - 1 byte > ID Number - 6 bytes > CRC - 1 Byte > > movlw Buffer ; set buffer pointer > movwf FSR > call INITDS ; start new transaction > Send_Out Read_ROM ; read ROM command > GIDLoop call IN_BYTE ; read bytes > movwf INDF > incf FSR > movlw Buffer + d'8' > xorwf FSR,W > btfss STATUS,Z > goto GIDLoop > return -- Best regards Tony mICros http://www.bubblesoftonline.com mailto:sales@bubblesoftonline.com -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body