|
|
View previous topic :: View next topic |
Author |
Message |
Guest
|
A/D problem with 18F458, with solution... |
Posted: Fri Mar 30, 2007 11:35 am |
|
|
I have just spent the last couple of days trying to get the A/D (channels 2,3) working on a 4Mhz 18F458. It would read the data but when the voltage on one input changed the value from the other channel changed! Convinced myself it was to do with the Vref and checked everything, new chip, new signal soures, checked the ADCON0 and ADCON1 regs, read the data sheet....
In the end it was because I had no delay between switching to the A/D channel and reading the A/D. Once I put in a 25uS delay and it all works perfectly!
Will try to remember this for next time....
Mike (cambridge, UK) |
|
|
mskala
Joined: 06 Mar 2007 Posts: 100 Location: Massachusetts, USA
|
|
Posted: Fri Mar 30, 2007 8:23 pm |
|
|
That's good to know. I looked in the data sheet (I use a 18F452) and didn't see that as a requirement. I haven't noticed this problem, but I sample each of 2 channels a bunch of times before switching.
Thanks |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|