Thank you for the reply. But I don't do ADC on the output pin RA1. I just want to output RA1 to a constant high. But it seems that ADCON1 has an effect on it despite the fact that I set TRISA1 to 0. Question: how do I set RA0 to analog input and RA1 to digital output? ----- Original Message ----- From: "Jeff DeMaagd" To: Sent: Thursday, June 14, 2001 9:13 AM Subject: Re: [PIC]: TRISA and ADCON1 > ----- Original Message ----- > From: Tony Nixon > > > > Who can explain to me what the last sentence means? What does it mean by > > > "the digital output level (VOH or VOL) will be converted"? > > > > If you did an anlog conversion on an analog pin with the TRIS bit set as > > zero, the converted value will be either 0 or 255, corresponding to > > Logic 0 and Logic 1 which is whatever the output state is. > > If there is a load on the output pin and you do an A/D on that pin one might > actually find a state between 0 and 255. Microchip's data sheets need very > thoughrough reading as the line about making all the associated TRIS bits > set as input is just a line dropped in the text somewhere. It's definitely > there but it's too easy to skim across it. > > Jeff > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > > -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body