Help with i2C eeprom


Results 1 to 6 of 6

Threaded View

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


    Did you find this post helpful? Yes | No

    Default

    Control Byte must be 8 bits... not 9...and you don't have to modify it. I2CREAD/I2CWRITE will handle it for you.

    One other thing, not sure of me for that one, I don't know if...
    I2CREAD plahplahplah...[MyVar]
    wich MyVar is pre-define as a word sized variable is a valide statement. BUT
    I2CREAD plahplahplah...[MyVar.LowByte,MyVar.HighByte]
    Is a valid statement.

    NOW...
    Quote Originally Posted by YourCode
    DEFINE I2C_SLOW 1 'Use for >8MHz OSC with standard speed devices
    DEFINE I2C_SDA PORTB,1 'Data pin for I2C (12-bit core only)
    DEFINE I2C_SCL PORTB,4 'Clock pin for I2C (12-bit core only)
    SSPSTAT.7=0
    SSPSTAT.6=0
    SSPCON.5=1
    SSPCON.4=1
    SSPCON.3=1
    SSPCON.2=0
    SSPCON.1=1
    SSPCON.0=1
    Duh???
    Last edited by mister_e; - 16th March 2006 at 03:32.
    Steve

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

Similar Threads

  1. I2C Master/Slave 16F88/16F767 working code
    By DanPBP in forum Code Examples
    Replies: 2
    Last Post: - 23rd October 2012, 22:31
  2. 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
  3. Problem with I2C EEPROM addressing
    By Atom058 in forum General
    Replies: 14
    Last Post: - 3rd November 2009, 03:17
  4. HARDWARE I2C SAMPLE CODE question
    By Michael Wakileh in forum Code Examples
    Replies: 2
    Last Post: - 16th June 2009, 21:07
  5. Pic16F628A and 24LC256 EEPROM I2C
    By Mike96 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 1st January 2006, 03:13

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