You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27-26Lines changed: 27 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,15 +7,15 @@ _This manual is released by the author into the public domain._
7
7
- Connect Arduino 5V to EEPROM Vcc.
8
8
9
9
#Arduino set-up:
10
-
* Open the Arduino IDE.
11
-
* Connect Arduino (I used USB).
12
-
* Choose correct board and serial port in Arduino IDE.
13
-
* Upload code to Arduino using the IDE.
14
-
* Open serial console (Ctrl+Shift+M).
15
-
* The board waits 4 seconds after Arduino reset (end of upload).
16
-
* Then it promps for I²C address.
17
-
* If you miss this prompt, just enter the address.
18
-
* If you don't know the address, enter the character 'P'.
10
+
1. Open the Arduino IDE.
11
+
2. Connect Arduino (I used USB).
12
+
3. Choose correct board and serial port in Arduino IDE.
13
+
4. Upload code to Arduino using the IDE.
14
+
5. Open serial console (Ctrl+Shift+M).
15
+
6. The board waits 4 seconds after Arduino reset (end of upload).
16
+
7. Then it promps for I²C address.
17
+
* If you do not see this prompt, just enter the address.
18
+
* If you don't know the address, enter the character 'P'.
19
19
20
20
#Getting started:
21
21
If you opened the serial console soon enough, you'll be prompted for an I²C address or a 'P'. If you did not open the serial console within four seconds after the Arduino reset, you will not see the prompt, but the Arduino will still patiently wait for your input.
@@ -26,8 +26,8 @@ Enter the address, or the character 'P'.
26
26
__The Arduino wire library works with 7-bit I²C adresses.__
27
27
28
28
The Arduino Serial library can easily parse decimal values, not hex codes. Therefore the default T24C02A address 0xA0 is rendered thus:
29
-
* Right-shift one bit to get 7-bit address: 0xA0 >> 1 → 0x50
30
-
* Convert to decimal: 0x50 → 5×16 + 0 = 80
29
+
1. Right-shift one bit to get 7-bit address: 0xA0 >> 1 → 0x50
30
+
2. Convert to decimal: 0x50 → 5×16 + 0 = 80
31
31
32
32
##Polling:
33
33
If you entered the character 'P', the Arduino will poll all 128 possible addresses on the I²C bus.
@@ -37,23 +37,24 @@ If you entered the character 'P', the Arduino will poll all 128 possible address
37
37
Once you have successfully entered an address, you will arrive in the main shell menu.
38
38
39
39
You will be asked for a command char:
40
+
40
41
R — Read
41
42
W — Write
42
-
S — Set I²C address_useful if you set it wrong, have multiple EEPROMs or have a T24C04A, T24C08A or T24C16A IC._
43
+
S — Set I²C address
43
44
P — Poll the I²C bus.
44
-
45
+
_S is useful if you set the I2C address wrong, have multiple EEPROMs or have a T24C04A, T24C08A or T24C16A IC._
45
46
##Reading:
46
-
- Follow the instruction:
47
+
1. Follow the instruction:
47
48
- Enter the start address for the read.
48
49
- Enter the number of bytes to be read.
49
-
- The device will print all characters on a single line.
50
-
- Followed by a line of statistics.
51
-
- Optionally followed by a line indicating an error.
50
+
2. The device will print all characters on a single line.
51
+
3. Followed by a line of statistics.
52
+
- Optionally followed by a line indicating an error.
52
53
53
54
##Writing:
54
-
- Follow the instruction:
55
-
- Enter the start address for the write.
56
-
- Enter the string to be written.
55
+
1. Follow the instruction:
56
+
2. Enter the start address for the write.
57
+
3. Enter the string to be written.
57
58
58
59
_Escape numerical ASCII representations of characters by prefixing them with an '@'._
59
60
_@64 is the @ character itself, in case you want to write an actual @._
@@ -62,17 +63,17 @@ You will be asked for a command char:
62
63
- The device will print a human readable error message for each unsuccessful write.
63
64
- The device will retransmit (including reprint of) the character up to NUM_TRIES times.
64
65
65
-
`NUM_TRIES` is set to 10 by default in the code.
66
+
`NUM_TRIES` is set to 10 in the code by default.
66
67
67
-
__After ten failed tries the device:__
68
-
-Will print an error message indication.
69
-
-It will skip this address.
70
-
- It will continue to write the next character to the next location in the EEPROM.
68
+
###After ten failed tries:
69
+
-You get an error message indication.
70
+
-The device skips this address.
71
+
- It continues to write the next character to the next location in the EEPROM.
71
72
72
73
##Setting the I²C address:
73
74
The same procedure as detailed in the section "Getting Started", see above.
74
75
75
76
##Polling:
76
77
The same procedure as detailed in the section "Getting Started", see above.
77
78
78
-
This polling is not done as part of a change of address. Therefore, the device will give information on the polled devices, and return to the menu immediately afterwards.
79
+
_This polling is not done as part of a change of address. Therefore, the device will give information on the polled devices, and return to the menu immediately afterwards._
0 commit comments