Most I/O in a microcontroller (like in an Arduino board) consists of transactions. The microcontroller sends a command or a command plus data to a peripheral device and then, perhaps after a short delay, the device sends a response of status and data back to the microcontroller. The Arduino library tends to have only blocking …
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 …
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 …
I’m now doing the final touches to the formatting of the E-book and printed versions of Far Inside The Arduino: Nano Every Supplement. Not really overjoyed with that title, but I do need to emphasize it as being supplemental to all the operational descriptions in the original Far Inside The Arduino book. I did do …
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 …
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 …
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 …
This coming week I’ll either do the USART or TWI. I haven’t decided which. If it goes well (no problems) I might get both finished. I finished the SPI. The SPI slave implementation was interesting. I ended up with three slave examples. The slave examples do need a master. As I said in the last …