Skip to content

M17-Project/SX1255_HAT-hw

Repository files navigation

CC BY-NC-SA 4.0

SX1255_HAT-hw

Raspberry Pi Zero shield with the SX1255 RF transceiver chip.

Board preview

Note

In case the TCXO used in the project is not available, TG2016SMN 32.0000M-MCGNNM0 is a valid replacement (0.5ppm frequency stability). Alternatively, ECS-TXO-20CSMV-320-EY can be used (2.5ppm frequency stability).

Usage

RPi sample config code

Sample Raspberry Pi code for SX1255 control can be found here.
I2S slave overlay is required. Sample rate for both RX and TX can be set to 125, 250, or 500kHz.

RX/TX frequency setting (500kHz sample rate):

./sx1255-spi -s 500 -r 435000000 -t 438000000

Example RX with ZeroMQ

arecord -t raw -f S32_LE -r 192000 -c 2 --device="hw:0,1" | ./int_to_short | ./zmq-pub

In which int_to_short is a simple int to short format converter:

while(1)
{
  ioctl(STDIN_FILENO, FIONREAD, &rcvd);
  if(rcvd>0)
  {
    if(read(STDIN_FILENO, inp, rcvd)==rcvd)
    {
      for(int i=0; i<rcvd; i+=8)
      {
        memcpy(&out[i/2  ], &inp[i  +2], 2);
        memcpy(&out[i/2+2], &inp[i+4+2], 2);
      }

      write(STDOUT_FILENO, out, rcvd/2);
    }
  }
}

Example TX with ZeroMQ

./zmq-sub 192.168.50.243:17018 | aplay -t raw -f S32_LE -r 192000 -c 2 --device="hw:0,0"

Example GNU Radio flowgraphs

There are 2 demo flowgraphs available:

The RX demo also provides a set of sinc compensating FIR filter taps through the Decimating FIR Filter block.

License

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

CC BY-NC-SA 4.0

About

Raspberry Pi Zero shield with the SX1255 RF transceiver chip

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages