See, I don't have a PICKIT2, and what he posted wasn't hex, therefore my MISTAKE was logical. Sorry Roger. Here is the configs avail. for 16f88:
I think errors are lines 16,22,23Code:_CONFIG1 EQU H'2007' _CONFIG2 EQU H'2008' ;Configuration Byte 1 Options _CP_ALL EQU H'1FFF' _CP_OFF EQU H'3FFF' _CCP1_RB0 EQU H'3FFF' _CCP1_RB3 EQU H'2FFF' _DEBUG_OFF EQU H'3FFF' _DEBUG_ON EQU H'37FF' _WRT_PROTECT_OFF EQU H'3FFF' ;No program memory write protection _WRT_PROTECT_256 EQU H'3DFF' ;First 256 program memory protected _WRT_PROTECT_2048 EQU H'3BFF' ;First 2048 program memory protected _WRT_PROTECT_ALL EQU H'39FF' ;All of program memory protected _CPD_ON EQU H'3EFF' _CPD_OFF EQU H'3FFF' _LVP_ON EQU H'3FFF' _LVP_OFF EQU H'3F7F' _BODEN_ON EQU H'3FFF' _BODEN_OFF EQU H'3FBF' _MCLR_ON EQU H'3FFF' _MCLR_OFF EQU H'3FDF' _PWRTE_OFF EQU H'3FFF' _PWRTE_ON EQU H'3FF7' _WDT_ON EQU H'3FFF' _WDT_OFF EQU H'3FFB' _EXTRC_CLKOUT EQU H'3FFF' _EXTRC_IO EQU H'3FFE' _INTRC_CLKOUT EQU H'3FFD' _INTRC_IO EQU H'3FFC' _EXTCLK EQU H'3FEF' _HS_OSC EQU H'3FEE' _XT_OSC EQU H'3FED' _LP_OSC EQU H'3FEC' ;Configuration Byte 2 Options _IESO_ON EQU H'3FFF' _IESO_OFF EQU H'3FFD' _FCMEN_ON EQU H'3FFF' _FCMEN_OFF EQU H'3FFE'
Last edited by Archangel; - 18th July 2008 at 03:59.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
No biggie... Most programmer software needs a HEX file to do the actual programming of the PIC itself. I really can't think of any other file type, other than a straight binary file, that a programmer would use.
If you look in the P16F88.INC file in your MPASM directory, you'll find all of the various config options listed near the end of that file.
OR...near the beginning of the M16F88.INC file in your PBP directory if your using the PM assembler rather than MPASM.
Last edited by skimask; - 18th July 2008 at 04:10.
I tried to use the config settings as visible in post#5 (original MPASM .INC file). MCS will give me syntax errors when using some of those.
I.e., instead of "CCP1_RB0", I will have to use "CCPMX_OFF" (see code post #1 for more).
Then, I compared with the .DEV file found in MPASM too. Looks like this:
Where's the truth?Code:# <!-- XML:DCRs:Begin() --> cfgbits (key=CONFIG addr=0x2007 unused=0x0) field (key=OSC mask=0x13 desc="Oscillator") setting (req=0x13 value=0x13 desc="EXTRC-OSC2 as Clock Out" freqmin=32000 freqmax=4000000) setting (req=0x13 value=0x12 desc="EXTRC-OSC2 as RA6" freqmin=32000 freqmax=4000000) setting (req=0x13 value=0x11 desc="INTRC-OSC2 as Clock Out") setting (req=0x13 value=0x10 desc="INTRC-OSC2 as RA6") setting (req=0x13 value=0x3 desc="EXTCLK as Port IO" freqmin=32000 freqmax=40000000) setting (req=0x13 value=0x0 desc="LP" freqmin=32000 freqmax=200000) setting (req=0x13 value=0x1 desc="XT" freqmin=200000 freqmax=4000000) setting (req=0x13 value=0x2 desc="HS" freqmin=4000000 freqmax=25000000) field (key=WDT mask=0x4 desc="Watchdog Timer" min=1) setting (req=0x4 value=0x4 desc="On") setting (req=0x4 value=0x0 desc="Off") field (key=PUT mask=0x8 desc="Power Up Timer") setting (req=0x8 value=0x8 desc="Off") setting (req=0x8 value=0x0 desc="On") field (key=MCLRE mask=0x20 desc="RA5/MCLR Pin Function Select") setting (req=0x20 value=0x20 desc="MCLR") setting (req=0x20 value=0x0 desc="RA5") field (key=BODEN mask=0x40 desc="Brown Out Detect") setting (req=0x40 value=0x40 desc="On") setting (req=0x40 value=0x0 desc="Off") field (key=LVP mask=0x80 desc="Low Voltage Program") setting (req=0x80 value=0x80 desc="Enabled") setting (req=0x80 value=0x0 desc="Disabled") field (key=CPD mask=0x100 desc="Data EE Read Protect") setting (req=0x100 value=0x100 desc="Off") setting (req=0x100 value=0x0 desc="On") field (key=WRT_ENABLE mask=0x600 desc="Flash Program Write") setting (req=0x600 value=0x600 desc="Write Protect Off") setting (req=0x600 value=0x400 desc="0000 to 00FF write protected") setting (req=0x600 value=0x200 desc="0000 to 07FF write protected") setting (req=0x600 value=0x0 desc="0000 to 0FFF write protected") field (key=BACKBUG mask=0x800 desc="Background Debug" flags=h) setting (req=0x800 value=0x800 desc="Disabled") setting (req=0x800 value=0x0 desc="Enabled") field (key=CCP1MUX mask=0x1000 desc="CCP1 Mux") setting (req=0x1000 value=0x1000 desc="RB0") setting (req=0x1000 value=0x0 desc="RB3") field (key=CP mask=0x2000 desc="Code Protect") setting (req=0x2000 value=0x2000 desc="Off") checksum (type=0x0 protregion=0x0-0x0) setting (req=0x2000 value=0x0 desc="All") checksum (type=0x20 protregion=0x0-0xfff) cfgbits (key=CONFIG2 addr=0x2008 unused=0x3ffc) field (key=FCMEN mask=0x1 desc="Fail-Safe Clock Monitor Enable") setting (req=0x1 value=0x1 desc="Enabled") setting (req=0x1 value=0x0 desc="Disabled") field (key=IESO mask=0x2 desc="Internal External Switch Over Mode") setting (req=0x2 value=0x2 desc="Enabled") setting (req=0x2 value=0x0 desc="Disabled") # <!-- XML:DCRs:End() -->
I couldn't find any MCS file about those CONFIG settings syntax correspondances. Maybe the fish is here.
Roger
Hi, Roger
With MPASM used ... you're to use MPASM syntax !
With PM used ... you're to use PM syntax !
That written ...
MPASM .INC files give you ALL the settings available ... in the MPASM syntax, of course !!!
... capito ???
and, first of all CCPMX_OFF doesn't exist ... you've to CHOOSE your output Pin ...
yes ... D.A.T.A.S.H.E.E.T. !!!
Dur, dur ...
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
¡Si Señor! I think I know that. So where can I find the correct syntax for MCS then??? Me parece qué esto es más difícil.MPASM .INC files give you ALL the settings available ... in the MPASM syntax, of course !!! ... capito ???
Hereunder, I highlighted the parameters I replaced by the ones I use normally (in comment) and see what happens (error msg) when the program is compiled by MCS.first of all CCPMX_OFF doesn't exist ... you've to CHOOSE your output Pin..
Ah?
<img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=2753&stc=1&d=121639034 1">
Oh!
<img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=2754&stc=1&d=121639034 1">
Hmmmm...
<img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=2755&stc=1&d=121639034 1">
As you can see, some "original" syntax from the MicroChip file won't be accepted in MCS. I understand MCS is not using "as is" all or part of the content of .INC files. Am I really wrong?
Last edited by flotulopex; - 18th July 2008 at 15:53.
Roger
It's not so much the correct syntax for MCS, it's more the correct syntax for the compiler/assembler you are using.
If it's MPASM, the config registers are listed in that particular MCUs INC file in the MPASM directory near the end of the file (usually).
If it's PM, their listed in that particular MCUs INC file in the PBP INC directory near the beginning of the file (usually).
Bookmarks