The traditional Harris 1-Wire® bus has a protocol that works well for interfacing using timer interrupts. Every bit transferred is in a single time slot that is always initiated by the microcontroller “master”. And the spacing between bits can be as long as desired, in this case the time between timer interrupts, about 1ms. As …
While writing a chapter on packet data transfer over the USARTs I realized that I could easily aim it more toward a future chapter on MODBUS with a little rewrite, so I did so. It now has timeouts and still works using callback functions, if desired. It makes for really slick demonstration programs! And while …
I’ve been writing about the USARTs and one might first think that all AVR based Arduino boards can be treated the same. However that is not the case. And since some of the example programs in the (future) book involve two boards communicating with each other, there are a large number of combinations I need …
When considering communication between or among microcontrollers, I’ve discouraged use of the SPI interface because of its lack of a buffered interface in all but the ATmega4809 Ardruino AVR-based boards. However the handshaking protocol built into the I2C standard interface makes I2C communication a safe, reliable choice. (The I2C interface is called TWI in the …
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 …
In the new book I’m writing I’ve implemented a dice game in multiple ways, starting with all the code in-line, with blocking routines and no interrupts. This is the typical Arduino approach. I’ve just completed an interrupt driven version. In this version, the function loop is: Because everything happens in interrupts! Many people think that …
OK, I’ve been taking time off the past few months, but now I’m back writing again. Maybe I’ll get that next book finished! Meanwhile I am disheartened by the lack of review on the two Far Inside books. They won’t make the New York Times Best Sellers list, but they are selling more recently and …
An error was discovered by a discerning reader and experimenter in the sieve.pal example program shown in the book and provided in the download. There were two missing CLA instructions. The errors have been fixed in the download, so if you wish to try out the example program please download it again from the website. …
I haven’t been writing as much as I should (if I want to finish up the next book!). But in these interesting times it’s not easy to concentrate. However I did do some tidying up. My desk/worktable has been all strewn with parts since I started writing the Arduino books. Some of them are nicely …