Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- HEX Binary Notes
- 0x00000 0000 0000 0000 0000 0000 (Frist Address)
- 0x0F400 0000 1111 0100 0000 0000 Swapped A Start
- 0x0FFFF 0000 1111 1111 1111 1111 Swapped A End
- 0x10000 0001 0000 0000 0000 0000 (Page 2 Start)
- 0x18000 0001 1000 0000 0000 0000 Swapped B Start
- 0x1F3FF 0001 1111 0011 1111 1111 Swapped B End (Last Address)
- #include <Wire.h>
- byte i2c_eeprom_read_byte( int deviceaddress, unsigned long eeaddress ) {
- byte rdata = 0xFF;
- if( eeaddress > 65535 ){
- deviceaddress = deviceaddress | B00000100;
- eeaddress = eeaddress & 0xFFFF;
- }
- Wire.beginTransmission(deviceaddress);
- Wire.write((eeaddress >> 8)); // MSB
- Wire.write((eeaddress & 0xFF)); // LSB
- Wire.endTransmission();
- Wire.requestFrom(deviceaddress,1);
- if (Wire.available()) rdata = Wire.read();
- return rdata;
- }
- void setup() {
- Wire.setClock(400000);
- Wire.begin(); // initialise the connection
- Serial.begin(115200);
- delay(100); //add a small delay
- Serial.println("Arduino Group Delay Read Program");
- for (unsigned long i = 0; i < 128000; i++){
- Serial.print(i);
- Serial.print(",");
- byte a = i2c_eeprom_read_byte(0x50, i);
- Serial.println(a, BIN);
- }
- }
- void loop() {
- }
Add Comment
Please, Sign In to add comment