Page 1 of 1
i2c macro
Posted: Sat Feb 05, 2011 2:10 pm
by saschech@gmx.de
Hello
I want work with a i2c eeprom 24FC1025
If i take as device id = 0xa0 > write i show 64 instead (160) in all v4.
regards wolfgang
Re: i2c macro
Posted: Sun Feb 06, 2011 7:19 am
by Dan81
Hello Wolfgang
With "Transaction" macros , Device_ID is the "real" I2C address (7 bits) : 0x50 not the control byte 0xA0 (Write) or 0xA1(Read).
(in the code there is a "left shift" and 0xA0 becomes 0x20=64)
Daniel
Re: i2c macro
Posted: Sun Feb 06, 2011 7:49 am
by saschech@gmx.de
Hello Daniel
ok,but what is the right input for wr or rd the 24FC1025_eeprom??
Regards wolfgang
Re: i2c macro
Posted: Sun Feb 06, 2011 1:53 pm
by Dan81
Hello Wolfgang
If you want to write from 0x 0 0000 to 0x 0 FFFF
try : Send Byte Transaction ( 0x50, hh, ll ,data)
If you want to write from 0x 1 0000 to 0x 1 FFFF
try : Send Byte Transaction ( 0x54, hh, ll ,data)
I suppose that A1 and A0 are connected to GND
I can't test it on hardware.
With "transaction" macros , you'll be able to write (or read) only 1 data at a time.
Sequential read or write could be interesting.
Daniel
Re: i2c macro
Posted: Sun Feb 06, 2011 2:38 pm
by saschech@gmx.de
Hello Daniel
I understand,but ........
Regards wolfgang
Re: i2c macro
Posted: Sun Feb 06, 2011 5:46 pm
by Harry Tuttle
Hi,
Is this what you should be seeing s,64,0,0,8,P?
This is version V4 of flow code.
Not sure what is wrong with yours!!!
Re: i2c macro
Posted: Tue Feb 08, 2011 7:56 am
by saschech@gmx.de
Hello Harry
I look for adresse :
a7 > 8 0
a6 > 0 0
a5 > 2 0
a4 > 0 0
___10 0 > hex 0xa0
The macro work:
a7 > 0 0
a6 > 4 0
a5 > 0 0
a4 > 1 0
____5 0 >hex 0x50 << 1 = 0xa0 = 160
You understand?
Regards Wolfgang