Jump into eeprom address


Closed Thread
Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Sep 2005
    Location
    Switzerland
    Posts
    46


    Did you find this post helpful? Yes | No

    Default

    Hi again,
    I feel this is might be a stupid question !
    It's enough (too easy) Pause 90 instead of Pause 10 ?
    Otherwise how can i make a 10ms pause after each byte ?
    Thanks again

  2. #2
    Join Date
    Oct 2004
    Location
    Hangover, Germany
    Posts
    289


    Did you find this post helpful? Yes | No

    Red face

    A 90ms Wait ist not right.

    I think, the EEPROM can access its memory in pages of 32 Bytes.
    So, if you write inside this page, it can be written back in one event just needing 10ms pause.
    But if you are crossing this pages, you must adress the new page with a new I2C-Command.
    Just read the dokumentation and see, if if is possible for you to use pages. Maybe it will be ok, if you drop every 5 Bytes at the end of a page ?
    PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2

  3. #3
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    SerIn2 RX, BAUD, [wait("XY"),STR long\9]
    Pause 2000

    For CounterA=0 to 8
    Address=ADD+CounterA
    I2CWrite SDA,SCL,EEP,Address,[STR(CounterA)]
    Pause 10
    Next CounterA

  4. #4
    Join Date
    Sep 2005
    Location
    Switzerland
    Posts
    46


    Did you find this post helpful? Yes | No

    Default

    @ BigWumpus

    Yes you are right. I saw (datasheet) that Page Write mode allows up to 32
    bytes per writing cycle.
    Now let's see how to 'cheat' the 24c64 !

    @ Melanie

    Thanks for the code.
    Unfortunatly I receive a compiling error on line:
    I2CWrite SDA,SCL,EEP,Address,[STR(CounterA)] = Bad Expression
    I tried some small chances but no success.
    I'm sorry I'm not a Pro and I still need your help.
    Thanks

  5. #5
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Probably needs an intermediate variable because I don't think variable indexed arrays are allowed with I2CREAD or I2WRITE... try this...


    CounterA var BYTE
    DataA var BYTE

    SerIn2 RX, BAUD, [wait("XY"),STR long\9]
    Pause 2000

    For CounterA=0 to 8
    Address=ADD+CounterA
    DataA=STR(CounterA)
    I2CWrite SDA,SCL,EEP,Address,[DataA]
    Pause 10
    Next CounterA

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. Bootloader and Instant Interrupts Atn:_DT_
    By Josuetas in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 16th May 2007, 01:59
  3. How to write/read strings EEPROM/LCD
    By g-hoot in forum mel PIC BASIC Pro
    Replies: 22
    Last Post: - 11th February 2007, 06:26
  4. External EEPROM Not getting data (24LC515)
    By Tom Gonser in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 22nd March 2005, 13:16
  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 : 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