| ??? 11/26/09 14:41 Read: times |
#171199 - Please take some time to READ the Help Responding to: ???'s previous message |
You have a vast sequence of instructions. When all you want to do is write '_DATA' to location 0x1111 in the 24C256. And just to make it more incomprehensible, you have chosen '_DATA' to have a value of 0x11.
Murray has shown an example for a 24C02. You must do all the I2C commands in the correct order. You have issued a STOP before the READ. If you write the functions correctly, then you would simply have:
char i2c_write_single_byte_at(char slave, unsigned int address, char value);
char i2c_read_single_byte_at(char slave, unsigned int address);
...
if (i2c_write_single_byte_at(0xA0, 0x1234, 0x56) != OK) { // an error
...
value = i2c_write_single_byte_at(0xA0, 0x1234); // read value
You can build your functions from Murray's primitives. Or you may choose to write functions with a 'size' parameter so that you read or write multiple bytes. David. |
| Topic | Author | Date |
| AT24C256 | 01/01/70 00:00 | |
| help | 01/01/70 00:00 | |
| BitBang's Amost Always.... | 01/01/70 00:00 | |
| Why use void functions | 01/01/70 00:00 | |
| thanks | 01/01/70 00:00 | |
| Writing to specific address | 01/01/70 00:00 | |
| Send sensible address values. | 01/01/70 00:00 | |
| I2C_0.0.zip | 01/01/70 00:00 | |
| no luck, | 01/01/70 00:00 | |
| You have more pins to mis-wire. | 01/01/70 00:00 | |
| i2c used, What should be the address | 01/01/70 00:00 | |
| Read Murray's excellent Help Files | 01/01/70 00:00 | |
| Incorrect reply | 01/01/70 00:00 | |
| Please take some time to READ the Help | 01/01/70 00:00 | |
| single byte read write working | 01/01/70 00:00 | |
I2C_0.1.zip released! | 01/01/70 00:00 |



