f57ef79660e57693d15355be7efd06419f03c686
Chip-cn-dat/Espressif-dat/ESP8266-DAT/ESP8266-HDK-dat/ESP8266-HDK-dat.md
| ... | ... | @@ -82,24 +82,38 @@ The ESP8266EX schematics include seven aspects: |
| 82 | 82 | |
| 83 | 83 | ### ❌ What GPIO16 **Cannot** Do |
| 84 | 84 | |
| 85 | -| Feature | Support | Notes | |
|
| 86 | -|---------------------------|---------|-----------------------------------------------------------------------| |
|
| 87 | -| PWM (analogWrite) | ❌ No | GPIO16 does **not support hardware PWM**. | |
|
| 88 | -| Interrupts (attachInterrupt) | ❌ No | Cannot be used for interrupts. | |
|
| 89 | -| I²C / SPI / UART | ❌ No | Not multiplexed for any peripheral functions. | |
|
| 90 | -| Analog input | ❌ No | ESP8266 has only one ADC (ADC0), not on GPIO16. | |
|
| 91 | -| Open-drain / Pull-up/down | ❌ No | Limited internal resistor configuration. | |
|
| 92 | -| Output during deep sleep | ⚠️ Caution | When used for deep sleep wake, it must not be driven externally. | |
|
| 85 | +| Feature | Support | Notes | |
|
| 86 | +| ---------------------------- | --------- | ---------------------------------------------------------------- | |
|
| 87 | +| PWM (analogWrite) | ❌ No | GPIO16 does **not support hardware PWM**. | |
|
| 88 | +| Interrupts (attachInterrupt) | ❌ No | Cannot be used for interrupts. | |
|
| 89 | +| I²C / SPI / UART | ❌ No | Not multiplexed for any peripheral functions. | |
|
| 90 | +| Analog input | ❌ No | ESP8266 has only one ADC (ADC0), not on GPIO16. | |
|
| 91 | +| Open-drain / Pull-up/down | ❌ No | Limited internal resistor configuration. | |
|
| 92 | +| Output during deep sleep | ⚠️ Caution | When used for deep sleep wake, it must not be driven externally. | |
|
| 93 | 93 | |
| 94 | 94 | --- |
| 95 | 95 | |
| 96 | 96 | ### ✅ What GPIO16 **Can** Do |
| 97 | 97 | |
| 98 | -| Feature | Support | Notes | |
|
| 99 | -|-----------------------|---------|-----------------------------------------------------------------| |
|
| 100 | -| Digital output | ✅ Yes | Use with `digitalWrite()`. | |
|
| 101 | -| Digital input | ✅ Yes | Use with `digitalRead()`. | |
|
| 102 | -| Deep sleep wake | ✅ Yes | Connect GPIO16 to RST to enable timed wake from deep sleep. |
|
| 98 | +| Feature | Support | Notes | |
|
| 99 | +| --------------- | ------- | ----------------------------------------------------------- | |
|
| 100 | +| Digital output | ✅ Yes | Use with `digitalWrite()`. | |
|
| 101 | +| Digital input | ✅ Yes | Use with `digitalRead()`. | |
|
| 102 | +| Deep sleep wake | ✅ Yes | Connect GPIO16 to RST to enable timed wake from deep sleep. | |
|
| 103 | + |
|
| 104 | +## interrrupt |
|
| 105 | + |
|
| 106 | +## ✅ Recommended GPIOs for Interrupts |
|
| 107 | + |
|
| 108 | +| GPIO | Usable for Interrupts? | Notes | |
|
| 109 | +|------|-------------------------|----------------------------------| |
|
| 110 | +| **GPIO0** | ✅ Yes | Must be HIGH at boot (pulled LOW enters flash mode) | |
|
| 111 | +| **GPIO2** | ✅ Yes | Must be HIGH at boot | |
|
| 112 | +| **GPIO4** | ✅ Yes | Safe | |
|
| 113 | +| **GPIO5** | ✅ Yes | Safe | |
|
| 114 | +| **GPIO12** | ✅ Yes | Safe | |
|
| 115 | +| **GPIO13** | ✅ Yes | Safe | |
|
| 116 | +| **GPIO14** | ✅ Yes | Safe | |
|
| 103 | 117 | |
| 104 | 118 | |
| 105 | 119 | ## peripherals |
Chip-dat/SemTech-dat/SX1262-HDK-dat/SX1262-HDK-dat.md
| ... | ... | @@ -0,0 +1,138 @@ |
| 1 | + |
|
| 2 | +# SX1262-HDK-dat |
|
| 3 | + |
|
| 4 | +- [[rf-switch-dat]] - [[network-dat]] |
|
| 5 | + |
|
| 6 | +- [[lora-HDK-dat]] |
|
| 7 | + |
|
| 8 | +- [[LORA-HDK-dat]] - [[SX1262-MD1-dat]] - [[SX1262-HDK-dat]] - [[SX1262-dat]] |
|
| 9 | + |
|
| 10 | +## wiring while NOT using DIO2 control TXEN / RXEN of RF switch |
|
| 11 | + |
|
| 12 | +(NSS_d + SCK + MOSI + MISO) + BUSY + DIO1_irq + RXEN + TXEN + RESET_optional |
|
| 13 | + |
|
| 14 | + |
|
| 15 | + |
|
| 16 | +## ✅ Required Pins (Basic SPI Communication) |
|
| 17 | + |
|
| 18 | +| Pin | Required | Purpose | |
|
| 19 | +| -------------- | -------- | --------------------------- | |
|
| 20 | +| **NSS_d** (CS) | ✅ Yes | SPI chip select (NSS) | |
|
| 21 | +| **SCK** | ✅ Yes | SPI clock | |
|
| 22 | +| **MOSI** | ✅ Yes | SPI data from MCU to SX1262 | |
|
| 23 | +| **MISO** | ✅ Yes | SPI data from SX1262 to MCU | |
|
| 24 | +| **BUSY** | ✅ Yes | Indicates radio busy status | |
|
| 25 | + |
|
| 26 | +> 🧠 `BUSY` must be monitored before and after sending SPI commands to ensure the radio is ready. |
|
| 27 | + |
|
| 28 | +--- |
|
| 29 | + |
|
| 30 | +## ⚠️ Conditional / Optional Pins |
|
| 31 | + |
|
| 32 | +| Pin | Required? | When Needed | |
|
| 33 | +| --------- | ---------- | ---------------------------------------------------------------------------------- | |
|
| 34 | +| **RESET** | ⚠️ Optional | Recommended for better stability; allows hard reset | |
|
| 35 | +| **DIO1** | ⚠️ Optional | Required if using interrupt-based handling (e.g., RX done, TX done) | |
|
| 36 | +| **DIO2** | ⚠️ Optional | Required only if using for RF switch/FEM control via `SetDio2AsRfSwitchCtrl(true)` | |
|
| 37 | +| **RXEN** | ❌ No | Not needed if using DIO2 for single-pin FEM control | |
|
| 38 | +| **TXEN** | ❌ No | Same as above | |
|
| 39 | + |
|
| 40 | + |
|
| 41 | + |
|
| 42 | +def in UserConfig.h |
|
| 43 | + |
|
| 44 | + //spi |
|
| 45 | + #define LCC68_NSS_PORT GPIOA |
|
| 46 | + #define LCC68_NSS_PIN GPIO_PIN_4 |
|
| 47 | + |
|
| 48 | + #define LCC68_SCK_PORT GPIOA |
|
| 49 | + #define LCC68_SCK_PIN GPIO_PIN_5 |
|
| 50 | + |
|
| 51 | + #define LCC68_MOSI_PORT GPIOA |
|
| 52 | + #define LCC68_MOSI_PIN GPIO_PIN_7 |
|
| 53 | + |
|
| 54 | + #define LCC68_MISO_PORT GPIOA |
|
| 55 | + #define LCC68_MISO_PIN GPIO_PIN_6 |
|
| 56 | + |
|
| 57 | + #define LCC68_NRST_PORT GPIOA |
|
| 58 | + #define LCC68_NRST_PIN GPIO_PIN_3 |
|
| 59 | + |
|
| 60 | + #define LCC68_BUSY_PORT GPIOA |
|
| 61 | + #define LCC68_BUSY_PIN GPIO_PIN_2 |
|
| 62 | + |
|
| 63 | + #define LCC68_DIO1_PORT GPIOC |
|
| 64 | + #define LCC68_DIO1_PIN GPIO_PIN_15 |
|
| 65 | + |
|
| 66 | + #define LCC68_RXEN_PORT GPIOA |
|
| 67 | + #define LCC68_RXEN_PIN GPIO_PIN_1 |
|
| 68 | + |
|
| 69 | + #define LCC68_TXEN_PORT GPIOA |
|
| 70 | + #define LCC68_TXEN_PIN GPIO_PIN_0 |
|
| 71 | + |
|
| 72 | + //Uart |
|
| 73 | + #define LOG_UART_TX_PORT GPIOA |
|
| 74 | + #define LOG_UART_TX_PIN GPIO_PIN_9 |
|
| 75 | + #define LOG_UART_RX_PORT GPIOA |
|
| 76 | + #define LOG_UART_RX_PIN GPIO_PIN_10 |
|
| 77 | + |
|
| 78 | + |
|
| 79 | + #define LORA_FRE 915000000 // frequency |
|
| 80 | + #define LORA_PREAMBLE_LENGTH 8 // PREAMBLE LENGTH |
|
| 81 | + #define LORA_SX126x_SYMBOL_TIMEOUT 0 // Symbols(SX126x) |
|
| 82 | + #define LORA_FIX_LENGTH_PAYLOAD_ON false // PAYLOAD FIX LENGTH |
|
| 83 | + #define LORA_IQ_INVERSION_ON false // IQ INVERSION |
|
| 84 | + |
|
| 85 | + #define SIZE_DATA 255 |
|
| 86 | + |
|
| 87 | + |
|
| 88 | + |
|
| 89 | + |
|
| 90 | +## wiring while DIO2 control TXEN / RXEN of RF switch |
|
| 91 | + |
|
| 92 | + |
|
| 93 | +NSS_d + SCK + MOSI + MISO + BUSY + DIO2 |
|
| 94 | +(Optional: RESET + DIO1) |
|
| 95 | + |
|
| 96 | + |
|
| 97 | + |
|
| 98 | + Microcontroller SX1262 RF Switch / FEM |
|
| 99 | + +-------------------+ +---------------+ +---------------------+ |
|
| 100 | + | | | | | | |
|
| 101 | + | MISO <-----+---------+ MISO | | | |
|
| 102 | + | MOSI ----->+---------+ MOSI | | | |
|
| 103 | + | SCK ----->+---------+ SCK | | | |
|
| 104 | + | NSS ----->+---------+ NSS | | | |
|
| 105 | + | RESET ---->+---------+ NRESET | | | |
|
| 106 | + | | | | | | |
|
| 107 | + | GND ------+---------+ GND |---------------+ GND | |
|
| 108 | + | 3.3V ------+---------+ VDD |---------------+ VCC (3.3V) | |
|
| 109 | + | | | | | | |
|
| 110 | + | | | RF_IO ------- +---------------- RF_IO | |
|
| 111 | + | | | | | | |
|
| 112 | + | | | DIO2 ---------+---------------> CTRL (TX/RX EN) | |
|
| 113 | + | | | | | | |
|
| 114 | + +-------------------+ +---------------+ +---------------------+ |
|
| 115 | + |
|
| 116 | +wiring in table |
|
| 117 | + |
|
| 118 | +| Pin | Name | Connects To Purpose | |
|
| 119 | +| ------ | ------------------- | ---------------------- | |
|
| 120 | +| NSS | MCU GPIO (CS) | SPI chip select | |
|
| 121 | +| SCK | MCU SPI clock | SPI clock line | |
|
| 122 | +| MOSI | MCU SPI MOSI | SPI data to SX1262 | |
|
| 123 | +| MISO | MCU SPI MISO | SPI data from SX1262 | |
|
| 124 | +| DIO2 | FEM CTRL / TXEN | Auto RF switch control | |
|
| 125 | +| RF_IO | RF switch input | RF path in/out | |
|
| 126 | +| NRESET | MCU GPIO (optional) | SX1262 reset pin | |
|
| 127 | +| VDD | 3.3V | Power supply | |
|
| 128 | +| GND | Ground | Common ground | |
|
| 129 | + |
|
| 130 | + |
|
| 131 | +coding |
|
| 132 | + |
|
| 133 | + // Enable automatic RF switch control on DIO2 |
|
| 134 | + Radio.SetDio2AsRfSwitchCtrl(true); |
|
| 135 | + |
|
| 136 | + // Set DIO2 as output (only needed if using raw DIO2 control in some cases) |
|
| 137 | + Radio.SetDioAsOutput(2); // Not always required |
|
| 138 | + |
Chip-dat/SemTech-dat/SX1262-dat/SX1262-MD1-dat/SX1262-MD1-dat.md
| ... | ... | @@ -1,6 +1,7 @@ |
| 1 | 1 | |
| 2 | 2 | # SX1262-MD1-dat |
| 3 | 3 | |
| 4 | +- [[LORA-HDK-dat]] - [[SX1262-MD1-dat]] - [[SX1262-HDK-dat]] - [[SX1262-dat]] |
|
| 4 | 5 | |
| 5 | 6 | ## pin definitions |
| 6 | 7 |
Chip-dat/SemTech-dat/SX1262-dat/SX1262-dat.md
| ... | ... | @@ -1,6 +1,8 @@ |
| 1 | 1 | |
| 2 | 2 | # SX1262-dat |
| 3 | 3 | |
| 4 | +- [[LORA-HDK-dat]] - [[SX1262-MD1-dat]] - [[SX1262-HDK-dat]] - [[SX1262-dat]] |
|
| 5 | + |
|
| 4 | 6 | - [[lora-dat]] - [[semtech-dat]] |
| 5 | 7 | |
| 6 | 8 | - datasheet - [[DS_SX1261_2 V2-2.pdf]] |
Tech-dat/BTB-dat/BTB-dat.md
| ... | ... | @@ -21,7 +21,7 @@ https://www.electrodragon.com/w/ED-BTB |
| 21 | 21 | | IO4 | IO | LORA_IRQ | |
| 22 | 22 | | IO27 | IO | LORA_RESET | |
| 23 | 23 | |
| 24 | - |
|
| 24 | +general wiring |
|
| 25 | 25 | |
| 26 | 26 | | ESP8266 | func | conn.L | conn.R | func | ESP8266 | |
| 27 | 27 | | ------- | -------- | ------ | ------ | ------------ | ------- | |
| ... | ... | @@ -38,7 +38,19 @@ https://www.electrodragon.com/w/ED-BTB |
| 38 | 38 | |
| 39 | 39 | - [[ESP8266-HDK-dat]] |
| 40 | 40 | |
| 41 | -- [[LORA-HDK-dat]] - [[SX1262-MD1-dat]] |
|
| 41 | +- [[LORA-HDK-dat]] - [[SX1262-MD1-dat]] - [[SX1262-HDK-dat]] |
|
| 42 | + |
|
| 43 | +wiring for [[SX1262-dat]] |
|
| 44 | + |
|
| 45 | +| ESP8266 | func | conn.L | conn.R | func | ESP8266 | |
|
| 46 | +| ------- | -------- | ------ | ------ | ------ | ------- | |
|
| 47 | +| io16 | BUSY | L-1 | R-1 | serial | TXD | |
|
| 48 | +| io14 | SPI_SCK | L-2 | R-2 | serial | RXD | |
|
| 49 | +| io12 | SPI_MISO | L-3 | R-3 | TXEN | io5 | |
|
| 50 | +| io13 | SPI_MOSI | L-4 | R-4 | RXEN | io4 | |
|
| 51 | +| IO0 | DIO1_irq | L-5 | R-5 | SPI_CS | io15_d | |
|
| 52 | +| 3V3 | power | L-6 | R-6 | power | GND | |
|
| 53 | + |
|
| 42 | 54 | |
| 43 | 55 | ## connectors |
| 44 | 56 |
Tech-dat/Network-dat/RF-dat/LORA-DAT/lora-hdk-dat/lora-hdk-dat.md
| ... | ... | @@ -1,9 +1,11 @@ |
| 1 | 1 | |
| 2 | 2 | # lora-hdk-dat |
| 3 | 3 | |
| 4 | +- [[LORA-HDK-dat]] - [[SX1262-MD1-dat]] - [[SX1262-HDK-dat]] - [[SX1262-dat]] |
|
| 5 | + |
|
| 4 | 6 | - [[lora-SDK-dat]] |
| 5 | 7 | |
| 6 | -- [[LNA-dat]] |
|
| 8 | +- [[LNA-dat]] - [[rf-switch-dat]] |
|
| 7 | 9 | |
| 8 | 10 | ## Dev board SCH |
| 9 | 11 | |
| ... | ... | @@ -17,54 +19,6 @@ |
| 17 | 19 | |
| 18 | 20 | - [[auto-serial-dat]] |
| 19 | 21 | |
| 20 | -(NSS_d + SCK + MOSI + MISO) + RESET + BUSY + DIO1 + RXEN + TXEN |
|
| 21 | - |
|
| 22 | -def in UserConfig.h |
|
| 23 | - |
|
| 24 | - //spi |
|
| 25 | - #define LCC68_NSS_PORT GPIOA |
|
| 26 | - #define LCC68_NSS_PIN GPIO_PIN_4 |
|
| 27 | - |
|
| 28 | - #define LCC68_SCK_PORT GPIOA |
|
| 29 | - #define LCC68_SCK_PIN GPIO_PIN_5 |
|
| 30 | - |
|
| 31 | - #define LCC68_MOSI_PORT GPIOA |
|
| 32 | - #define LCC68_MOSI_PIN GPIO_PIN_7 |
|
| 33 | - |
|
| 34 | - #define LCC68_MISO_PORT GPIOA |
|
| 35 | - #define LCC68_MISO_PIN GPIO_PIN_6 |
|
| 36 | - |
|
| 37 | - #define LCC68_NRST_PORT GPIOA |
|
| 38 | - #define LCC68_NRST_PIN GPIO_PIN_3 |
|
| 39 | - |
|
| 40 | - #define LCC68_BUSY_PORT GPIOA |
|
| 41 | - #define LCC68_BUSY_PIN GPIO_PIN_2 |
|
| 42 | - |
|
| 43 | - #define LCC68_DIO1_PORT GPIOC |
|
| 44 | - #define LCC68_DIO1_PIN GPIO_PIN_15 |
|
| 45 | - |
|
| 46 | - #define LCC68_RXEN_PORT GPIOA |
|
| 47 | - #define LCC68_RXEN_PIN GPIO_PIN_1 |
|
| 48 | - |
|
| 49 | - #define LCC68_TXEN_PORT GPIOA |
|
| 50 | - #define LCC68_TXEN_PIN GPIO_PIN_0 |
|
| 51 | - |
|
| 52 | - //Uart |
|
| 53 | - #define LOG_UART_TX_PORT GPIOA |
|
| 54 | - #define LOG_UART_TX_PIN GPIO_PIN_9 |
|
| 55 | - #define LOG_UART_RX_PORT GPIOA |
|
| 56 | - #define LOG_UART_RX_PIN GPIO_PIN_10 |
|
| 57 | - |
|
| 58 | - |
|
| 59 | - #define LORA_FRE 915000000 // frequency |
|
| 60 | - #define LORA_PREAMBLE_LENGTH 8 // PREAMBLE LENGTH |
|
| 61 | - #define LORA_SX126x_SYMBOL_TIMEOUT 0 // Symbols(SX126x) |
|
| 62 | - #define LORA_FIX_LENGTH_PAYLOAD_ON false // PAYLOAD FIX LENGTH |
|
| 63 | - #define LORA_IQ_INVERSION_ON false // IQ INVERSION |
|
| 64 | - |
|
| 65 | - #define SIZE_DATA 255 |
|
| 66 | - |
|
| 67 | - |
|
| 68 | 22 | |
| 69 | 23 | |
| 70 | 24 | ## 2022 RFM92 with [[atmega328-dat]] |
Tech-dat/Network-dat/RF-dat/rf-switch-dat/rf-switch-dat.md
| ... | ... | @@ -0,0 +1,12 @@ |
| 1 | + |
|
| 2 | +# rf-switch-dat |
|
| 3 | + |
|
| 4 | +Here's a complete wiring diagram for using the SX1262 with DIO2 controlling RF switch (TX/RX EN) and all required connections, assuming: |
|
| 5 | + |
|
| 6 | +You're using a single-pin RF switch like the SKY66420-11 (or similar). |
|
| 7 | + |
|
| 8 | +You're interfacing it with a microcontroller (MCU), such as ESP32 or STM32. |
|
| 9 | + |
|
| 10 | +You are not using DIO3 or DIO1 for FEM control. |
|
| 11 | + |
|
| 12 | +SPI interface is used between the MCU and the SX1262. |
|
| ... | ... | \ No newline at end of file |
Tech-dat/Network-dat/network-dat.md
| ... | ... | @@ -20,7 +20,7 @@ |
| 20 | 20 | |
| 21 | 21 | - [[cable-dat]] - [[fiber-optic-dat]]- [[coaxial-cable-dat]] - [[POF-dat]] - [[toslink-dat]] |
| 22 | 22 | |
| 23 | -- long distance = [[lora-dat]] - [[lorawan-dat]] |
|
| 23 | +- long distance = [[lora-dat]] - [[lorawan-dat]] - [[rf-switch-dat]] |
|
| 24 | 24 | |
| 25 | 25 | - [[RFID-dat]] - [[wiegand-dat]] |
| 26 | 26 |
Tech-dat/tech-dat.md
| ... | ... | @@ -44,7 +44,7 @@ |
| 44 | 44 | |
| 45 | 45 | - [[fiber-optic-dat]] |
| 46 | 46 | |
| 47 | -- [[lora-dat]] |
|
| 47 | +- [[lora-dat]] - [[SX1262-dat]] |
|
| 48 | 48 | |
| 49 | 49 | - [[rf-link-dat]] |
| 50 | 50 |