A/D resolution for 16LF1788

A forums to allow bugs and problems with Flowcode v7 to be reported and resolved.

Moderator: Benj

Post Reply
gdt
Posts: 71
Joined: Thu Aug 10, 2017 2:04 pm
Has thanked: 25 times
Been thanked: 36 times
Contact:

A/D resolution for 16LF1788

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

EtsDriver
Posts: 444
Joined: Tue Apr 15, 2014 4:19 pm
Location: Kajaani, Finland
Has thanked: 345 times
Been thanked: 227 times
Contact:

Re: A/D resolution for 16LF1788

Post 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
Ill just keep the good work up!

gdt
Posts: 71
Joined: Thu Aug 10, 2017 2:04 pm
Has thanked: 25 times
Been thanked: 36 times
Contact:

Re: A/D resolution for 16LF1788

Post by gdt »

Of course!!!!
Thanks!
Attachments
16LF1877_v7.fcfx
(10.81 KiB) Downloaded 223 times

gdt
Posts: 71
Joined: Thu Aug 10, 2017 2:04 pm
Has thanked: 25 times
Been thanked: 36 times
Contact:

Re: A/D resolution for 16LF1788

Post 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).
Last edited by EtsDriver on Thu Aug 10, 2017 3:03 pm, edited 1 time in total.
Reason: Merged two posts together

EtsDriver
Posts: 444
Joined: Tue Apr 15, 2014 4:19 pm
Location: Kajaani, Finland
Has thanked: 345 times
Been thanked: 227 times
Contact:

Re: A/D resolution for 16LF1788

Post 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.
Attachments
16LF1788.fcdx
Put this to <Flowcode V7 install folder>/FCD/PIC/
(19.77 KiB) Downloaded 215 times
Ill just keep the good work up!

gdt
Posts: 71
Joined: Thu Aug 10, 2017 2:04 pm
Has thanked: 25 times
Been thanked: 36 times
Contact:

Re: A/D resolution for 16LF1788

Post 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....
Attachments
Test_18LF26K80.fcfx
(9.14 KiB) Downloaded 224 times
Test_16LF1788.fcfx
(9 KiB) Downloaded 232 times

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: A/D resolution for 16LF1788

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

gdt
Posts: 71
Joined: Thu Aug 10, 2017 2:04 pm
Has thanked: 25 times
Been thanked: 36 times
Contact:

Re: A/D resolution for 16LF1788

Post 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

Post Reply