Request adding PIC16F1713

Please add any feature requests for Flowcode version 7 here

Moderator: Benj

Post Reply
qwall
Posts: 7
Joined: Tue Apr 18, 2017 1:57 am
Location: Los Angeles, CA
Has thanked: 4 times
Been thanked: 2 times
Contact:

Request adding PIC16F1713

Post 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?

User avatar
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: Request adding PIC16F1713

Post by Benj »

Hello,

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

User avatar
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: Request adding PIC16F1713

Post 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 286 times

qwall
Posts: 7
Joined: Tue Apr 18, 2017 1:57 am
Location: Los Angeles, CA
Has thanked: 4 times
Been thanked: 2 times
Contact:

Re: Request adding PIC16F1713

Post by qwall »

Thank you! I will let you know if I have any issues.

qwall
Posts: 7
Joined: Tue Apr 18, 2017 1:57 am
Location: Los Angeles, CA
Has thanked: 4 times
Been thanked: 2 times
Contact:

Re: Request adding PIC16F1713

Post 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.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Request adding PIC16F1713

Post 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
Martin

qwall
Posts: 7
Joined: Tue Apr 18, 2017 1:57 am
Location: Los Angeles, CA
Has thanked: 4 times
Been thanked: 2 times
Contact:

Re: Request adding PIC16F1713

Post by qwall »

Thank you for the detailed instructions. All is working as expected now.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Request adding PIC16F1713

Post by medelec35 »

You're welcome.
Glad all is worked as expected.
Thanks for letting us know.
Martin

Post Reply