Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 4 pin mode for ATTINY85 (much less power and still one pin free) #387

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ortegafernando
Copy link

Add a simple option (CSN = 0) to control RF24 with 4 pins of the ATTINY85.

This way you could use ackPayload functionallity and, more important, less power, as:

  1. in 3 pin mode, CE is always HIGH so we will consuming about 12-13 mA
  2. in 4 pin mode, CE is control by ATTINY so we will consuming 12-13 mA durings writes and almost nothing between them

NOTE: Sorry if I can't explain well, but I have check y modifications and they are working.

Add option to ATTINY85 4 pins mode
Add option for ATTINY85 4 pins mode
@soligen2010
Copy link
Contributor

I had already made changes for this, but not merged yet. See commit #356

@ortegafernando
Copy link
Author

Hi @soligen2010 may be your commit is for keep CE pin HIGH and use CSN pin "properly"

Mine is just other way round. Use CE pin "properly" (so you can sabe power between writtings and use ackPayload feature) and use CSN pin with the 3-pin trick.

Both are compatible, but mine needs the changes that I have submit.

Regards,

@vverdot
Copy link

vverdot commented Feb 11, 2020

Hi @ortegafernando , sorry to dig up an old thread, I am very interested in your solution (freeing 1 pin on Attiny85 while preserving low power mode of nrf24). I didn't find many other alternatives to achieve the same goal and I don't know why this wasn't merged, but I plan to use it in a personal project. Any advice, caveat, general feedback regarding your approach? Thanks.

@2bndy5
Copy link
Member

2bndy5 commented Oct 27, 2020

I'm uneasy about using 0 as a sentinel for this. It might confuse people reading the docs as 0 is also used for the CSN pin on Linux's SPIdev implementation. Is there a problem with using a negative number for this sentinel instead?

@@ -36,6 +36,18 @@ version 2 as published by the Free Software Foundation.
| +----+ |
|-----------------------------------------------||----x-- nRF24L01 CSN, pin4
10nF
ATtiny25/45/85 Pin map with CE_PIN 3 and CSN_PIN 0 => PB4 is free to use for application and you can use ackPayload funtionallity
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: funtionallity -> funtionality

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"functionality" even better ;)

@2bndy5 2bndy5 marked this pull request as draft January 17, 2023 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants