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
For multiple chips the address lines A0, A1 and A2 of each chip need to be
46
-
wired to 3V3 in such a way as to give each device a unique address. These must
47
-
start at zero and be contiguous:
46
+
wired to 3V3 in such a way as to give each device a unique address. In the case
47
+
where chips are to form a single array these must start at zero and be
48
+
contiguous:
48
49
49
50
| Chip no. | A2 | A1 | A0 |
50
51
|:--------:|:---:|:---:|:---:|
@@ -130,26 +131,37 @@ Arguments:
130
131
devices it has detected.
131
132
4.`block_size=9` The block size reported to the filesystem. The size in bytes
132
133
is `2**block_size` so is 512 bytes by default.
133
-
5.`addr` override base address for first chip
134
-
6.`max_chips_count` override max_chips_count
135
-
7.`page_size=7` The binary logarithm of the page size of the EEPROMs, i.e., the page size in bytes is `2 ** page_size`. The page size may vary between chips from different manufacturers even for the same storage size. Note that specifying a too large value will most likely lead to data corruption in write operations. Look up the correct value for your setup in the chip's datasheet.
136
-
137
-
With `addr` and `max_chips_count` override, it's possible to make multiple
138
-
configuration
139
-
140
-
example:
141
-
142
-
array with custom chips count:
134
+
5.`addr` override base address for first chip.
135
+
6.`max_chips_count` override max_chips_count.
136
+
7.`page_size=None` EEPROM chips have a page buffer. By default the driver
137
+
determines the size of this automatically. It is possible to override this by
138
+
passing an integer being the page size in bytes: 16, 32, 64, 128 or 256. The
139
+
page size may vary between chips from different manufacturers even for the
140
+
same storage size. Note that specifying too large a value will most likely lead
141
+
to data corruption in write operations and will cause the test script's basic
142
+
test to fail. The correct value for a device may be found in in the chip
143
+
datasheet. It is also reported if `verbose` is set. Auto-detecting page size
144
+
carries a risk of data loss if power fails while auto-detect is in progress.
145
+
146
+
In most cases only the first two arguments are used, with an array being
147
+
instantiated with (for example):
148
+
```python
149
+
from machine importI2C
150
+
from eeprom_i2c importEEPROM, T24C512
151
+
eep = EEPROM(I2C(2), T24C512)
152
+
```
153
+
It is possible to configure multiple chips as multiple arrays. This is done by
154
+
means of the `addr` and `max_chips_count` args. Examples:
0 commit comments