"CPD=OFF, CP=ON" problem with the "#config" command on a 12F683 program being compiled with "Great Cow BASIC (0.9 16/6/2009)"
'Test code:
' select one of the next 2 lines by adjusting the quote mark
'#chip 12F683old, 4
#chip 12F683, 4
'
#config FCMEN=ON,IESO=ON,BOD=ON,OSC=INTRC_OSC_NOCLKOUT, MCLRE=OFF, CPD=OFF, CP=ON, WDT=OFF, PWRTE=OFF
end
The .asm result with the original 12F683OLD.DAT file. Note that CP disappeared and was replaced with CPD and thereby sets it incorrectly:
...
#include <P12F683OLD.inc>
__CONFIG _FCMEN_ON & _IESO_ON & _BOD_ON & _INTRC_OSC_NOCLKOUT & _MCLRE_OFF & _CPD_OFF & _CPD_ON & _WDT_OFF & _PWRTE_OFF
...
The .asm result with new 12F683.DAT file and now CPD and CP appear correctly:
...
#include <P12F683.inc>
__CONFIG _FCMEN_ON & _IESO_ON & _BOD_ON & _INTRC_OSC_NOCLKOUT & _MCLRE_OFF & _CPD_OFF & _CP_ON & _WDT_OFF & _PWRTE_OFF
...
The old 12F683OLD.DAT file reads in part:
... [ConfigOps]
...
CPD=ON,OFF
CP=ON,OFF
... [Config]
...
CPD_ON,1,16255
CPD_OFF,1,16383
CP_ON,1,16319
CP_OFF,1,16383
... I just reversed the order of the CP and CPD parts to fix the 12F683.DAT file so:
... [ConfigOps]
...
CP=ON,OFF
CPD=ON,OFF
... [Config]
...
CP_ON,1,16319
CP_OFF,1,16383
CPD_ON,1,16255
CPD_OFF,1,16383
...
My suspicion is that there may be an error in the parser for the DAT files and it stops after just matching CP. This may have been fixed in an update, but the update readme doesn't seem to mention this action.
Thanks for a great program,
Charles R. Patton
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Evan,
I think my previous replies went to the bit-bucket. Anyway, I downloaded a Hot Release with date codes of 2015-03-31 01:01
It fixes the problem I described. I also ran it successfully on the whole program (423 source code lines --> 802 asm lines--> 1216 program code bytes) that originally exhibited the problem.
Thank you.
Chas.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
"CPD=OFF, CP=ON" problem with the "#config" command on a 12F683 program being compiled with "Great Cow BASIC (0.9 16/6/2009)"
The .asm result with the original 12F683OLD.DAT file. Note that CP disappeared and was replaced with CPD and thereby sets it incorrectly:
...
#include <P12F683OLD.inc>
__CONFIG _FCMEN_ON & _IESO_ON & _BOD_ON & _INTRC_OSC_NOCLKOUT & _MCLRE_OFF & _CPD_OFF & _CPD_ON & _WDT_OFF & _PWRTE_OFF
...
The .asm result with new 12F683.DAT file and now CPD and CP appear correctly:
...
#include <P12F683.inc>
__CONFIG _FCMEN_ON & _IESO_ON & _BOD_ON & _INTRC_OSC_NOCLKOUT & _MCLRE_OFF & _CPD_OFF & _CP_ON & _WDT_OFF & _PWRTE_OFF
...
The old 12F683OLD.DAT file reads in part:
...
[ConfigOps]
...
CPD=ON,OFF
CP=ON,OFF
...
[Config]
...
CPD_ON,1,16255
CPD_OFF,1,16383
CP_ON,1,16319
CP_OFF,1,16383
...
I just reversed the order of the CP and CPD parts to fix the 12F683.DAT file so:
...
[ConfigOps]
...
CP=ON,OFF
CPD=ON,OFF
...
[Config]
...
CP_ON,1,16319
CP_OFF,1,16383
CPD_ON,1,16255
CPD_OFF,1,16383
...
My suspicion is that there may be an error in the parser for the DAT files and it stops after just matching CP. This may have been fixed in an update, but the update readme doesn't seem to mention this action.
Thanks for a great program,
Charles R. Patton
Charles - can you please try these tests using the latest hot release please? We have updated a number of items relating to parsing .dat file.
Let us know the results.
Evan
Evan,
I think my previous replies went to the bit-bucket. Anyway, I downloaded a Hot Release with date codes of 2015-03-31 01:01
It fixes the problem I described. I also ran it successfully on the whole program (423 source code lines --> 802 asm lines--> 1216 program code bytes) that originally exhibited the problem.
Thank you.
Chas.
That is good news!
Case closed.