Skip to content

馃帀 Major Release 3.0.0: New Object-Oriented Architecture & Mathematical Precision

Choose a tag to compare

@LSatan LSatan released this 26 Apr 02:23
· 4 commits to master since this release
80e77dd

Changelog - SmartRC CC1101 Driver Library

All changes refer to the transition from the legacy versions (2020/2021) to the current, fully optimized V3.0.0 architecture.

[3.0.0] - Modernization & Performance Update (2026 Reboot)

馃殌 Highlights

  • Full Object Model: The library transitioned from global variables to a clean class-based model. This allows for seamless management of multiple CC1101 modules on a single microcontroller.
  • Datasheet Compliance: All calculations for frequency, data rate, bandwidth, and deviation have been updated to use the exact mathematical formulas from the TI datasheet.
  • RAM Optimization: Elimination of almost all global buffer variables. The library now uses modern programming techniques to drastically reduce memory consumption on AVR systems (Arduino Nano/Uno).

馃洜 Technical Changes

1. Memory Management (Read-Modify-Write)

  • Old: Many register values were mirrored in RAM, wasting valuable bytes.
  • New: Implementation of bitwise operations directly on the chip registers. Settings like setManchester, setCrc, or setFEC now read the current register state, modify only the relevant bit, and write it back.

2. Mathematical Precision (Avoiding Iterations)

  • Old: Functions like setDeviation or setDRate used time-consuming for loops and subtractions to approximate the target value.
  • New: Direct calculation of exponents (E) and mantissas (M) using logarithmic functions. This ensures exact hardware configuration without performance loss.

3. New Features (Plain-Text Getters)

  • Added return functions (getMHZ(), getDRate(), getRxBW(), getChsp()) that recalculate the actual values set in the chip registers and output them as float.

4. Hardware Diagnostics

  • Implementation of the getCC1101() function for quick verification of the SPI connection during initialization.

5. Code Hygiene & SPI Stability

  • Introduction of SPISettings for guaranteed compatibility with other SPI devices on the same bus.
  • Definition of PA tables (transmit power) as const in program memory (Flash) to prevent RAM overflows.

鈿狅笍 Breaking Changes & Backwards Compatibility

  • Legacy Wrapper: The old class name ELECHOUSE_CC1101 is fully supported via a typedef wrapper. Most standard legacy sketches will compile without any changes!
  • Removed Functions: The functions setModul(), addSpiPin(), addGDO(), and addGDO0() were removed. The old workaround of switching global modules is obsolete. To use multiple transceivers, simply instantiate multiple objects (e.g. SmartRC_CC1101 radio1; SmartRC_CC1101 radio2;).
  • Removed Variables: The old variables like m1FEC, m1PRE, etc. have been removed, as they were replaced by direct Read-Modify-Write register accesses.

Refactored with passion by LittleSatan (2026)