cancel
Showing results for 
Search instead for 
Did you mean: 

How do I write & save data to a 24c02 using a buspirate?

TBodi.1
Associate

0693W000003PfS8QAK.jpgI have wired up the Bus Pirate in this manner.

When I try to write data this is what I see:

HiZ>m
1. HiZ
2. 1-WIRE
3. UART
4. I2C
5. SPI
6. 2WIRE
7. 3WIRE
8. LCD
9. DIO
x. exit(without change)
 
(1)>4
Set speed:
 1. ~5KHz
 2. ~50KHz
 3. ~100KHz
 4. ~400KHz
 
(1)>3
Ready
I2C>P
Pull-up resistors ON
Warning: no voltage on Vpullup pin
I2C>W
Power supplies ON
I2C>(1)
Searching I2C address space. Found devices at:
0xA0(0x50 W) 0xA1(0x50 R)
 
I2C>[0x50 r
I2C START BIT
WRITE: 0x50 NACK
READ: 0xFF
I2C>"This is a Test"
WRITE: "T ACK  NACKh NACKi NACKs NACK  NACKi NACKs NACK  NACKa NACK  NACKT NACKe NACKs NACKt NACK"
I2C>]
I2C STOP BIT
I2C>[0x50 r:20]
I2C START BIT
WRITE: 0x50 NACK
READ: 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF
NACK
I2C STOP BIT

So it appears the data I wanted write "This is a test" didn't get written.

Next I hooked up the Auxiliary pin .

0693W000003PfdQQAS.jpg

Then I tried to write data again:

I2C>W
Power supplies ON
I2C>v
Pinstates:
1.(BR)  2.(RD)  3.(OR)  4.(YW)  5.(GN)  6.(BL)  7.(PU)  8.(GR)  9.(WT)  0.(Blk)
GND     3.3V    5.0V    ADC     VPU     AUX     SCL     SDA     -       -
P       P       P       I       I       I       I       I       I       I
GND     3.31V   4.96V   0.00V   4.96V   L       H       H       H       H
I2C>a
AUX LOW
I2C>(1)
Searching I2C address space. Found devices at:
0xA0(0x50 W) 0xA1(0x50 R)
 
I2C>[0xA0 r:20]
I2C START BIT
WRITE: 0xA0 ACK
READ: 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF
NACK
I2C STOP BIT
I2C>[0xA0 "This is another test"]
I2C START BIT
WRITE: 0xA0 ACK
WRITE: "T ACKh ACKi ACKs ACK  ACKi ACKs ACK  ACKa ACKn ACKo ACKt ACKh ACKe ACKr ACK  ACKt ACKe ACKs ACKt ACK"
I2C STOP BIT
I2C>[0xA0 r:20]
I2C START BIT
WRITE: 0xA0 ACK
READ: 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF
NACK
I2C STOP BIT
I2C>A
AUX HIGH
I2C>[0xa0 r:20]
I2C START BIT
WRITE: 0xA0 ACK
READ: 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF
NACK
I2C STOP BIT
I2C>[0xa0 "This is another test"]
I2C START BIT
WRITE: 0xA0 ACK
WRITE: "T ACKh ACKi ACKs ACK  ACKi ACKs ACK  ACKa ACKn ACKo ACKt ACKh ACKe ACKr ACK  ACKt ACKe ACKs ACKt ACK"
I2C STOP BIT
I2C>[0xa0 r:20]
I2C START BIT
WRITE: 0xA0 ACK
READ: 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF  ACK 0xFF
NACK
I2C STOP BIT
I2C>

So even with Aux High or Low I still seem to be unable to change the data in the eeprom.

Any Ideas would be appreciated.

1 REPLY 1
Eleon BORLINI
ST Employee

Hi @Bacteriusodine​ , I added the EEPROM topic for help from experts of M24C02 product. Regards