Introduction: 3 ATtiny85 Pins Control of the - Nrf24L01 - التحكم بثلاثة دبابيس فى

بسم الله الرحمن الرحيم

Step 1: Introduction

The ATTiny85 is a high-performance, low-power Microchip 8-bit AVR RISC-based microcontroller combines 8KB ISP flash memory, 512B EEPROM, 512-Byte SRAM, 6 general purpose I/O lines.

One I/O line is configured as a RESET pin. We are left with only 5 I/O lines.

On the other hand, The nRF24L01 is a single chip 2.4GHz transceiver. It is configured and operated through a Serial Peripheral Interface (SPI - 5 I/O lines).

Interfacing the ATTiny85 with nRF24L01 leaves no room to add even a simple switch.

This article revisits the "Nerd Ralph original article" - - how to use just 3 pins of the ATTiny85 to control the transceiver.

This article gathers all the information spread over many articles treating the case in one place.

Step 2: PCB Design

Kicad is used to design this simple board.

Step 3: Coding

Two sketches are freely available for the tests.

  • Transmitter sketch : To be flashed to the ATTiny85 board
  • Receiver sketch : To be flashed to our ATMega328PB sniffer board

Step 4: Assembly

A simple board means easy assembly.

Step 5: TIP1 - ATTiny80 Board Configuration

The ATTiny85 should be configured with 1 MHZ internal frequency to achive successful communication.

Slowing down the SPI bus, leaves enough time for the RC circuit to charge and discharge completely to mangage perfectly the CSN I/O line.

Step 6: TIP2 - MISO -> MOSI and MOSI -> MISO

When used as an SPI master

  • ATTINY85 MISO -> Nrf24L01 MOSI
  • ATTINY85 MOSI -> Nrf24L01 MISO

When used for ISP programming

  • ATTINY85 MISO -> Nrf24L01 MISO
  • ATTINY85 MOSI -> Nrf24L01 MOSI

Step 7: Enjoy

A video is embedded to demostrate the use case.

الحمد لله رب العالمين