Hi Tony. Just a thought I was playing about with this and it may of help to you its based on a summing amp circuit. port x0 via pot to opamp input (1) summing amp. set for low voltage i.e.. 3v7 port x1 via pot to opamp input (2) summing amp. set for high voltage i.e.. 6v7 pot (3) to set working voltage input (3) summing amp set at 5v0 you can then get 4 voltages using 2 output pins and use an AD pin to check voltage. I have just started on this but I have only got it down on paper, beats the last on I was working on it used 8 output ports to AD converter.ect .... Regards Art ----- Original Message ----- From: Tony Nixon To: Sent: Monday, October 16, 2000 11:31 PM Subject: [PIC]: analog pins > Hi all, > > [A bit sheepishly this time :-)] > > I though if an anlog pin was set as an output you could use it as an > output pin capable of driving whatever. > > On the PORTA block diagram, I can see how reading the pin is disabled > via an AND gate, but no mention is given about driving the pin hi or lo. > > I just spent a day fooling around with a new prototype PCB for the > PicPocket programmer and I could not get the I2C eeproms to work. (Of > course I blamed the PCB) > > > I had RA3 controlling the SCL line, and analog enabled with RA0, RA1 and > RA3 set as analog. (ADCON1 set as 04h) RA3 was set as an output, not as > an input. > > This did not work. I turned off the A2D and it did work. > > I've now swapped the SCL pin to RC0 and all works OK with A2D enabled. > > Anyone know why? > > -- > Best regards > > Tony > > ICmicro's > http://www.picnpoke.com > mailto:sales@picnpoke.com > > -- > http://www.piclist.com hint: The PICList is archived three different > ways. See http://www.piclist.com/#archives for details. > -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.