POL
ENG

Library RFM12B in C for STM32

If you only need this library, then please download files below and you can leave this page, but if you would like to read a whole story, then go further.



My colleague asked me to make a remote thermometer for him. I haven't hesitated and decided to use well known RFM70 modules. Prototype worked as designed but during test in field, it turned out that range was to short and man can't use it comfortably. I decided change modules and switch to 433MHz bandwidth. Range of various modules is very wide, so took one from the same producer HOPE RF - RFM12B.


After detailed reading of datasheet, it turned out that this module provides many interesting features and overall device can be smaller and cheaper. Because this module is widely used by Arduino users, I decided to find and use one of libraries from the Internet. Unfortunately, none of found couldn't fulfill my needs. One was written in C++ (my code is in C), others were written using bit-bash SPI what is unnatural whilst I have hardware one built in uC. So I had to write my own. I chose the best looking one and adopted. This process took me a few evenings. In all libraries had an array of constant values of regisers. If I wanted to change one bit in register, I always overwritten all others previously changed to default value. In this module, we can't read current configuration register value, only status and data. That is why I keep a copy in firmware always updating only those bits that I want.


Pliki do pobrania:


Wszelkie prawa zastrzeżone. Projekt i wykonanie strony SrcPro.pl