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
i2c macro
Moderator: Benj
- Dan81
- Valued Contributor
- Posts: 268
- Joined: Sun Jan 15, 2006 4:07 pm
- Location: Albi France
- Been thanked: 60 times
- Contact:
Re: i2c macro
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
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
-
- Posts: 714
- Joined: Wed Jan 31, 2007 12:41 pm
- Has thanked: 1 time
- Been thanked: 26 times
Re: i2c macro
Hello Daniel
ok,but what is the right input for wr or rd the 24FC1025_eeprom??
Regards wolfgang
ok,but what is the right input for wr or rd the 24FC1025_eeprom??
Regards wolfgang
- Attachments
-
- eeprom.gif
- (39.14 KiB) Downloaded 915 times
- Dan81
- Valued Contributor
- Posts: 268
- Joined: Sun Jan 15, 2006 4:07 pm
- Location: Albi France
- Been thanked: 60 times
- Contact:
Re: i2c macro
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
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
-
- Posts: 714
- Joined: Wed Jan 31, 2007 12:41 pm
- Has thanked: 1 time
- Been thanked: 26 times
-
- Posts: 27
- Joined: Sat Aug 01, 2009 3:15 pm
- Has thanked: 2 times
- Been thanked: 10 times
Re: i2c macro
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!!!
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!!!
-
- Posts: 714
- Joined: Wed Jan 31, 2007 12:41 pm
- Has thanked: 1 time
- Been thanked: 26 times
Re: i2c macro
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
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
- Attachments
-
- i2c adressen.gif
- (98.89 KiB) Downloaded 874 times