
Originally Posted by
Luckyborg
I switched over to MPASM several months ago when I started using an 18F4520. I'm going back to some of my other code that needs an update and am having trouble with a 16F631. I have commented out the config lines in the inc file. I get "Error[113] c:\pbp\pbppic14.lib 5985 : Symbol not previously defined (EEPGD)"
After stripping down the code I have isolated the error to anytime I use a read or write statement. If I switch back to PM all is well.
Code:
define osc 8
Clear
'@ device pic16F631, INTOSCIO, wdt_on, pwrt_on, MCLR_OFF, protect_on, IESO_OFF
@ __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_OFF & _IESO_ON
OSCCON = %01110101 'set internal osc on to 8 mhz
Prev_Baud var byte
ANSEL = 0 'set port to digital
OPTION_REG.7 = 0 'enable pull ups on A and B
read 0, Prev_Baud
if Prev_Baud > 4 then 'don't allow anything over 19200, default to 9600
write 0, 3
endif
Pause 1000
main:
goto main
End
Any ideas? I would rather not have to always switch back and forth depending on which chip I'm using. I uninstalled and removed MPASM and installed the newest version already.
David
Hi David,
I cannot duplicate the error, I copied and pasted your code into an existing program, ditto for your config and it compiles fine for a 16F631 for me PBP ver 2.6. I thought the omission of eecon1 settings might be your problem, but alas it compiles without error without it. What version of PBP are you using? Maybe the latest ver. has added something because I see no mention of EEPGD in my lib until line 6069 and there is mention of EECON1 in there, try setting the EECON1 register and see it that works. The 16F631 series resets with eeprom write disabled to prevent accidental writes on power up.
Last edited by Archangel; - 13th August 2009 at 22:03.
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.
Bookmarks