Skip to content

Commit 6ba80ea

Browse files
committed
attempt two to fix the markdown of the readme.
1 parent 19c46c5 commit 6ba80ea

1 file changed

Lines changed: 22 additions & 22 deletions

File tree

README.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,36 +7,31 @@ _This manual is released by the author into the public domain._
77
- Connect Arduino 5V to EEPROM Vcc.
88

99
#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+
* 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'.
1919

2020
#Getting started:
21-
If you opened the serial console soon enough, you'll be prompted for an I²C address or a 'P'.
22-
23-
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.
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.
2422

2523
Enter the address, or the character 'P'.
2624

27-
##The address:
28-
__The Arduino wire library works with 7-bit adresses.__
29-
30-
The Arduino Serial library can easily parse decimal values, not hex codes.
31-
32-
Therefore the default T24C02A address 0xA0 is rendered thus:
25+
##Setting the I²C address:
26+
__The Arduino wire library works with 7-bit I²C adresses.__
3327

34-
Shift right one bit to get 7-bit address: 0xA0 >> 1 → 0x50
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
3531

36-
Convert to decimal: 0x50 → 5×16 + 0 = 80
3732
##Polling:
3833
If you entered the character 'P', the Arduino will poll all 128 possible addresses on the I²C bus.
39-
It wil show you the address + answer of the devices that answered.
34+
It wil show you the address the devices that answered, and their answers.
4035

4136
#The main menu:
4237
Once you have successfully entered an address, you will arrive in the main shell menu.
@@ -46,13 +41,15 @@ You will be asked for a command char:
4641
W — Write
4742
S — Set I²C address _useful if you set it wrong, have multiple EEPROMs or have a T24C04A, T24C08A or T24C16A IC._
4843
P — Poll the I²C bus.
44+
4945
##Reading:
5046
- Follow the instruction:
5147
- Enter the start address for the read.
5248
- Enter the number of bytes to be read.
5349
- The device will print all characters on a single line.
5450
- Followed by a line of statistics.
5551
- Optionally followed by a line indicating an error.
52+
5653
##Writing:
5754
- Follow the instruction:
5855
- Enter the start address for the write.
@@ -63,12 +60,15 @@ You will be asked for a command char:
6360
- The device will print a human readable error message for each unsuccessful write.
6461
- The device will retransmit (including reprint of) the character up to NUM_TRIES times.
6562
_<NUM_TRIES> is set to 10 by default in the code._
63+
6664
__After ten failed tries the device:__
6765
- Will print an error message indication.
6866
- It will skip this address.
6967
- It will continue to write the next character to the next location in the EEPROM.
68+
7069
##Setting the I²C address:
7170
The same procedure as detailed in the section "Getting Started", see above.
71+
7272
##Polling:
7373
The same procedure as detailed in the section "Getting Started", see above.
74-
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.
74+
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

Comments
 (0)