Migrating to MPASM


Results 1 to 16 of 16

Threaded View

  1. #2
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Luckyborg View Post
    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.

Similar Threads

  1. 16F914 and MPASM
    By jderson in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 7th February 2009, 03:21
  2. 12F675 MCLR directive MPASM
    By OLDSCHOOL in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 4th May 2008, 01:29
  3. MPASM 18F4550 getting started
    By BrianT in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 4th September 2007, 23:59
  4. 18F8722 and MPASM confusion!
    By Jackson in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 2nd April 2006, 01:24
  5. Converting to MPASM
    By btaylor in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 4th November 2005, 01:35

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts