External EEPROM can't read/write


Results 1 to 17 of 17

Threaded View

  1. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    First thoughts... Get rid of the fat...
    Break it down...Make it as simple as possible.
    Read and write a single value to a single location, then build your way up to the final result.
    Then try this:
    Code:
    eepromaddress var word
    eepromdata var byte
    i2cd var portc.0
    i2cc var portc.1
    eepromctrl var byte
    eepromctrl = $a0
    i2cread i2cd , i2cc , eepromctrl , eepromaddress , [ eepromdata ]
    i2cwrite i2cd , i2cc , $a0 , eepromaddress , [ eepromdata ]
    Notice anything different?


    (besides the fact that there isn't a single colon up there )
    (I could've done this
    Code:
    a var word:d var byte:c var portc.0:k var portc.1:n var byte:n=160:i2cread c,k,n,a,[d]:i2cwrite c,k,n,a,[d]
    Last edited by skimask; - 8th May 2008 at 05:53.

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. Replies: 1
    Last Post: - 28th January 2010, 22:15
  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. Internal EEPROM Read/write Addressing Errors with 18F PIC's
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 18
    Last Post: - 12th July 2005, 19:42
  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