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 that 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” – http://nerdralph.blogspot.com/2014/01/nrf24l01-con… – 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 achieve 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

https://www.instructables.com/3-ATtiny85-Pins-Control-of-the-Nrf24L01-%D8%A7%D9%84%D8%AA%D8%AD%D9%83%D9%85-%D8%A8%D8%AB%D9%84/

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

Published by

abdelhak Bourdim

Embedded Software Engineer