Arduino has long used Atmel (now Microchip) 8-bit AVR architecture microcontrollers. The ATmega328P, ATmega32U4, and ATmega2560 have been discussed here. Arduino no longer is “in bed” with Microchip, but there are two other Microchip microcontrollers used in Arduino boards, the ATmega4809 and the SAMD21. Both of these are favorites of mine. ATmega4809 The ATmega4809 is …
I thought it would be interesting to compare the speeds of various Arduino boards, from older designs to the newest microcontrollers. I looked at the following: Note that the Nano 33 IoT, the Nano RP2040, and the Uno R4 (WiFi version) all have an ESP32 as a coprocessor for the radio functionality. The Nano ESP32 …
My earlier blog posts about FreeRTOS on the ATmega4809 (Arduino Nano Every) were for an older version of the FreeRTOS distribution, 10.3.0-9. The instructions for making the patches to the code don’t quite work for the more recent distributions like 10.5, so to use you will need to either install an older version or work …
I’ve touted the Arduino Nano Every and the Arduino Nano 33 IoT as the two best buys in the Arduino lineup, and that they should be preferred when appropriate to the application. But why are these such good deals? First, they are both in the “Nano” form factor. This smaller board is less expensive to …
Catchy title, and the answer is certainly “yes” because of generally better price/performance and that people like newer designs. But let’s back off a little. Currently the lowest price genuine Arduino (not clone) board is the Arduino Nano Every. It’s less than half the price of the traditional Arduino Uno, and can replace the Uno …
Before I potentially dive in with writing a Far Inside SAMD21 book I decided to spend some time just looking at the architecture as well as what Arduino does with it. I did find that there is a lot of code overhead. So the potential savings of coding to “bare metal” is very much reduced. …
OK, I was going to give examples where reenabling interrupts was necessary for smooth, error-free operation. But then I hit a snag. It turns out that interrupts cannot be reenabled simply with sei() in the ATmega4809 in the Arduino Nano Every! There is an important difference in operation compared to the other AVR microcontrollers used …
Using a timer/clock interrupt, one that occurs at a regular rate, can be useful in managing tasks, providing a pseudo-operating system with essentially no overhead. The code for each task is laid out one after another in the ISR. For tasks that we want to execute at regular intervals we arrange the task like this, …
I recently received a request from a reader of my Far Inside The Arduino: Nano Every Supplement. He needed to create a 38kHz carrier modulated at 1kHz for a project he was building with the Arduino Nano Every and was thwarted by available code for the Uno which would not compile on the Nano Every. …
My final dice game example for the new book uses FreeRTOS. There are three independent (non communicating) tasks, to keep things simple, rather than breaking down the game itself into multiple communicating tasks. There is the game task, a flashing light (“blinky”) task, and a background task used to measure performance, like I did with …