You must: 1) Switch to the first analog input 2) WAIT long enough for the circuitry to settle 3) Initiate a conversion cycle 4) Wait for end of conversion 5) Read the first analog input. 1') Switch to the second analog input 2') WAIT long enough for the circuitry to settle 3') Initiate a conversion cycle 4') Wait for end of conversion 5') Read the second analog input Step 2 is the one that most people leave out, and it cause the readings to be way out of whack. Fr. Thomas McGahee ----- Original Message ----- From: "Micro Eng" To: Sent: Tuesday, June 11, 2002 12:14 PM Subject: [PIC]:strange analog in problem > Using the F877, I have PortA configured for analog inputs, and had 10K pots. > Seemed to work ok, I had a watch window set up, and a breakpoint right after > the read sequences (for 4 pots). > > I've changed the pots to 50K now, and upped the aquisition time, but the > values seem to be way off now, and are affected by each other. > > ie... > > if I read just one, it is close...but not exact. If I put the second pot in > the loop to read, the first one goes way off scale. I've read the actual > voltages on the pins, and they are not changing. > Anyone ever seen where just reading a second port affects the value of the > first one? > > > _________________________________________________________________ > Join the world s largest e-mail service with MSN Hotmail. > http://www.hotmail.com > > -- > http://www.piclist.com hint: PICList Posts must start with ONE topic: > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads > > > -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads