Page 1 of 1

A/D resolution for 16LF1788

Posted: Thu Aug 10, 2017 2:16 pm
by gdt
Hello,
is the A/D resolution for 16LF1788 working correctly at 12bit on simulation?
A simple program that reads a potentiometer value on a UINT variable and print it on a GLCD, is showing values from 0 to 1023.
The same flowchart using a 18LF26K80 is showing reading from 0 to 4095 as expected at 12 bit resolution.
Any hint?
Thanks!

Re: A/D resolution for 16LF1788

Posted: Thu Aug 10, 2017 2:25 pm
by EtsDriver
Hi and welcome to forums!
Could you attach your Flowchart so it would be easier to evaluate the problem?

EDIT: Took a look and yes, there looks to be a bug that the 12bit adc is showing to be 10bit only.
16LF1788.PNG
(39.91 KiB) Downloaded 86 times

Re: A/D resolution for 16LF1788

Posted: Thu Aug 10, 2017 2:29 pm
by gdt
Of course!!!!
Thanks!

Re: A/D resolution for 16LF1788

Posted: Thu Aug 10, 2017 2:53 pm
by gdt
OK thanks, but is there any hope that the problem will be fixed?

E:Actually what you say regards the pot properties. If I replace the PIC ONLY, the readings are correct (0 to 4095) but the pot is the same (10 bit depth).

Re: A/D resolution for 16LF1788

Posted: Thu Aug 10, 2017 3:02 pm
by EtsDriver
Hi!
Ill move this topic to bug area at 17:00 GMT+3. I unfortunately cannot provide a solution for you...
gdt wrote: E:Actually what you say regards the pot properties. If I replace the PIC ONLY, the readings are correct (0 to 4095) but the pot is the same (10 bit depth).
Youre right! My mistake :lol:

BTW: Your project seems to have two sliders on same adc channel btw, but i could not find the other one from 2D panel...
2sliders.PNG
(4.41 KiB) Downloaded 69 times
And try to not doublepost, you can always use the "edit" button on corner of your message! :)

EDIT:

Try attached file .fcdx, it should fix atleast the simulation part so you can continue your work! :) The pot should now read the 0-4095 correctly. I have no hardware to test will it work correct and i think this will not compile correctly, not sure.

Re: A/D resolution for 16LF1788

Posted: Thu Aug 10, 2017 3:25 pm
by gdt
OK, the simulation works with your file but I cannot test the hardware now.
I've also built 2 new files from scratch just to avoid any duplicate component.

Any answer from the staff regarding this issue? Is there any fix to make sure that it will work on real world?


P.S.: Sorry for double post as you can see it's my first time in the forum but I'm reading since looooong....

Re: A/D resolution for 16LF1788

Posted: Thu Aug 10, 2017 4:37 pm
by Benj
Hello,

Thanks for letting us know. I have fixed the definition files here so that they correctly show 12-bit ADC rather than 10.
PIC16F178x.zip
(36.24 KiB) Downloaded 338 times
As for the hardware working it should now be ok but as with any newly added device there could be unforeseen problems lurking so let us know how you get on.

Re: A/D resolution for 16LF1788

Posted: Thu Aug 10, 2017 4:55 pm
by gdt
Wow!!!! I didn't expect a so quick response especially on middle of August!

Thanks a lot it works on simulation. Unfortunately I'm always travelling and I don't know when I have a chance to test on chip but of course, in any problem, I'll let you know.

Regards
gdt