need help about the 24AA01

Discussion in 'Embedded Systems and Microcontrollers' started by 466576266, Mar 25, 2010.

  1. 466576266

    Thread Starter New Member

    Mar 17, 2010
    10
    0
    Dear all,
    i meet with a problem recently, and i need your help.
    I'm trying to read and write from the 24AA01 using the I2C .
    my design is this: first, i write a data 0x88 into the 24AA01(address 0x02).then, i want to read the data(0x88) from the 24AA01. theoritically, i will get athe data 0x88. but what i get is 0xFF. and whatever i change the data , i can only get the data 0xFF. i donnt know what's wrong with my code, maybe something wrong with the hardware.
    the picture and the c code are attached. so, i need your help.thank you.
     
  2. R!f@@

    AAC Fanatic!

    Apr 2, 2009
    8,753
    760
    answer is simple.
    You are not writing anything into the memory. You circuit or I2C timing is wrong
     
  3. 466576266

    Thread Starter New Member

    Mar 17, 2010
    10
    0
    your answer is very interesting!
     
  4. R!f@@

    AAC Fanatic!

    Apr 2, 2009
    8,753
    760
    Yeah ! I know
    It's that I can't tell any other reason, besides proper I2C bus termination.
    Oh!! I forgot, have 2 100 ohms R installed in the Bus between the chips
     
  5. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    What microcontroller is this? At first glance at the attachment, maybe the pins labelled RXD and TXD are more likely candidates for the I2C. The pins you are connecting to aren't labelled anything special so maybe they are just regular IO pins.
     
  6. R!f@@

    AAC Fanatic!

    Apr 2, 2009
    8,753
    760
    Whoops ! I missed that part. It's a point.
     
  7. Tahmid

    Active Member

    Jul 2, 2008
    344
    25
    This seems to me like an 89c51 or some 8051 microcontroller and you are using software I2C. Am I right? I also assume that the RXD and TXD pins are for UART.
     
Loading...