This article describes my new SPI library for master MCU. It is based on library published in startup package. I made some changes. At the first, I removed all PIC MCU related lines of code, because of universality of library. Next, I encapsulated all global variables related to SPI state machine to one structure. There are published two versions of library – for AVR-GCC and GCC compiler for ARM version 4.9.3.
This demo application describes how to connect the IQRF module to the Arduino. Data are transferred over 4-wire SPI bus, IQRF SPI protocol is used. IQRF module works with 3V logic, Arduino can work with 5V or 3V logic. For 3V to 5V logic connection a level converter is required. This article shows two ways for lever convertor implementation: