SX1278 tx continuous mode using arduino

Hello, I would like to use the SX1278 radio module in tx continuous mode, as described in the datasheet. In tx continuous mode, the SX1278 takes the modulated data (in form of a pwm signal) directly from the uC on DIO2 pin and transmits it via fsk. With an arduino, which is connected to the SX1278 via SPI, I would like to set the SX1278's frequency, bandwidth and tx output power. The arduino should then put the SX1278 into tx continues mode. As I understood from the datasheet, the arduino must write to certain SPI registers in order to set the frequency, bandwith, tx output power and enable tx continuous mode. Since I am a 16 years old student and not very experienced with SPI registers yet, I ran into many problems. I hope that somebody could help me on my way, by telling me which SPI registers have to be written to, to set the frequency, bandwith, tx output power and enable tx continuous mode. Or even better, if somebody could share some code how to do that? Thanks for your help in advanced!

There are two ways of generating pseudo audio FM tones on an SX1278.

One is to apply a tone to the DIO2 pin and the other is to shift the frequency carrier direct.

Both methods have examples in the library here;

See examples 58_FM_Tone, which plays a simple tone by direct carrier shift, 59_Play_Star_Wars_Tune which plays the Star Wars tune and 80_Direct_DIO2_Tone which plays a tone direct via DIO2 pin.

Hello srnet,

Thank you very much for your very quick reply. I tried Stuarts X12XX-LoRa library and was very impressed. With this library it was very easy to implement my APRS functionality. For my specific purpose, the library consumed less program memory than the RadioLib from jgromes. BTW: As a radio amateur myself, I am a big fan of the $50SAT project. :)

Thanks again and have a nice Wednesday

packet-radio: Hello srnet,

Thank you very much for your very quick reply. I tried Stuarts X12XX-LoRa library and was very impressed. With this library it was very easy to implement my APRS functionality. For my specific purpose, the library consumed less program memory than the RadioLib from jgromes. BTW: As a radio amateur myself, I am a big fan of the $50SAT project. :)

Thanks again and have a nice Wednesday

There are other libraries ou there for SX127x devices of course, but I find the code in them somewhat impenatrable and it can be difficult to work out how to do stuff thats outside the basic TX and RX. The code in the SX12XX-LoRa library was specifically written to be easy to understand and have heaps of working practical examples.

There is 'tone' generation routines in the library but they use the brute force approach of shifting the set frequency of the LoRa device to generate the tone. This then means that programs can be compatible with Arduinos that dont have the tone() function and are also compatible with SX126x modules which do not have the DIO2 direct mode option of the SX127x.