In Far Inside The Arduino: Nano Every Supplement I made a late improvement to “A Better Timer Setup” that was not reflected back to the text description. The statement (page 69 of the printed book): This means with a 16MHz clock and the /8 prescaler we need 2000 counts per interrupt. With a 20MHz clock …
Note: this error has been corrected in all books currently available for sale, so only affects initial purchasers. Both original and corrected example programs are offered on the website. On the Arduino Nano Every board, the first two digital pins are labeled TX and RX, rather than their digital pin numbers. I had assumed these …
My new book, Far Inside The Arduino: Nano Every Supplement is now available on Amazon. https://www.amazon.com/gp/product/B08GFL6VBF. It’s $9.99 as a Kindle E-book, or $11.99 printed. Roughly half the price of the earlier book for the Uno/Mega/Nano but then it doesn’t cover the theory of the interfaces, just how the differ. Because the Arduino Nano Every …
While writing Far Inside The Arduino: Nano Every Supplement I uncovered some errors in the Microchip (Atmel) documentation. In Timer/Counter B Single-Shot mode, setting EDGE=1 is supposed to generate a pulse on the negative edge of the event signal. Instead it generates a pulse on both edges of the event signal. In the SPI, the …
While working toward a final draft of the Arduino Nano Every book I noticed that I didn’t have an example using events and Timer/Counter A. So I wrote a demonstration program which failed to run. Diagnosing the problem I came across a design flaw in the ATmega4809 microcontroller. Timer/Counter A has a clock prescaler that …
The FreeRTOS contributor that has the Arduino port hasn’t updated for the ATmega4809 in the Arduino Nano Every. I’ve managed to get it working. The mods do not apply to the Arduino Uno Wifi which also uses the ATmega4809. I’m not putting this in the current book I’m working on, so am posting what needs …
I got the I2C/TWI interface working as master and slave simultaneously, so finished that chapter. I didn’t add the non-blocking functions but explain how to easily modify the code to achieve it. Turns out there is a comment in the source explicitly mentioning that Arduino likes blocking functions and the comment is on the statement …
It’s been a great past few days for progress on the book. I decided to tackle the Configurable Custom Logic. While I’m familiar with logic and FPGAs, I’ve never had a microcontroller with this feature before. I needed to study what it could do and come up with some reasonable example programs. Frankly, it doesn’t …
All of the USART examples are done but for RS-485. I originally was going to skip this since it is so similar to “1-wire” operation, but then decided to buy some RS-485 drivers and give complete USART coverage with examples. This chapter should be finished by the end of next week after the parts arrive. …
The USARTs have lots of flexibility, so how do I present it? I’ve been mulling over it and decided to do one basic example program and then vary the protocol for additional examples. I’ll be using two of the USARTs to communicate with each other. One, call it the primary USART, will send a string …