Meta Stuff → level conversions, tagging source code, firmware updates

Looking at 3.3v microcontrollers like the SAMD in the newer Arduino boards, it is frequently necessary to do level conversions between 3.3v and 5v logic. Sometimes you can get away with not using a level converter, but certainly far from always! I looked at a couple of inexpensive commercial adapter boards. These are bidirectional which is very convenient for I2C, for instance.

The first was the lowest cost which uses a single MOSFET and (passive) two pullup resistors per channel. At $0.70 per 4 channel board, with solderable pin headers, this looks reasonable only for slow logic. Worst case is rising edge going from 3.3v to 5v which inserts roughly a 750ns delay. High drive capability is also low. Here’s a link current as of today on Amazon.com: https://www.amazon.com/gp/product/B07LG646VS (Note that I don’t get any kickback for using this link or buying the product.)

For high performance, there are boards that use the TXS0108E IC. This part pulses an active pullup for much faster operation. 5 boards each with 8 channels costs $8.50, or about 20% more expensive than the first solution. The rise time of the SAMD output was much slower than the rise time of the IC 5-volt side output, which made the insertion loss basically zero, perhaps even negative! Here is a photo. The 3.3 volt input is the lower trace:

Negative delay??

Certainly worth the extra cost in most cases. Here is a link current as of today on Amazon.com: https://www.amazon.com/gp/product/B07BNYVJBB

Trying to find my way around the source code for the Arduino library, and the underlying Microchip and ARM libraries I put my text editor to work. The key is to use an editor that supports tagging definitions. I use a Mac and the most common go-to programmers editor is BBEdit. However I found its tagging to be difficult to use, poorly documented and flawed. Now I’ve been a user of Epsilon https://lugaru.com for over 30 years. It’s basically EMACS but with a C-like underpinning instead of LISP. Not cheap, but has executables for Windows, Linux, macOS, FreeBSD, OS/2 (!), and DOS, which is where I started with it. Most of those years it’s had built-in tagging support which is fast and works as it should. It’s helping me untangle the mess of library code for the SAMD equipped Arduinos.

And finally, the disaster that is updating the firmware in the NINA processor/radio on my Arduino Nano 33 IoT boards. As delivered the NINA wouldn’t work because the board complained that the NINA firmware was an old version. The updater supplied in the Arduino IDE would not update it to the version required by the Arduino library. I had to perform surgery on the Arduino IDE installation (normally this is a bad practice) to update the plugin to the latest available, and then update again. Still no go, but by installing the latest-1 WiFiNINA library it would work. Well I had just read that there was a new updater with even more recent firmware versions. So I performed the surgery again and re-updated again. Now everything is at the latest. But, frankly, it all makes Arduino look like an amateur operation. These boards certainly require more user sophistication than the Uno, Beginners need not apply!