3 Commits fef1d05983 ... 80fc38281e

Author SHA1 Message Date
  Fabian Peter Hammerle 80fc38281e document GDO0 3 years ago
  Fabian Peter Hammerle 1c7c080f88 readme / wiring: adapt phrasing & order 3 years ago
  Fabian Peter Hammerle eb13c4bf8e readme / wiring: added GDO2 3 years ago
2 changed files with 20 additions and 12 deletions
  1. 17 12
      README.md
  2. 3 0
      cc1101/__init__.py

+ 17 - 12
README.md

@@ -24,22 +24,27 @@ $ sudo apt-get install --no-install-recommends python3-spidev
 
 Connect the following pins directly:
 
-|C1101|Raspberry Pi        |
-|-----|--------------------|
-|VDD  | 3.3V (Pin 1 or 17) |
-|SI   | MOSI (Pin 19)      |
-|SO   | MISO (Pin 21)      |
-|CSn  | CE0 (Pin 24)       |
-|SCLK | SCLK (Pin 23)      |
-|GND  | Ground             |
-
-If these pins are already in use,
+|C1101 |Raspberry Pi        |
+|------|--------------------|
+|VDD   | 3.3V (Pin 1 or 17) |
+|SI    | MOSI (Pin 19)      |
+|SO    | MISO (Pin 21)      |
+|CSn   | CE0 (Pin 24)       |
+|SCLK  | SCLK (Pin 23)      |
+|GDO2\*| Any GPIO pin, commonly GPIO25 (Pin 22) \[[1](https://github.com/SpaceTeddy/CC1101/blob/0d0f011d3b808e36ad57fab596ed5e1db9516856/README.md#hardware-connection),[2](https://allgeek.de/2017/07/31/cc1101-spi-raspberry-adapter-fuer-homegear-homematicmax/),[3](https://securipi.co.uk/cc1101.pdf)\] |
+|GDO0\*| Any GPIO pin, GPIO24 (Pin 18) recommended |
+|GND   | Ground             |
+
+No resistors required.
+Connection of pins marked with \* is optional.
+GDO2 stays "high until power and crystal have stabilized" (see `CHIP_RDYn` in docs).
+GDO0 is used by `.asynchronous_transmission()` for data input.
+
+If some of these pins are already in use,
 select a different SPI bus or chip select:
 https://www.raspberrypi.org/documentation/hardware/raspberrypi/spi/README.md
 ([permalink](https://github.com/raspberrypi/documentation/blob/d41d69f8efa3667b1a8b01a669238b8bd113edc1/hardware/raspberrypi/spi/README.md#hardware))
 
-No resistors required. GDO0 & GDO2 are currently unused.
-
 Raspberry Pi GPIO docs: https://www.raspberrypi.org/documentation/usage/gpio/
 
 ## Usage

+ 3 - 0
cc1101/__init__.py

@@ -842,6 +842,9 @@ class CC1101:
     @contextlib.contextmanager
     def asynchronous_transmission(self) -> typing.Iterator[Pin]:
         """
+        > [...] the GDO0 pin is used for data input [...]
+        > The CC1101 modulator samples the level of the asynchronous input
+        > 8 times faster than the programmed data rate.
         see "27.1 Asynchronous Serial Operation"
 
         >>> with cc1101.CC1101() as transceiver: