Page 1 of 1
PIC18F25Q10 ADC Vref
Posted: Wed Dec 04, 2019 3:04 am
by dz28
Is there an easy way to set the PIC18F25Q10 ADC Vref to the internal FVR_buffer1 (ADPREF register) ?
1.024, 2-048 or 4.096V
I only see options for Vdd and Vref+ pin
Am I missing something or will this require a Ccode block or some initialization code.
Thanks,
Dave
Re: PIC18F25Q10 ADC Vref
Posted: Wed Dec 04, 2019 12:17 pm
by Benj
Hi Dave,
I've had a look and it seems the ADC for the Q10 devices was fairly broken as it's a totally new ADC register setup. I've had a good go at fixing it now and adding support for the FVR VREF option. I've now pushed the changes to the update system.
You will just need a C code icon to setup the FVR to a certain voltage. Pick one of the lines below.
Code: Select all
FVRCON = 0x81; //FVR = 1.024V
FVRCON = 0x82; //FVR = 2.048V
FVRCON = 0x83; //FVR = 4.096V
Let me know how you get on.
Re: PIC18F25Q10 ADC Vref
Posted: Wed Dec 04, 2019 5:01 pm
by dz28
Ben,
As usual thank you for the quick response on this!
I got the update and the FVR option is now there.
I am getting the following error when I compile to HEX for a simple project.
Project attached.
0: (500) undefined symbols:
_FC_CAL_ADC_Disable(LCDisplay1.obj) _FC_CAL_ADC_Sample(LCDisplay1.obj) _FC_CAL_ADC_Enable(LCDisplay1.obj)
(908) exit status = 1
(908) exit status = 1
Thanks,
Dave
Re: PIC18F25Q10 ADC Vref
Posted: Wed Dec 04, 2019 5:19 pm
by Benj
Hi Dave,
Thanks for that, should be sorted now.
Re: PIC18F25Q10 ADC Vref
Posted: Wed Dec 04, 2019 7:28 pm
by dz28
Ben,
Seems to be good now!
Thanks You.
Up next for this chip is the INT0,1,2 pins
The interrupts simulate fine but I am getting the following errors during compile to HEX.
LCDisplay1.c: main()
4508: INTCON2bits.INTEDG0 = 1;
^ (192) undefined identifier "INTCON2bits"
^ (196) struct/union required
4510: INTCONbits.INT0IE = 1;
^ (255) not a member of the struct/union ""
^ (182) illegal conversion between types
int -> volatile union S1339
LCDisplay1.c: myisr()
4594: if ((INTCONbits.INT0IF) && (INTCONbits.INT0IE))
^ (255) not a member of the struct/union ""
(255) not a member of the struct/union "" ^
(199) logical type required ^
(199) logical type required ^
4597: INTCONbits.INT0IF = 0;
^ (255) not a member of the struct/union ""
^ (182) illegal conversion between types
int -> volatile union S1339
(908) exit status = 1
(908) exit status = 1
Should we start a new topic for this one?
Thanks,
Dave
Re: PIC18F25Q10 ADC Vref
Posted: Thu Dec 05, 2019 10:44 am
by Benj
Hi Dave,
No it's ok no need for a new topic, I'll look into this thanks for letting us know.
Re: PIC18F25Q10 ADC Vref
Posted: Mon Dec 30, 2019 4:52 pm
by dz28
Ben,
Did you ever get a chance to look into this?
Thanks,
Dave
Re: PIC18F25Q10 ADC Vref
Posted: Tue Mar 10, 2020 4:21 pm
by dz28
Hi Ben,
Do you think there will be any resolution to this issue or would it be best to use a different part?
Thanks,
Dave
Re: PIC18F25Q10 ADC Vref
Posted: Wed Mar 11, 2020 5:25 pm
by Benj
Hi Dave,
This has now hopefully been fixed for you, sorry for the delay.
Let us know how you get on.
Re: PIC18F25Q10 ADC Vref
Posted: Tue Mar 24, 2020 11:05 pm
by dz28
Thanks!
The compile to Hex how works.
Re: PIC18F25Q10 ADC Vref
Posted: Sun Mar 29, 2020 3:46 pm
by dz28
Ben,
I don't see the PIC18F45Q10 available.
Seems to be the same as PIC18F25Q10 but more I/O
Is this device not supported?
Or can this chip be developed using the PIC18F45K40 part. (seems to have the same pinout as the Q10 part.
Thanks,
Dave
Re: PIC18F25Q10 ADC Vref
Posted: Mon Mar 30, 2020 9:24 pm
by Benj
Hi Dave,
Thanks for the request, I'll look into adding this device for you ASAP.
Re: PIC18F25Q10 ADC Vref
Posted: Wed Apr 01, 2020 10:31 pm
by dz28
As always thanks for the support!
Dave