ds1307_how_to_access_ram
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ds1307_how_to_access_ram [2011/09/12 21:40] – tomgee | ds1307_how_to_access_ram [2011/09/12 21:44] (current) – tomgee | ||
---|---|---|---|
Line 10: | Line 10: | ||
| | ||
| | ||
+ | |||
+ | This will set the I2C address to 0x68, the DS1307 Address.\\ | ||
+ | The second line sets the register index to 8, the start of RAM.\\ | ||
+ | The third line, Wire.endTransmission(); | ||
+ | |||
+ | Subsequent reads from the chip will start at 8. For example, to read 4 bytes from the chip:\\ | ||
+ | | ||
+ | |||
+ | The above line will put the 4 bytes into the receive buffer. To fetch the bytes: | ||
+ | |||
+ | | ||
+ | | ||
+ | byte c = Wire.receive(); | ||
+ | Serial.print(c, | ||
+ | Serial.print(" | ||
+ | } | ||
+ | |||
+ |
ds1307_how_to_access_ram.1315878020.txt.gz · Last modified: 2011/09/12 21:40 by tomgee