PIC 16F627A Config word

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
Dave Squibb
Flowcode v5 User
Posts: 104
Joined: Fri Oct 10, 2014 11:15 am
Has thanked: 27 times
Been thanked: 22 times
Contact:

PIC 16F627A Config word

Post by Dave Squibb »

Hi, Can someone check the config word is setting correctly for this PIC please? According to the data sheet bit 13 should be 1 for CP off and 0 for CP on. In practice Flowcode sets bit 13 to 1 in both cases.
(It tries to set bit 14 with CP off!) Also bits 9 - 12 say "read as 0" be 0 b but are set to 1.
Attachments
Config Test.fcfx
(3.01 KiB) Downloaded 284 times

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: PIC 16F627A Config word

Post by Benj »

Hello Dave,

Here is the current v6 definition file. I've checked it and bit 13 is set as the code protect.
<setting name='CP' offset='13' mask='1' bits='1' hint='Code Protect' >
<option name='Off' value='1' />
<option name='On' value='0' />
</setting>
You can double check your file is correct by copying the attached file below into your "Flowcode 6\FCD\PIC" directory and restarting Flowcode.
16F627A.fcdx
(12.8 KiB) Downloaded 268 times
An unprogrammed bit is generally set to a logic '1' and so this is what we use as a default. Programming a 1 to these empty config locations which read back as 0 shouldn't cause any problems.

Dave Squibb
Flowcode v5 User
Posts: 104
Joined: Fri Oct 10, 2014 11:15 am
Has thanked: 27 times
Been thanked: 22 times
Contact:

Re: PIC 16F627A Config word

Post by Dave Squibb »

Hi Benj,
I've copied the file over, still the same.
Code protect ON sets 0x1F70
Code protect OFF sets 0x3F70

Build / View C

Regards,
Dave.

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: PIC 16F627A Config word

Post by Benj »

Hi Dave,

Remember the bits are numbered from 0.

0x2000 is the bit that is changing which seems right to me.

Dave Squibb
Flowcode v5 User
Posts: 104
Joined: Fri Oct 10, 2014 11:15 am
Has thanked: 27 times
Been thanked: 22 times
Contact:

Re: PIC 16F627A Config word

Post by Dave Squibb »

Sorry Benj, had a senior moment with my counting.
Thanks, Dave.

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: PIC 16F627A Config word

Post by Benj »

No worries, I had to count twice myself :wink:

Post Reply