> The datasheets I've read have said that you must TRIS analogs as inputs if > you want to read the analog voltage. They say that if you TRIS the pin as an > output, the A/D can still happen, but that it will convert the pin voltage > as driven by the digital output. I stand ready to be corrected. There may be more than one A/D implementation. I remember running into an A/D gotcha on one of my first PIC projects, which might have been a 16C77 or 16C924. I wasn't using analog in, so I ignored the A/D module. What I didn't realize was that the A/D wakes up enabled, and that it was taking over the analog input pins. I was trying to use some of them as digital outputs, but I couldn't get them to do anything even though TRIS and the port register were set correctly. When I finally figured out to disable the A/D module, everything worked the way I intended it. I've also noticed that the A/D is supposed to wake up off now on newer PICs like the 16F87x. Perhaps these A/Ds also have slightly different operation. I sorta remember that you can individually disable the A/D function on select pins by using TRIS on the 17C series. ***************************************************************** Olin Lathrop, embedded systems consultant in Devens Massachusetts (978) 772-3129, olin@cognivis.com, http://www.cognivis.com -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! use mailto:listserv@mitvma.mit.edu?body=SET%20PICList%20DIGEST