PDA

View Full Version : "symbol not previously defined" on 16F1933 - fuse issue i think



comwarrior
- 2nd January 2011, 02:24
ok, i write 3 lines of code and already i get an error...



ERROR[113] blah.asm 328: Symbol not previously defined (_CONFIG1)
ERROR[126] blah.asm 328: Argument out of range (not valid config register address)
ERROR[113] blah.asm 334: Symbol not previously defined (_CONFIG2)
ERROR[126] blah.asm 334: Argument out of range (not valid config register address)


and my code...



Define OSC 32 ' Set clock speed
@ __config __CONFIG1, _FOSC_INTOSC & _WDTE_NSLEEP & _PWRTE_ON & _MCLRE_OFF & _BOREN_ON & _IESO_OFF & _FCMEN_ON
@ __config __CONFIG2, _VCAPEN_OFF & _PLLEN_ON & _STVREN_ON & _BORV_25 & _LVP_OFF

In P16F1933.INC in the MPASM SUITE folder it says...


;================================================= =========================
;
; Configuration Bits
;
; NAME Address
; CONFIG1 8007h
; CONFIG2 8008h
;
;================================================= =========================

; The following is an assignment of address values for all of the
; configuration registers for the purpose of table reads
_CONFIG1 EQU H'8007'
_CONFIG2 EQU H'8008'

ok, i have no idea...
Can someone shed some light please. Thanks

:additional
I checked the datasheet, the config word addresses are correct...

mackrackit
- 2nd January 2011, 02:52
@ __config __CONFIG2, _VCAPEN_OFF & _PLLEN_ON & _STVREN_ON & _BORV_25 & _LVP_OFF
Try getting rid of the items in red.

Bruce
- 2nd January 2011, 03:24
Get rid of the double undescores before CONFIG1 and CONFIG2.


@ __config _CONFIG1, _FOSC_INTOSC & _WDTE_NSLEEP & _PWRTE_ON & _MCLRE_OFF & _BOREN_ON & _IESO_OFF & _FCMEN_ON
@ __config _CONFIG2, _VCAPEN_OFF & _PLLEN_ON & _STVREN_ON & _BORV_25 & _LVP_OFF