Hi guys, I've setup a sample with 2 ADC channels, for 18f4550. Both are read regularly, results are sent through serial. ADC channel #0 is connected to a voltage divider (1K/1K). The other ADC channel #1 is connected to another voltage divider (22K/1K). In this configuration, I got the following results:
Result #0: 508 Result #1: 1020 Result #0: 508 Result #1: 1020 ... So far so good... Now I disconnect channel #1. Pin is floating in the air, not connected anymore to voltage divider... I would expect some kind of random data on this channel, but I got exactly the same result as the one from channel #0: Result #0: 508 Result #1: 508 Result #0: 508 Result #1: 508 Result #0: 508 ... Doing the opposite give the same result from channel #1 (most of the time, I admit): Result #0: 1020 Result #1: 1020 Result #0: 1012 <-- this one is exceptional Result #1: 1020 Result #0: 1020 Result #1: 1020 Result #0: 1020 Result #1: 1020 Attached is the running sample. I really don't know what's going on. Is my assertion about expected random values wrong ? Is there something with PIC's internal ? Cheers, Seb -- You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
18f4550_adc.jal
Description: Binary data
