Page 1 of 1
PIC16F1788/9 ADC Resolution
Posted: Thu Feb 19, 2026 7:31 pm
by simon-sandtcontrols
Hi All,
I wonder if you can help, please. I have been working on a project I need a 12bit ADC for. I have chosen the PIC 16F1788 for the job and built the hardware. I have just gone to start programming it and discovered that Flowcode's ADC properties for that IC are showing the ADC resolution is fixed at 10 bit. I have been back to the datasheet and it is quite certain that it has 12Bit ADC's. I have checked the PIC16F1789 and that shows the same.
Is this that Flowcode can't work to 12bit ADC resolution or is it an error in the configuration files for these IC's please?
Many Thanks.
Simon
Re: PIC16F1788/9 ADC Resolution
Posted: Fri Feb 20, 2026 9:04 am
by Steve-Matrix
Thanks for reporting this. I wonder if it is related to this post:
https://www.flowcode.co.uk/forums/viewtopic.php?t=1505
Anyway, we'll have a look and get this fixed.
Re: PIC16F1788/9 ADC Resolution
Posted: Fri Feb 20, 2026 9:19 am
by simon-sandtcontrols
Thanks Steve,
I think it's slightly different symptoms. I can't change the resolution from 10bit in the ADC properties, it's greyed out. I haven't tried simulating it or compiling it.
Simon.
Re: PIC16F1788/9 ADC Resolution
Posted: Fri Feb 20, 2026 10:39 am
by BenR
Hi Simon,
Hopefully resolved for you now via the library updates.
Let us know how you're getting on.
Re: PIC16F1788/9 ADC Resolution
Posted: Fri Feb 20, 2026 11:02 am
by simon-sandtcontrols
Hi Steve,
I have just done the update, it's now fixed at 12bit resolution, it's fine for what I want, but is that correct it can't be changed between 10 & 12?
I haven't finished the program for it yet. I will update when I load it into the IC.
Thanks.
Simon.
Re: PIC16F1788/9 ADC Resolution
Posted: Fri Feb 20, 2026 12:25 pm
by medelec35
Hello.
No you can't change within properties from 12 to 10bits and vice versa.
What you can do is read as 12 bit and convert to 10bit using calculation or using the Map component Component Libraries > Math
If reading is a bit unstable, you can even use software filters that are also available within Math e.g. rolling filter
Other things to try is set the conversion speed of the ADC to be as slow as possible and increase the Acquisitions Cycle higher than the default value.
I will see if I can find details on that.
One link to try is
this
Re: PIC16F1788/9 ADC Resolution
Posted: Fri Feb 20, 2026 1:04 pm
by simon-sandtcontrols
Hi Martin,
OK, that makes sense. I wasn't sure as it appeared to be an option in the properties. For what I want fixed at 12 bit is fine. I haven't tried the filters or math function, I usually convert to a lower resolution using a calculation. I will have a play around. Hopefully the input I have will be fairly stable, but that's not always the case.
Thanks for your help with this. I will confirm it works when I load it into a PIC later.
Simon.