This question is not directly related to Flowcode, but I'm struggeling with this question:
I have an 24C04 eeprom and want to write/read some data , I understand that i have to use a device address to get the eeprom responding to my request.
I only have the slightest idea how to become that adress, is it somewhere in the datasheet or what?
Hope someone can tell me.
Addressing an eeprom
Re: Addressing an eeprom
Hi djen
As i understand it the pins 1-2-3 they will be labeled either A0 A1 A2 or E1 E2 E2 for are used to set the device address, so if your using only 1 then these 3 pins should be grounded which gives address 000
so you would need to send
10100000(write)
the 4 bits 7-6-5-4 are 1010 (this tells the i2c bus its looking for the 24c02
the next 3 bits 3-2-1 are 000 (this is the hardwired device address you set earlier
le last bit 0 is 0 (this tells the bus you want to write to the device)
or
10100001 (read)
the 4 bits 7-6-5-4 are 1010 (this tells the i2c bus its looking for the 24c02
the next 3 bits 3-2-1 are 000 (this is the hardwired device address you set earlier
le last bit 0 is (this tells the bus you want to read the device)
those two will be sent as a hex number
so for a read 0xA1 and for a write 0xA0
if your writing you send 0xA0 then you would send the data address you want to write to the you would send the data, for a read you would send 0XA1 and the address you want to read from
As this is not flowcode related i cant offer anymore help but that should get you started
Regards
Dazz
As i understand it the pins 1-2-3 they will be labeled either A0 A1 A2 or E1 E2 E2 for are used to set the device address, so if your using only 1 then these 3 pins should be grounded which gives address 000
so you would need to send
10100000(write)
the 4 bits 7-6-5-4 are 1010 (this tells the i2c bus its looking for the 24c02
the next 3 bits 3-2-1 are 000 (this is the hardwired device address you set earlier
le last bit 0 is 0 (this tells the bus you want to write to the device)
or
10100001 (read)
the 4 bits 7-6-5-4 are 1010 (this tells the i2c bus its looking for the 24c02
the next 3 bits 3-2-1 are 000 (this is the hardwired device address you set earlier
le last bit 0 is (this tells the bus you want to read the device)
those two will be sent as a hex number
so for a read 0xA1 and for a write 0xA0
if your writing you send 0xA0 then you would send the data address you want to write to the you would send the data, for a read you would send 0XA1 and the address you want to read from
As this is not flowcode related i cant offer anymore help but that should get you started
Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php