Here’s a topic relevant to both the new books I’m writing. Consider the following small program: char foo[] = {1, 2, 3, 4, 5, 6, 7, 8}; void setup() { Serial.begin(9600); while (!Serial); Serial.println(*(uint32_t *)&foo[0], HEX); Serial.println(*(uint32_t *)&foo[1], HEX); Serial.println(*(uint32_t *)&foo[2], HEX); Serial.println(*(uint32_t *)&foo[3], HEX); } void loop() { } If you run this on …
That SAM microcontroller is interesting. The 32-bit ARM core is basically oriented toward computer use and not controller use, so the instruction set isn’t really quite right for the job. Frankly the whole chip is overly complicated. Some years ago I used a 32-bit ARM core microcontroller from another vendor on the job. I’m not …
The AVR-based Arduino boards use a Counter/Timer overflow interrupt to implement the system tick that is used in the micros(), millis(), and delay() functions. The SAMD21-based Arduino boards use the SysTick counter to implement the same functionality, but seeking out how it does it is a bit move involved. Looking at things top-down, this functions …
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 …
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. …
So I just finished the Still Far Inside The Arduino book and am starting to consider a new project. The Arduino Nano 33 IoT caught my eye. While still a bit more expensive than clone Uno or Nano boards, it is the second lowest cost genuine Arduino board, second only to the Arduino Nano Every. …