4 EEPROM Chips Recording Routine


Closed Thread
Results 1 to 8 of 8
  1. #1
    Join Date
    Feb 2005
    Location
    Bellevue
    Posts
    125

    Default 4 EEPROM Chips Recording Routine

    I have a problem with my recording routine. I have 4 x 24LC512 chips in line with an 18F2525. The Chips are:

    Chip1 con %10100000 ' address of chip1
    Chip2 con %10100010 ' address of chip2
    Chip3 con %10100011 ' address of chip3
    Chip4 con %10100001 ' address of chip4

    The problem is this: I record timestamped data to these chips one after the other. These 4 chips together hold 10 minutes of data at a .1 second update rate. I use a 'Chipselect' variable to start with chip1, then move through them all, counting to from 0 to 63872 on each chip (128byte pages) -- the data is mixed up.

    My routine has a debug that shows on a monitor it is writing to chip1, chip2, etc., and shows the memory address. Watching it everything looks fine.

    Then when I play it back, I see some really odd stuff. I'd expect to see is a list of data timestamped starting with Time=0 and ending with time=10.

    What I see is mixed up data. A chip holds about 1500 records. so you'd expect:

    Chip 1 = 0-1500
    Chip2 = 1501=3000
    chip3 = 3001-4500
    chip4 = 4501-6000

    but the time would just jump nicely from chip to chip... It doesn't

    The data is mixed up 1 and 4 and 2 and 3 contain the same data...

    Am I addressing these chips wrong?

    Thanks..

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Did you set correctly A0,A1,A2 of each EEPROM correctly to VCC and GND on your board to match to your defines??? any schematic?
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Feb 2005
    Location
    Bellevue
    Posts
    125


    Did you find this post helpful? Yes | No

    Default

    The eeproms are electrically set as follows:

    A0 A1 A2
    Chip1 - - -
    Chip2 + - -
    Chip3 + + -
    Chip4 - + -

    I have a resistor on SCA/SCL lines (one tho for all lines, not one for each chip.)

    .....

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    o.k. this is why...

    try those define and post your results

    Chip1 con %10100000 ' address of chip1
    Chip2 con %10100010 ' address of chip2
    Chip3 con %10100110 ' address of chip3
    Chip4 con %10100100 ' address of chip4
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  5. #5
    Join Date
    Feb 2005
    Location
    Bellevue
    Posts
    125


    Did you find this post helpful? Yes | No

    Smile Success!

    Yup! that was it.. I was off a position in the setup. THANKS! Oddly it seemed like I was writing to chips 3 and 4 and I must have been writing to both at the same time.

    TG

  6. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    hehe, great to know it's working for you now !
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  7. #7
    FLAVIO's Avatar
    FLAVIO Guest


    Did you find this post helpful? Yes | No

    Default Error On Address Chip

    EXAMPLE:

    Chip1 con %10100000 ' address of chip1
    Chip2 con %10100010 ' address of chip2
    Chip3 con %10100100 ' address of chip3
    Chip4 con %10100110 ' address of chip4


    By Flavio

    [email protected]

  8. #8
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Talking

    Quote Originally Posted by Flavio
    EXAMPLE:

    Chip1 con %10100000 ' address of chip1
    Chip2 con %10100010 ' address of chip2
    Chip3 con %10100100 ' address of chip3
    Chip4 con %10100110 ' address of chip4


    By Flavio

    [email protected]
    And the question is.... missing!
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Can't read sequential addresses in external EEPROM
    By tjkelly in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th February 2010, 14:46
  2. Problem with I2C EEPROM addressing
    By Atom058 in forum General
    Replies: 14
    Last Post: - 3rd November 2009, 03:17
  3. PIC16F684 + LCD to use the 256bytes of EEPROM - HELP
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 7th March 2008, 14:19
  4. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 17:27
  5. word variable to 25lc640
    By TONIGALEA in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 6th July 2004, 19:59

Members who have read this thread : 1

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