Page 1 of 1

12bit ADC, works in Sim, not on hardware

Posted: Sat Jul 06, 2013 4:22 pm
by hyperion007
Hi,

I got a problem utilizing the 12bit ADC function on the PIC18F27J53 chip.

In simulation it works fine, but on hardware it seems to still be 10bit.

I have enabled 12bit ADC from the project options menu, and also tried running the chip at many different speeds (slowing it down)

It also seems a lot slower compared to the same program running on a PIC18F2520. I am sending data using I2C to a TLC59116 and it is working fine, but any delays in my code slows the 18F27J53 down to a crawl compared to the PIC18F2520. But it does improve if I lower the ADC speed to FOSC/8 or slower, and at the same time run the chip at a lower speed than 40Mhz

These are two issues, and I don't think they are related, thought I put it all in one thread instead of two different ones.

Re: 12bit ADC, works in Sim, not on hardware

Posted: Mon Jul 08, 2013 12:16 pm
by Benj
Hello,

If the delays on the hardware are off then it is likely you either have a config setting setup incorrectly or the config settings may be wrong for the hardware. A simple 1 second flasher test should allow you to get the device setup correctly and running at full speed.

I will have a look into the 12bit issue. Could be that the embedded code is slightly off.

Re: 12bit ADC, works in Sim, not on hardware

Posted: Mon Jul 15, 2013 8:06 am
by hyperion007
Thanks Ben,

I will have a look at the config settings again and try to work out what is wrong.

Have you had a chance to look at the 12bit issue?


Thanks.