EEPROM WRITE Command


Closed Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2011
    Location
    NSW, Australia
    Posts
    39

    Default EEPROM WRITE Command

    Hi
    I am trying to read data from a Bosch BMP-085 Pressure sensor. There is a very detailed thread that has all the required code which is a HUGE help, so my sincere thanks to the original poster.

    There are 11 calibration words that must be read. Currently they are being stored in an array of 11 elements. I want to store them to EEprom

    The problem is when I compile I get this error " Error[113] c:\pbp\pbppic14.lib 607(and 609 on the next line and 661 on the 3rd lines); Symbol not previously defined (WRITE)

    If I put


    WRITE 0,1
    WRITE 1,2
    WRITE 2,3
    WRITE 3,4
    WRITE 4,5
    WRITE 5,6
    WRITE 6,7
    WRITE 7,8
    WRITE 8,9
    WRITE 9,10
    WRITE 10,11


    and then read back the EEprom data, all is good

    So I changed the code to

    WRITE 0,Cal_table[0]
    WRITE 1,Cal_table[1]
    WRITE 2,Cal_table[2]
    WRITE 3,Cal_table[3]
    WRITE 4,Cal_table[4]
    WRITE 5,Cal_table[6]
    WRITE 6,Cal_table[7]
    WRITE 7,Cal_table[8]
    WRITE 8,Cal_table[9]
    WRITE 9,Cal_table[10]

    And this is where I see the errors.

    Here is the declaration of the array

    Cal_table var word[11]

    So I tried something different

    I assigned variables as below

    a var word
    b var word
    c var word
    d var word
    e var word
    f var word
    g var word
    h var word
    i var word
    j var word
    k var word

    and then assigned values

    a=1
    b=2
    c=3
    d=4
    e=5
    f=6
    g=7
    h=8
    i=9
    j=10
    k=11

    and got the same errors.

    I am using a PIC16F690 with Microcode Studio (Oops, may have just found an issue, but will post anyway!)
    Just noticed when looking in the 'about' in MCS that it is version 3.005 and PBP 2.6, but I have upgraded to PBP3.0.

    If anyone can see where I messed up I would be grateful

    Regards
    aajgss

  2. #2
    Join Date
    Apr 2011
    Location
    NSW, Australia
    Posts
    39


    Did you find this post helpful? Yes | No

    Default Re: EEPROM WRITE Command

    OK,
    now that I have MCS V5 and PBP 3 running together - No more problems with compiling

Members who have read this thread : 2

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