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
+12-12
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
1
_This manual is released by the author into the public domain._
2
2
3
-
#T24C02A EEPROM set-up:
3
+
#T24C02A EEPROM set-up:
4
4
- Connect Arduino GND to EEPROM GND.
5
5
- Connect Arduino SDA to EEPROM SDA.
6
6
- Connect Arduino SCL to EEPROM SCL.
7
7
- Connect Arduino 5V to EEPROM Vcc.
8
8
9
-
#Arduino set-up:
9
+
#Arduino set-up:
10
10
1. Open the Arduino IDE.
11
11
2. Connect Arduino (I used USB).
12
12
3. Choose correct board and serial port in Arduino IDE.
@@ -17,12 +17,12 @@ _This manual is released by the author into the public domain._
17
17
* If you do not see this prompt, just enter the address.
18
18
* If you don't know the address, enter the character 'P'.
19
19
20
-
#Getting started:
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.
22
22
23
23
Enter the address, or the character 'P'.
24
24
25
-
##Setting the I²C address:
25
+
##Setting the I²C address:
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:
@@ -32,11 +32,11 @@ The Arduino Serial library can easily parse decimal values, not hex codes. There
32
32
33
33
_If you have a T24C04A, T24C08A or T24C16A, you can change addresses later to write to other memory pages._
34
34
35
-
##Polling the I²C bus:
35
+
##Polling the I²C bus:
36
36
If you entered the character 'P', the Arduino will poll all 128 possible addresses on the I²C bus.
37
37
It wil show you the address the devices that answered, and their answers.
38
38
39
-
#The main menu:
39
+
#The main menu:
40
40
Once you have successfully entered an address, you will arrive in the main shell menu.
41
41
42
42
You will be asked for a command char:
@@ -46,15 +46,15 @@ You will be asked for a command char:
46
46
S — Set I²C address
47
47
P — Poll the I²C bus.
48
48
S is useful if you set the I2C address wrong, have multiple EEPROMs or have a T24C04A, T24C08A or T24C16A IC.
49
-
##Reading:
49
+
##Reading:
50
50
1. Follow the instruction:
51
51
- Enter the start address for the read.
52
52
- Enter the number of bytes to be read.
53
53
2. The device will print all characters on a single line.
54
54
3. Followed by a line of statistics.
55
55
- Optionally followed by a line indicating an error.
56
56
57
-
##Writing:
57
+
##Writing:
58
58
1. Follow the instruction:
59
59
2. Enter the start address for the write.
60
60
3. Enter the string to be written.
@@ -65,20 +65,20 @@ S is useful if you set the I2C address wrong, have multiple EEPROMs or have a T2
65
65
- The device will retransmit (including reprint of) the character up to NUM_TRIES times.
66
66
-`NUM_TRIES` is set to 10 in the code by default.
67
67
68
-
###After ten failed tries:
68
+
###After ten failed tries:
69
69
- You get an error message indication.
70
70
- The device skips this address.
71
71
- It continues to write the next character to the next location in the EEPROM.
72
72
73
-
##Setting the I²C address:
73
+
##Setting the I²C address:
74
74
The same procedure as detailed in the section "Getting Started", see above.
75
75
76
-
##Polling the I²C bus:
76
+
##Polling the I²C bus:
77
77
The same procedure as detailed in the section "Getting Started", see above.
78
78
79
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._
80
80
81
-
#Advanced command usage:
81
+
#Advanced command usage:
82
82
Due to the way the Arduino Serial library works, you need not wait for the prompt to enter the next command. It reads command characters and numerical characters separately as well thus:
83
83
84
84
`R11 13` will read thirteen bytes starting at EEPROM address 11.
0 commit comments