PDA

View Full Version : 16F628A fuse problem



AndrewC
- 25th July 2008, 23:27
Any idea why I'm having a fuse problem ?

@ __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_OFF & _LVP_OFF
' & _PROTECT_OFF & _PWRT_ON & _BOD_ON & _CPD_OFF

compiles with no problem but as soon as I add any of the four commented fuses onto the line I get a compiler error

"Error [113] Symbol not previously defined."

These are the symbols I got out of the PBP Inc folder file M16F62XA. I'm using Microcode Studio, MPASM and I have the device selected as 16F628A

thanks, Andrew

Archangel
- 26th July 2008, 02:34
_BODEN_ON EQU H'3FFF' ;Backwards compatability to 16F62X
_BODEN_OFF EQU H'3FBF' ;Backwards compatability to 16F62X
_BOREN_ON EQU H'3FFF'
_BOREN_OFF EQU H'3FBF'
_CP_ON EQU H'1FFF'
_CP_OFF EQU H'3FFF'
_DATA_CP_ON EQU H'3EFF'
_DATA_CP_OFF EQU H'3FFF'
_PWRTE_OFF EQU H'3FFF'
_PWRTE_ON EQU H'3FF7'
_WDT_ON EQU H'3FFF'
_WDT_OFF EQU H'3FFB'
_LVP_ON EQU H'3FFF'
_LVP_OFF EQU H'3F7F'
_MCLRE_ON EQU H'3FFF'
_MCLRE_OFF EQU H'3FDF'
_RC_OSC_CLKOUT EQU H'3FFF'
_RC_OSC_NOCLKOUT EQU H'3FFE'
_ER_OSC_CLKOUT EQU H'3FFF' ;Backwards compatability to 16F62X
_ER_OSC_NOCLKOUT EQU H'3FFE' ;Backwards compatability to 16F62X
_INTOSC_OSC_CLKOUT EQU H'3FFD'
_INTOSC_OSC_NOCLKOUT EQU H'3FFC'
_INTRC_OSC_CLKOUT EQU H'3FFD' ;Backwards compatability to 16F62X
_INTRC_OSC_NOCLKOUT EQU H'3FFC' ;Backwards compatability to 16F62X
_EXTCLK_OSC EQU H'3FEF'
_HS_OSC EQU H'3FEE'
_XT_OSC EQU H'3FED'
_LP_OSC EQU H'3FEC'

There is your choices:
PWRTE NOT PWRT, CP_OFF NOT PROTECT,BODEN or BOREN , NOT BOD, DATA_CP not CPD. You must make them all on 1 line or do it the way I show below, (Thanks Darrel ).


@MyConfig = _HS_OSC & _WDT_OFF & _PWRTE_ON & _LVP_OFF
@MyConfig = MyConfig & _BODEN_OFF
@ __config MyConfig

skimask
- 26th July 2008, 06:42
Any idea why I'm having a fuse problem ?
@ __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_OFF & _LVP_OFF
' & _PROTECT_OFF & _PWRT_ON & _BOD_ON & _CPD_OFF
compiles with no problem but as soon as I add any of the four commented fuses onto the line I get a compiler error
"Error [113] Symbol not previously defined."
These are the symbols I got out of the PBP Inc folder file M16F62XA. I'm using Microcode Studio, MPASM and I have the device selected as 16F628A
thanks, Andrew

If you're using MPASM, you won't be using the M16F62XA file from the INC folder of PBP. You'll be 'using' the .INC file from the MPASM Suite directory.

AndrewC
- 26th July 2008, 07:51
Duh :(

Thankyou :)