issues with 24lc1025


Results 1 to 10 of 10

Threaded View

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


    Did you find this post helpful? Yes | No

    Thumbs up

    I think something like that have to work
    Code:
    <font color="#000000">Address     <font color="#000080">VAR WORD
    </font>OldAddress  <font color="#000080">VAR WORD
    </font>ControlByte <font color="#000080">VAR BYTE
    </font>Block0      <font color="#000080">CON </font>%10100000
    Block1      <font color="#000080">CON </font>%10101000
    
    Address=0
    ControlByte = Block0
    
    Start:
        <font color="#000080">I2CWRITE </font>SDA, SCL, ControlByte, Address, [0]
        <font color="#000080">PAUSE </font>10
        OldAddress = Address
        Address = Address + 1
        <font color="#000080">IF </font>Address&lt;OldAddress <font color="#000080">THEN      </font><font color="#008000">' Overflow?
                                        ' ----  YES
            </font><font color="#000080">IF </font>ControlByte=Block0 <font color="#000080">THEN  </font><font color="#008000">'       Are we in Block0?
                                        '       ----  YES    
                </font>ControlByte=Block1      <font color="#008000">'               Switch To Block1
                </font>Address = 0             <font color="#008000">'               Start at first address
                </font><font color="#000080">ELSE                    </font><font color="#008000">'       ----  NO
                    </font><font color="#000080">STOP                </font><font color="#008000">'               EEPROM is full.. 
                </font><font color="#000080">ENDIF                   </font><font color="#008000">'
            </font><font color="#000080">ENDIF
        GOTO </font>Start
    Now you just need to keep track of ControlByte and Address values.

    HTH
    Last edited by mister_e; - 17th June 2007 at 21:29.
    Steve

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

Similar Threads

  1. 24lc1025 24lc256 external memory
    By JAY.M in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 23rd October 2010, 07:44
  2. SERIN2 buffer issues...
    By cpayne in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 16th October 2008, 03:49
  3. Solved: notes on annoying little issues
    By Probotics in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 26th May 2008, 20:02
  4. Where should I discuss SD/MMC FAT issues?
    By JD123 in forum General
    Replies: 92
    Last Post: - 2nd April 2008, 21:41
  5. I2C Master Slave issues.
    By cpayne in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 29th March 2008, 19:33

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