Hi! This is my repo for learning about microcontrollers and packetised radio with the CC1101 by Texas Instruments chip driven by 'Arduino-compatible' devices.
You're going to want to have at least one (or a dozen) of these really really cheap RF1101SE radio module based on a Texas Instruments CC1101 chip (that's the one with no MCU and no USB, just the radio).
I'm driving this 3.3v chip directly from the Atmega328 with 5v... but other chips have acted in super weird ways. So now you've been warned(!), it really shouldn't work. YMMV ¯\(ツ)/¯
- cc1101 — Just the radio
- cc1110 — radio and MCU (Radica IM-ME used in OpenSesame)
- cc1111 — radio, mcu, usb (YARD Stick One)
You're also going to want to have a Teensy, Arduino or basically any microcontroller that can speak SPI.
Now all of this works with the Arduino 'whatever' but if you have a 'whatever' then you'll need Logic Converters because "whatever's" do 5V on the digital pins and the Teensy can deal with either 3.3V or 5V because...
Teensy is your basic honey badger of small inexpensive microcontroller boards. It runs a Cortex-M4 which comes with a whole bunch of functionality built right into the chip.
Please note that the cheap rf1101se-v3.1/whatever radio board you got from Aliexpress is probably only good for 433MHz because they all seem to be missing resistors on the circuit board that would enable it to be useful at any other frequencies. So it's not the chip that's at fault, just the cheap board design.
The example presented currently enables:
- 16 bit preamble
- 2 byte Sync Word (0xEEEE)
- CRC Checking
- Gaussian frequency-shift keying
- Manchester encoding
- Address filtering (byte after sync word for specific device selection)
I've tried to document what the registers do in the Arduino code. You really need to read the manual though to understand what's going on.
TODO
Move to the default Arduino SPI library.
I would like to drive two slave devices (cc1101 chips) with a single microcontroller but the included panstamp library has it's own spi.c
and spi.h
which don't allow SPI.setSCK(pin)
I include Yardstick One (YS1) code in this repo because I have one. If you don't have one then get one because they're awesome.
- Jared Boone's manchester decoding function
- YARD Stick One
- gareth__ on the twitters
- Freenode IRC — gareth__ on #HackRF #RFCat etc.