Page 1 of 1

Request adding PIC16F1713

Posted: Fri Jun 16, 2017 4:08 pm
by qwall
I have a project that currently uses a PIC16F1708 and due to a redesign I need to move up to the PIC16F1713.
Would it be possible to add this part to Flowcode?

Re: Request adding PIC16F1713

Posted: Fri Jun 16, 2017 4:40 pm
by Benj
Hello,

I'll have a look for you. Should be fairly easy to add.

Re: Request adding PIC16F1713

Posted: Fri Jun 16, 2017 5:06 pm
by Benj
Right here's a quick go at supporting the device. Have a go and see how you get on.

Simply copy the file to your "Flowcode 7/FCD/PIC" folder, restart Flowcode and the device should then be there in the list.
16F1713.fcdx
(24.14 KiB) Downloaded 300 times

Re: Request adding PIC16F1713

Posted: Fri Jun 16, 2017 8:04 pm
by qwall
Thank you! I will let you know if I have any issues.

Re: Request adding PIC16F1713

Posted: Sun Jul 23, 2017 8:18 pm
by qwall
Is there a way to set the ADC Ref voltage to FVR 2x (2.048V) or 4x (4.096V)?
I have tried FVRCON = 0x8A; but I believe it is just being overwritten with the default 1x (1.024V) value.

Re: Request adding PIC16F1713

Posted: Sun Jul 23, 2017 9:26 pm
by medelec35
Hi qwall,
If you use an editor e.g Notepad++ in Admin mode, open

Code: Select all

C:\Program Files (x86)\Flowcode 7\CAL\PIC\PIC_CAL_ADC.c
if 64 bit windows
or

Code: Select all

C:\Program Files\Flowcode 7\CAL\PIC\PIC_CAL_ADC.c
if 32 bit windows.
Within file search for

Code: Select all

TYPE_26
Scroll down to:

Code: Select all

switch (Vref)
		{
			case 1:		// Vref selected
				ADCON1 |= 2;
				break;
			case 2:		// FVR selected
				ADCON1 |= 3;
				FVRCON |= 0x81;		// ADC FVR output is enabled, 1x (1.024V)
				break;
			default:	// VDD selected
				break;
		}
There you can change

Code: Select all

FVRCON |= 0x81;		// ADC FVR output is enabled, 1x (1.024V)
to the desired value.

Martin

Re: Request adding PIC16F1713

Posted: Sun Jul 23, 2017 11:49 pm
by qwall
Thank you for the detailed instructions. All is working as expected now.

Re: Request adding PIC16F1713

Posted: Mon Jul 24, 2017 8:30 am
by medelec35
You're welcome.
Glad all is worked as expected.
Thanks for letting us know.