12bit ADC, works in Sim, not on hardware

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times

12bit ADC, works in Sim, not on hardware

Post 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.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

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

Post 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.

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times

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

Post 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.

Post Reply