Skip to content

Commit 2dd82a5

Browse files
committed
README: update for EEPROM and edge counter
1 parent 2ca4f0d commit 2dd82a5

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

README.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
This project uses a Raspberry Pi Pico to identify and store various information
44
about a system/fixture, settable and retrievable over UART or USB. Additionally,
55
writing can be disabled by jumping GPIO pins 14 and 15 together (pins 19 and 20
6-
on the board).
6+
on the board), and GPIO 13 (pin 17 on the board) can be switched to GND and used
7+
as a falling edge counter, such as for a fixture lid switch.
78

8-
**Pre-built UF2 files ready to flash onto the Pico for both USB and UART are
9-
available [here](https://github.com/BloomyControls/pico-ident/releases).**
9+
This project makes use of a Pi Pico and a MIKROE EEPROM 3 Click. The I2C lines
10+
for the EEPROM should be connected to GPIOs 16 (SDA) and 17 (SCL) (pins 21 and
11+
22 on the board, respectively).
1012

1113
## Information Fields
1214

@@ -15,12 +17,7 @@ read the Pico's unique 64-bit identifier as a hex string, but of course this is
1517
read-only. The idea is that the Pico's serial number can always be used to
1618
uniquely identify any device, as no two Picos have the same serial.
1719

18-
It's worth noting that each sector (4096 bytes) of flash has a guaranteed
19-
minimum of 100,000 program-erase cycles according to the manufacturer. Each
20-
write to one of these fields will incur one erase and one program. This
21-
effectively limits us to 100,000 writes to any of these fields. Of course, the
22-
intended use of this device is to be set once and then write-locked for the rest
23-
of its lifespan, so that's likely not a huge concern here.
20+
The EEPROM specifies up to 1,000,000 writes per flash cell (per 4-byte word).
2421

2522
| Field | Access | Description |
2623
|---|---|---|
@@ -35,6 +32,7 @@ of its lifespan, so that's likely not a huge concern here.
3532
| `USER3` | Read-write | General-purpose field 3 |
3633
| `USER4` | Read-write | General-purpose field 4 |
3734
| `SERIAL` | Read-only | Pico's unique 64-bit serial number |
35+
| `EDGECOUNT?` | Read-only | Falling edge count on GP13 (board pin 17) |
3836

3937
Note that each of the above fields has a maximum length of 63. Each field is 64
4038
bytes, but is null-terminated. Values longer than 63 bytes will be truncated.
@@ -61,12 +59,13 @@ to query the manufacturer:
6159
MFG?\r
6260
```
6361

64-
There are two additional commands:
62+
There are some additional commands:
6563

6664
| Command | Description |
6765
|---|---|
6866
| `CLEAR` | Clear all writable fields |
69-
| `CHECK?` | Check that the data stored in flash matches the stored checksum, then return either `OK` or `ERR` |
67+
| `CHECK?` | Check that the data stored in EEPROM matches the stored checksum, then return either `OK` or `ERR` |
68+
| `RESETCOUNT` | Reset the edge count to 0 |
7069

7170
## Build Requirements
7271

0 commit comments

Comments
 (0)