Krolyxon
Commit 3120783

Branches

Tags

Refs →

orion-rf.piolibdepsesp32-s3-n16r8RF24docsattiny.md

81 lines · 3.8 KB · Markdown

1# ATTiny
2
3@tableofcontents
4
5ATTiny support for this library relies on the SpenceKonde ATTinyCore. Be sure to have added this core to the Arduino Boards Manager with [this install guide](http://highlowtech.org/?p=1695)
6
7See the included rf24ping85 example for pin info and usage
8
9@warning The ATTiny2313 is unsupported due to lack of sufficient memory resources
10
11Some versions of Arduino IDE may require a patch to allow use of the full program space on ATTiny. See [this resource](https://github.com/TCWORLD/ATTinyCore/tree/master/PCREL%20Patch%20for%20GCC) for the ATTiny patch.
12
13ATTiny board support initially added from [jscrane/RF24](https://github.com/jscrane/RF24)
14
15## Hardware Configuration
16
17By [tong67](https://github.com/tong67)
18
19### ATtiny25/45/85 Pin map with CE_PIN 3 and CSN_PIN 4
20
21```text
22 +-\/-+
23 NC PB5 1|o |8 Vcc --- nRF24L01 VCC, pin2 --- LED --- 5V
24nRF24L01 CE, pin3 --- PB3 2| |7 PB2 --- nRF24L01 SCK, pin5
25nRF24L01 CSN, pin4 --- PB4 3| |6 PB1 --- nRF24L01 MOSI, pin6
26nRF24L01 GND, pin1 --- GND 4| |5 PB0 --- nRF24L01 MISO, pin7
27 +----+
28```
29
30### ATtiny25/45/85 Pin map with CE_PIN 3 and CSN_PIN 3 - PB3 and PB4 are free to use for application
31
32- Circuit idea from [NerdRalph's 3 pin solution](http://nerdralph.blogspot.ca/2014/01/nrf24l01-control-with-3-attiny85-pins.html)
33- Original RC combination was 1K/100nF. 22K/10nF combination worked better.
34- For best settle-time delay value in `RF24::csn()` the timingSearch3pin.ino sketch can be used.
35- This configuration is enabled when CE_PIN and CSN_PIN are equal, e.g. both 3
36- Because CE is always high the power consumption is higher than for 5 pins solution
37
38```text
39 ^^
40 +-\/-+ nRF24L01 CE, pin3 ------| //
41 PB5 1|o |8 Vcc --- nRF24L01 VCC, pin2 ------x----------x--|<|-- 5V
42 NC PB3 2| |7 PB2 --- nRF24L01 SCK, pin5 --|<|---x-[22k]--| LED
43 NC PB4 3| |6 PB1 --- nRF24L01 MOSI, pin6 1n4148 |
44nRF24L01 GND, pin1 -x- GND 4| |5 PB0 --- nRF24L01 MISO, pin7 |
45 | +----+ |
46 |-----------------------------------------------||----x-- nRF24L01 CSN, pin4
47 10nF
48```
49
50### ATtiny24/44/84 Pin map with CE_PIN 8 and CSN_PIN 7
51
52- Schematic provided and successfully tested by [Carmine Pastore](https://github.com/Carminepz)
53
54```text
55 +-\/-+
56nRF24L01 VCC, pin2 --- VCC 1|o |14 GND --- nRF24L01 GND, pin1
57 PB0 2| |13 AREF
58 PB1 3| |12 PA1
59 PB3 4| |11 PA2 --- nRF24L01 CE, pin3
60 PB2 5| |10 PA3 --- nRF24L01 CSN, pin4
61 PA7 6| |9 PA4 --- nRF24L01 SCK, pin5
62nRF24L01 MISO, pin7 --- PA6 7| |8 PA5 --- nRF24L01 MOSI, pin6
63 +----+
64```
65
66### ATtiny2313/4313 Pin map with CE_PIN 12 and CSN_PIN 13
67
68```text
69 +-\/-+
70 PA2 1|o |20 VCC --- nRF24L01 VCC, pin2
71 PD0 2| |19 PB7 --- nRF24L01 SCK, pin5
72 PD1 3| |18 PB6 --- nRF24L01 MOSI, pin6
73 PA1 4| |17 PB5 --- nRF24L01 MISO, pin7
74 PA0 5| |16 PB4 --- nRF24L01 CSN, pin4
75 PD2 6| |15 PB3 --- nRF24L01 CE, pin3
76 PD3 7| |14 PB2
77 PD4 8| |13 PB1
78 PD5 9| |12 PB0
79nRF24L01 GND, pin1 --- GND 10| |11 PD6
80 +----+
81```