coupling tiny with an nrf24

Go To Last Post
17 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm looking for the cheapest AVR chip that I can use to talk to an nrf24 (Nordic wireless module) . My guess from searching is going to be a attiny.

 

requirements.

1 Must have SPI for communication.

2 At least two GPIO's

2 1k flash minimum

4 internal or external option to handle 2Mbps SPI speed

 

Of the requirements above I'm looking simply for the cheapest option and something with availability. Best find so far is the attiny24a. Any advice?

 

 

 

 

Last Edited: Fri. Jan 3, 2020 - 01:38 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

1) I take it you mean SPI (what NRF uses) rather than ISP. For an easy life that rules out most tinys that only have USI.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

yes (edited) thx.

"that rules out most tinys that only have USI. "

 

I'm new to that, what make the USI capable tinys no good for my requirement?

Last Edited: Fri. Jan 3, 2020 - 01:33 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Why would you bother with a nrf24 in this day and age? There’s the nrf51/52 and esp8266/32 devices that have the cpu and peripherals on chip.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Admittedly the programing.  Though I see the ESP8266  can be programmed with Arduino IDE. Secondly I'm not see encouraging prices here.  With a tiny and nrf24 I'm under $3.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

S_K_U_N_X wrote:
Best find so far is the attiny24a.
ATTINY204 - 8-bit AVR Microcontrollers

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The esp stuff is available for under $5USD.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

gchapman wrote:

S_K_U_N_X wrote:
Best find so far is the attiny24a.
ATTINY204 - 8-bit AVR Microcontrollers

Wow, yeah that's better... Especially with the lower power features. I never used UPDI  before is that viable with AVR studio?

 

The esp stuff is available for under $5USD.

 Going to try these out.

Last Edited: Fri. Jan 3, 2020 - 02:18 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

S_K_U_N_X wrote:
I never used UPDI  before is that viable with AVR studio?
No (UPDI is in recent Atmel Studio 7)

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman wrote:
There’s the nrf51/52 and esp8266/32 devices that have the cpu and peripherals on chip

Or, from Atmel Microchip, there's the SAM R21, etc ...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ATMEGA128RFR2 does seem to fit the bill and gets down to $3.80 from mouser, can this be programmed with the ARVISP mkII or like programmer (assuming it programs via SPI like any Atmega128)? If so will I need to some how get studio 6 an update for the rfr2 variant ( ATmega128RFA1  is listed) ?

Last Edited: Fri. Jan 3, 2020 - 03:06 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Product Page says it has ISP & JTAG:

 

https://www.microchip.com/wwwproducts/en/ATmega128RFR2

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

yeah guessing the fuse bit are inline with the ATmega128RFA1 (ill have to check the data sheet), guessing I can just program it as ATmega128RFA1.

 

Found this on a thread " ATmega1284RFR2 is binary compatible with  ATmega128RFR2 and ATmega128RFA1."

 

Last Edited: Fri. Jan 3, 2020 - 03:38 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Atmel AVRISP mkII is a go though

Issue #AVRSV-4050: User signature on RFR parts can only be accessed by JTAG or parallel programming.

so, Atmel-ICE

S_K_U_N_X wrote:
If so will I need to some how get studio 6 an update for the rfr2 variant ( ATmega128RFA1  is listed) ?
No; RFR2 are in Atmel Studio  v6.2.1563

Atmel Studio 6.2 Service Pack 2 (RELEASE NOTES) via AVR and SAM Downloads Archive | Microchip Technology

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've used NRF24L01+ with ATTINY2313 and even ATTINY45

 

I like them because you can get them on ebay for less than the wire needed to carry the signal otherwise.

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut. 

Last Edited: Fri. Jan 3, 2020 - 04:06 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Embedded in Chan's pff code is assembly language code to control the USI hardware when used as a SPI master in a ATtiny85, ATtiny681 and, I suspect, many ATtiny uCs that have the USI hardware. 

Most instructions for use (pin assignment, etc) are located in the usi.S file (just remove the '.txt' extension from the download).  The usi.h file contains the C function prototypes for the assembly language functions.

 

Alan

 Edit:  added a line to each file to give author credit to Chan

           added italicized text to put this post in context of the OP's original question

          and if the downloaded file names have a '_0' embedded, get rid of those also.

Attachment(s): 

Last Edited: Sun. Jan 5, 2020 - 11:59 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Petit FAT File System Module

by ChaN

[bottom]

Download: Sample projects for various platforms January 30, 2019

"Dare to be naïve." - Buckminster Fuller