tinytronix / SX126x

An Arduino Library for LoRa Communication using DRF1268T or DRF1262T (based upon Semtech SX1268 or SX1262)
MIT License
59 stars 13 forks source link

SW pin usage in SX1262 and ATmega328 #1

Closed digidhamu closed 5 years ago

digidhamu commented 5 years ago

This is more of question. Where is this library functionality used for SW pin in SX1262 wiring to ATmega328 PB1?

Please advise.

tinytronix commented 5 years ago

The library does not use the SW Pin. In my case it is directly connected to Vcc, so there is no need to handle it in the lib (please see my schematic). I will add a FAQ to the readme, thanks!

In more detail: The SW Pin enables the RF Switch. In low power applications SW is connected to the Pin DIO2 of SX126x and the SX126x then switches RF on during TX automatically if configured appropriate. Please see the SX126x Spec and search for "SetDio2AsRfSwitchCtrl" My lib currently does not support this. If you like to contribute: You may like to add a 5th parameter to the constructor (bool true/false). This seems the right place for me. true: DIO2 switches RF, false: RF controlled externally. To fit my schematic I would then set this param to false and it should do.

tinytronix commented 5 years ago

closed