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.
PIC 16F627A Config word
Moderator: Benj
-
- Flowcode v5 User
- Posts: 104
- Joined: Fri Oct 10, 2014 11:15 am
- Has thanked: 27 times
- Been thanked: 22 times
- Contact:
- 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
Hello Dave,
Here is the current v6 definition file. I've checked it and bit 13 is set as the code protect.
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.
Here is the current v6 definition file. I've checked it and bit 13 is set as the code protect.
You can double check your file is correct by copying the attached file below into your "Flowcode 6\FCD\PIC" directory and restarting Flowcode.<setting name='CP' offset='13' mask='1' bits='1' hint='Code Protect' >
<option name='Off' value='1' />
<option name='On' value='0' />
</setting>
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.
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
-
- 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
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.
I've copied the file over, still the same.
Code protect ON sets 0x1F70
Code protect OFF sets 0x3F70
Build / View C
Regards,
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: PIC 16F627A Config word
Hi Dave,
Remember the bits are numbered from 0.
0x2000 is the bit that is changing which seems right to me.
Remember the bits are numbered from 0.
0x2000 is the bit that is changing which seems right to me.
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
-
- Flowcode v5 User
- Posts: 104
- Joined: Fri Oct 10, 2014 11:15 am
- Has thanked: 27 times
- Been thanked: 22 times
- Contact:
- 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
No worries, I had to count twice myself
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