Wykres commitów

14 Commity (master)

Autor SHA1 Wiadomość Data
Peter Hinch 3b2e2530ef EEPROM: Add release notes. 2024-01-14 13:56:07 +00:00
Peter Hinch 2a2ceab903 EEPROM: Support i2c 2KiB eeproms, also MIP install. 2024-01-14 11:28:15 +00:00
Peter Hinch e06fd66bb3 spi: Bug in presence detect. 2024-01-12 08:39:07 +00:00
Peter Hinch ab0adab7d8 Fix bugs in I2C EEPROM. Auto detect page size. 2024-01-09 14:38:53 +00:00
Peter Hinch b5e9bcb160
Merge pull request #22 from adeuring/master
Add support for I2C EEPROMs with page sizes other than 128 in eeprom_…
2024-01-07 08:29:24 +00:00
Abel Deuring 6399f9f6d3
- "Meaning" of the new EEPROM constructor parameter `page_size` changed from
the size itself to the binary logarithm of the size.
- Default value of this parameter changed from None to 7, to match the
  behaviour of the constructor in its previous form, as discussed in the PR.
- Dictionary _PAGE_SIZES removed.
- Documentation updated.
2024-01-06 16:07:04 +01:00
Peter Hinch 26f2726fee Docs: Add warnig re block protocol methods. 2024-01-05 17:47:35 +00:00
Rinaldi Jandrinata 721f35918f
Update I2C.md 2023-10-16 14:32:05 +07:00
Rinaldi Jandrinata 29fe5e1aab
Update I2C.md
add `addr` and `max_chips_count` example code
2023-10-16 14:30:46 +07:00
Rinaldi Jandrinata 0b08e08b74
Update I2C.md
update constructor
2023-10-16 10:54:02 +07:00
Bohdan Danishevsky f84eb5cec2 Add support of Microchip AT24C32 and support of single chip for `EEPROM` class
[Description]

Adds support of:

1. Microchip AT24C32 (4 KiB)
2. Support of single chip setup for `EEPROM` class when single chip has address is
 0x57 so entire set of chips (1 chip in our case) addresses are not started from 0x50.

Example:

```python
from eeprom_i2c import EEPROM, T24C32

eeprom = PROM(machine.I2C(0), T24C32)
```

Improves tests implementation by adding dependency injection of `EEPROM`
object used during testing with support of old use case when object
had not been provided for testing.

Example (for AT24C32 connected to I2C0 of my Raspberry Pi Pico W) when we
creating instance of `EEPROM` and then passing it to `full_test` and also
providing proper block size for this chip:

```python
import machine
from eeprom_i2c import EEPROM, T24C32
from eep_i2c import full_test

def get_eep():
    return EEPROM(machine.I2C(0), T24C32)

def main():
    print("App started")

    print("Running tests")
    eep = get_eep()
    full_test(eep, block_size=32)
    print("App finished")

if __name__ == "__main__":
    main()
```

[Motivation]

Have DS3231 with soldered AT24C32 chip and want to use both RTC and EEPROM.
In my case AT24C32 has 0x57 as it's address and `EEPROM` class refused to
work with this setup.

[Testing]

Executed `full_test` from `eep_i2c` against AT24C32 (with address 0x57)
connected to my Raspberry Pi Pico W.

Test code:

```python
import machine
from eeprom_i2c import EEPROM, T24C32
from eep_i2c import full_test

def get_eep():
    return EEPROM(machine.I2C(0), T24C32)

def main():
    print("App started")

    print("Running tests")
    eep = get_eep()
    full_test(eep, block_size=32)
    print("App finished")

if __name__ == "__main__":
    main()
```
2022-09-24 17:42:58 +01:00
Peter Hinch 82104ac4cc Add delay after Pyboard D 3V3 enable - docs and test scripts. 2020-02-11 17:07:22 +00:00
Peter Hinch 9466ad2061 Add ESP8266 tests. 2020-01-11 18:02:19 +00:00
Peter Hinch fb0b7ab371 Directory structure: technology/interface. 2019-12-30 10:48:46 +00:00