Other Microchip Technology Microcontrollers

Arduino has long used Atmel (now Microchip) 8-bit AVR architecture microcontrollers.  The ATmega328P, ATmega32U4, and ATmega2560 have been discussed here. Arduino no longer is “in bed” with Microchip, but there are two other Microchip microcontrollers used in Arduino boards, the ATmega4809 and the SAMD21. Both of these are favorites of mine. ATmega4809 The ATmega4809 is …

A Fundamental Implementation Change

Traditional Arduino boards, like the Uno R3 or Nano, are typically programmed using the Arduino Library functions. These conveniently present most of the microcontroller’s functionality to the hobbyist user. Books like my Far Inside The Arduino and the microcontroller’s documentation show how to access additional functionality not addressed by the Arduino Library. As more advanced …

The Map Function

The map function takes a long integer value, x, in the range in_min through in_max and maps it into the range out_min through out_max. It is very convenient for scaling measurements and the function is defined: It is important to realize some limitations of this function. Some Arduino models define a function mapResolution that does …