So setting ADCON2 = 15, along with ReadAD10(ANx) should do the job. Even though it appears that only 10 bits are read, it should be properly formatted to receive 12 bit values.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
@Louis. Please send me a personal message (a Sourceforge personal message) and I will send you a link to the latest release candidate. I would be grateful if you can then test the changes for ReadAD12 in the latest release.
@Kent. I have added.Somehow, it was not on my change list. :-( . I just added the changes, updated the docs, helpers etc etc. :-)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I want to use a PIC 16F1788 which has a 12 bit A/D converter. Does GCB support 12 bit
conversion? If so, how? Thank you.
Not sure if the fix has been put into the latest release or not? It has been discussed a couple of times https://sourceforge.net/p/gcbasic/discussion/629990/thread/9b69d693/#e018
https://sourceforge.net/p/gcbasic/discussion/596084/thread/7169f5b8/#f18e
So setting ADCON2 = 15, along with ReadAD10(ANx) should do the job. Even though it appears that only 10 bits are read, it should be properly formatted to receive 12 bit values.
@Louis. Please send me a personal message (a Sourceforge personal message) and I will send you a link to the latest release candidate. I would be grateful if you can then test the changes for ReadAD12 in the latest release.
@Kent. I have added.Somehow, it was not on my change list. :-( . I just added the changes, updated the docs, helpers etc etc. :-)