PIC18F25Q10 ADC Vref
Moderator: Benj
PIC18F25Q10 ADC Vref
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
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
- 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: PIC18F25Q10 ADC Vref
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.
Let me know how you get on.
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
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: PIC18F25Q10 ADC Vref
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
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
- Attachments
-
- LCDisplay1.fcfx
- (12.3 KiB) Downloaded 183 times
- 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: PIC18F25Q10 ADC Vref
Hi Dave,
Thanks for that, should be sorted now.
Thanks for that, should be sorted now.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: PIC18F25Q10 ADC Vref
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
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
- 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: PIC18F25Q10 ADC Vref
Hi Dave,
No it's ok no need for a new topic, I'll look into this thanks for letting us know.
No it's ok no need for a new topic, I'll look into this thanks for letting us know.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: PIC18F25Q10 ADC Vref
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
Do you think there will be any resolution to this issue or would it be best to use a different part?
Thanks,
Dave
- 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: PIC18F25Q10 ADC Vref
Hi Dave,
This has now hopefully been fixed for you, sorry for the delay.
Let us know how you get on.
This has now hopefully been fixed for you, sorry for the delay.
Let us know how you get on.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: PIC18F25Q10 ADC Vref
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
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
- 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: PIC18F25Q10 ADC Vref
Hi Dave,
Thanks for the request, I'll look into adding this device for you ASAP.
Thanks for the request, I'll look into adding this device for you ASAP.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel