MICROCONTROLLERS
- Beginner Series I: What is a Microcontroller https://lemux.minnix.dev/post/10943
- Beginner Series II: The "Generic" Microcontroller https://lemux.minnix.dev/post/23245
- Beginner Sidenote: Microchip's Signal Chain Design Guide https://lemux.minnix.dev/post/64811
- Beginner Series III: Skills and Complexity Tiers https://lemux.minnix.dev/post/81220
I think I've covered the material needed for a beginner to analyze and choose microcontrollers. However, a beginner may not be comfortable with reading datasheets, or families of datasheets. As such, I'll help beginners through microcontroller families.
This skill where you can download a few spec-sheets, analyze them, and understand them is an absolutely necessary skill. There's hundreds of chips released every year from many manufacturers. And while practice with a specific chip is the only way to true expertise, there's still the "breadth" of knowledge that comes in handy when selecting chips.
In this guide, I'm going to deep dive into AVR EA, the newest 8-bit AVR microcontroller from Microchip. But with commentary to help beginners understand the "big picture", how to evaluate this line and compare/contrast with other lines of chips.
Why so many chips? --------------
Beginners might be flabbergasted to learn that there are 1498 available AVR-chips for sale, despite only ever being made by Atmel/Microchip. Of these, 1298 chips are the 8-bit AVR with mostly the same assembly language since the early 00s.
AVR itself refers to the instruction set (https://ww1.microchip.com/downloads/en/devicedoc/atmel-0856-avr-instruction-set-manual.pdf), the assembly language / machine code that makes up all of these chips. Development tools (compilers, linkers, IDEs) are built on top of this ISA and therefore cannot change very much in practice.
But many other features and specifications: the number of timers, 8-bit ADC vs 12-bit ADCs, DACs, UARTs, SPI, etc. etc. can and do shift on a regular basis. And ultimately, that's what leads to this chip proliferation. Its almost always possible to find a chip that does exactly what you want it to do, at the lowest price, at the lowest power-usage. So there's a lot of marketing and swapping of features to create a perfect chip for every application.
Microchip's AVR EA Family: (2nd) Newest 2023 era chip family -----------------
So lets get started at looking at the AVR EA. (Oh no, while I was writing the AVR EB was released and I'm too lazy to switch now... oh well...).
The webpage is a great starting point (https://www.microchip.com/en-us/products/microcontrollers-and-microprocessors/8-bit-mcus/avr-mcus/avr-ea ), but this only introduces the AVR EA family in general. We still have ... well...
All the other chips within the family. Now the main thing here is 28pin, 32-pin, and 48-pin pinouts... as well as 16kB, 32kB, and 64kB of Flash. Fortunately, the AVR Instruction set, and all the hardware (ex: Timer specifications, RTC, GPIO configurations, etc. etc.) are shared with recent chips (AVR EA shares very similar drivers with the AVR DD, AVR DA, and AVR DB chips released in the last 3 years).
The homepage contains the following line:
> The AVR EA family of MCUs is a great option for closed-loop control system designs and secondary monitoring devices for safety reasons.
I agree with Microchip here, but how and why is this the case? What features from AVR EA make it ideal for this? Well, all in due time.
Curiosity Nano / Development Boards --------------------
All manufacturers create a "Development Environment" to help speed up experimentation with new chips. AVR EA is no exception, with the ~$25-ish AVR EA Curiosity Nano.
https://www.microchip.com/en-us/development-tool/ev66e56a
There is a USB programmer on board that works with MPLab and the legacy Atmel Studio IDEs, so you can easily develop from scratch (even without buying a special purpose programmer like Atmel ICE or building an AVRDude).
Microchip also releases schematics and PCB designs for these development boards. We can see that the AVR EA Curiosity Nano is a 4-layer board for example. All the relevant docs are in that area.
Chip Programmer ------------------ If you leave the prototyping stage and start making custom PCBs, you'll likely find a programmer useful for your later-stage prototypes on your custom boards.
https://www.microchip.com/en-us/development-tool/PG164100
MPLab Snap is the $35 lower-cost programmer from Microchip. I've never used this tool, I'm using a legacy "Atmel-ICE" (which used to be the $35 range, but it looks like MPLab Snap is replacing it). For Atmel-ICE, I've never had a problem just connecting over USB, running the wires to my board header and sending the code through. I'd expect MPLab Snap to be similarly easy.
Programming and Software ---------------------
Atmel Studio (now Microchip Studio) is my preferred IDE, but it is considered legacy. Microchip Studio still is a free download and still work with AVR EA chips today (just tested with my Version4 of my Battery-tester project).
https://www.microchip.com/en-us/tools-resources/develop/microchip-studio
I've only ever used the free and open-source GCC compiler for AVR.
Microchip has been pushing hard for https://www.microchip.com/en-us/tools-resources/develop/mplab-x-ide , and I'd expect it to replace Microchip-Studio any day now. I do prefer the Visual-Studio based IDE though, but its hard to complain about free tools that work.
Microchip also sells their XC8 compiler, and there's other compilers like Keil or IAR. But professional compilers are $1000+, and likely outside the range of hobbyists / beginners who are just getting started. In either case, the $0 GCC compiler and toolchain exists and works with both the $0 Microchip Studio IDE and $0 MPLab X IDE. There is a free version of XC8 as well that is missing a few features, but should be usable-enough for beginners.
All of these tools provide the C-programming language (and maybe even C++ programming language), as well as linkers (combining .o object files together), the ability to create libraries, and a few libraries to help handle basic problems (Printf, atoi, etc. etc.).
Some people prefer Arduino software, I don't know much about it and have always preferred the low-level C stuff personally.
Can we talk about AVR EA yet? -------------------
Oh wow, yeah, I guess that's a lot of cruft beginners need to know before they get to the chip. Lets start talking about the chip now!
Digikey has thousands in stock across 66 SKUs. Larger quantities can be ordered directly from Microchip in 5000+ at-a-time quantities (though it can take some weeks for larger quantities to arrive). Both Digikey and Microchip offer the Curiosity Nano development board that I talked about earlier, and that might be a better place to get started than the raw chips.
But anyone thinking ahead to the custom-PCB phase of your project should see the SOIC, SSOP, TQFP, and VQFN packages of various sizes are all available. With some at extended temperature ranges as well.
https://www.microchip.com/en-us/product/avr64ea32
The AVR64EA32 in TQFP was what I used for a most recent project. The 64kB Flash and 32-pin layout shares much in common with AVR DA, DB, DD, and older chips (very similar layout, size, pinout, and pcb-footprint), so I prefer using that over-and-over again in different projects of mine.
HTML Version: https://onlinedocs.microchip.com/oxy/GUID-838DDB25-4D69-4519-815B-A48DBACEED23-en-US-9/index.html
PDF Version: https://ww1.microchip.com/downloads/aemDocuments/documents/MCU08/ProductDocuments/DataSheets/AVR64EA-28-32-48-DataSheet-DS40002443.pdf
Entering the manual, we have 565 pages of documentation. This is pretty small for modern chips, and this is due to the relative simplicity of 8-bit chips. (Many 32-bit chips are closer to 2000+ pages long). There's no need to read every single page of the manual, but instead immediately bring your focus to the following pages.
The first pages are a 5ish page summary of all features. I'm not going through the entire list, but I want to draw attention to:
12-Bit ADCs are available on a lot of chips these days. But Differential and PGA are eyebrow raising. These are relatively rare features that are incredibly useful in the application of current-sensing. This suggests to me that the AVR EA is for reading current and reacting to current-changes (such as the 4-20 mA current loop protocol). This is absolutely the "killer feature" of the chip, and is the reason to pick AVR EA if you have any current-sensing use in your application.
Most chips have a "killer feature" like this somewhere. It could be very high memory (264kB on the RP2040), it could be incredibly accurate ADCs (RX23E-A), or whatever. Knowing and remembering that this AVR EA chip is extremely useful for this niche is something you'll have to keep in mind for all future projects, thinking of what the best chip for your project could be.
Next, you'll want to look at the port multiplexing.
Only some features are available on some pins. AVR chips are more flexible than most thanks to the Event-system (some outputs can go onto the event system and be routed arbitrarily), but outputs are often tied to just a limited number of pins. If you're making a PCB layout, you'll have to keep these pin-multiplex issues in mind.
From there, skip all the features and just read the Electrical Characteristics. Keep in mind your voltage-levels, the capabilities of pins, and any features of the hardware you're interested in.
Don't forget Application Notes ---------------------
Going back to the AVR EA landing webpage leads to the documents section. Check it out.
If you're not experienced enough to see the "killer feature" of a particular chip, look at the App Notes. They likely suggest situations that the chip is good at. They're trying to sell you this chip after all, but these App Notes (despite being marketing / sales purposes) are still good technical information that will teach beginners how to think about projects.
In particular, https://ww1.microchip.com/downloads/aemDocuments/documents/MCU08/ApplicationNotes/ApplicationNotes/AN4811-CurrMeasurem-BattMon-DS00004811.pdf
AN4811 is an AppNote covering how a 12-bit Differential ADC with 16x PGA (on the older ATtiny1627 chip, but still applicable to today's AVR EA) can be used as a battery monitoring / Coulomb counting application.
Honestly, I'd say that these Application Notes are the #1 source of information for beginners and intermediate engineers who need some hand-holding to learn how to use these chips (or chip features).
Thats it, I guess? --------------------
Well, I don't want to hold up everyone with an even longer article. But I think I've covered the crux of how to read a real world Microcontroller datasheet. There's hundreds of other pages in the datasheet and not enough time to cover it all, but I think I was able to at least cover the basics.
Would anyone be interested if I gave a rundown of my AVR EA Battery Tester project some time later?
- • 100%hackaday.io Sub-Surface Simon
Curse my procrastinative tendencies! So you want a tiny game, eh? How small can it be? Any sane designer would tell you that your design can be as small as the chip package it comes in. This is not true! An IC is usually just one tiny square cut from a silicon wafer. Depending on the chip package us...
- • 95%www.hackster.io The Tiny Bit Machine Is a Self-Contained, Solar-Powered Eight-Bit Microcomputer — in a Tic Tac Box
Powered by a Microchip ATtiny85 and programmed with push buttons and two LEDs, this tiny handheld has its own on-board interpreter.
- www.instructables.com OPEN-SOURCE DC ENERGY METER FEATURING BLYNK CLOUD MONITORING
OPEN-SOURCE DC ENERGY METER FEATURING BLYNK CLOUD MONITORING: If you’ve ever worked on a tech project involving voltage and current measurements, you’ve likely felt the need to record those values for future analysis and decision-making. Personally, I’ve faced this challenge many times, especially w...
- www.tindie.com Mayhem v2 for Flipper: ALL in 1- ESP/CAM/SD/NRF+CC by Erwin Ried on Tindie
This is the evolution of the already popular Mayhem v1 for Flipper Zero. This time you can have EVERYTHING in one board, at the SAME time
- www.lilygo.cc T3 S3 LR1121
Specifications MCU ESP32S3FH4R2 Flash 4MB PSRAM 2MB Size 66 X 36MM USB Charging 500MA 5V Wireless protocol Wi-Fi + Bluetooth 5.0 Onboard functions Reset + Boot Button, Support TF Card 0.96 inch SSD1306 Driver I2C OLED Resolution 128x64 I2C interface SDA--IO18 SCL--IO17 --- LILYGO GitHub Support --...
- techberet.com Designing a Replacement PCB for the Microsoft Sculpt Ergonomic Keyboard - TechBeret Blog
Table of Contents (apologies, this is a long post)
- • 100%www.hackster.io Micro One-Armed Bandit
Andrew Smith’s Micro One-Armed Bandit is a micro slot machine complete with lights and sounds.
- • 100%www.hackster.io nRFBOX: Your All-in-One Gadget for BLE and 2.4GHz Networks
The nRFBOX Project is an open-source initiative aimed at providing a comprehensive set of tools to explore the 2.4GHz spectrum, including Ble By CiferTech.
- • 100%www.tomshardware.com Raspberry Pi Pico converts Paw Patrol toy into arcade controller
Pawsome arcade fun!
- • 100%hackaday.com Jump Cacti With An LDR And A Pico
By now, probably everyone is familiar with the “You’re Offline” dinosaur that stars in Google’s T. Rex game. You know — jump cacti, avoid pterodactyls. Repeat until yo…
- https:// www.forbes.com /sites/davidaxe/2024/09/03/as-the-russians-march-on-pokrovsk-the-ukrainians-damage-or-destroy-nearly-200-vehicles-in-one-day/
This isn't meant as a political post, I just thought it was interesting the type of tech used, especially considering the 328 is in so many hobbyist MCUs like the uno.
- • 100%hackaday.com The Worsening Raspberry Pi RP2350 E9 Erratum Situation
There’s currently a significant amount of confusion around the full extent of the GPIO hardware issue in the Raspberry Pi RP2350 microcontroller, with [Ian] over at [Dangerous Prototypes] of …
- www.cnx-software.com How to recover a "bricked" Raspberry Pi Pico 2 or other RP2350 board - CNX Software
Recovering a bricked Raspberry Pi Pico 2 or performing a factory reset on a Raspberry Pi RP2350 board couldn't be easier, simply copy...
- • 100%
WeAct RA4M1 - A small board with plenty of GPIOs that's software-compatible with the Arduino UNO R4
www.cnx-software.com WeAct RA4M1 - A small board with plenty of GPIOs that's software-compatible with the Arduino UNO R4 - CNX SoftwareLast week, we covered the Maker Go RA4M1-R4 development board, an inexpensive "clone" of the Arduino UNO R4 Minima with some small modifications like
- • 100%www.tomshardware.com This Raspberry Pi Pico drives tiny level crossing lights for a model train
Is it safe to cross? It depends on how tall you are.
- • 100%www.tomshardware.com Pimoroni Pico Jumbo Review: Giant Pico Board that Uses Alligator Clips
3.5 times larger than the Raspberry Pi Pico 2
- www.cnx-software.com Using RISC-V cores on the Raspberry Pi Pico 2 board and RP2350 MCU - From blinking an LED to building Linux - CNX Software
Raspberry Pi Pico 2 was released last month with a Raspberry Pi RP2350 microcontroller equipped with two Arm Cortex-M33 cores and two 32-bit RISC-V
- www.lilygo.cc T-Deck Plus
Upgraded based on T-Deck, mainly added GPS module, and Built-in 2000 mah battery 【Keyboard letter styles are sent randomly】 Specifications MCU ESP32-S3FN16R8 Dual-core LX7 microprocessor Wireless Connectivity 2.4 GHz Wi-Fi & Bluetooth 5 (LE) Development Arduino, PlatformlO-IDE, Micropython Flash...
- github.com GitHub - rscott2049/pico-rmii-ethernet_nce
Contribute to rscott2049/pico-rmii-ethernet_nce development by creating an account on GitHub.
- • 100%
Maker Go RA4M1-R4 core board is a cheap Arduino UNO R4 Minima clone taking up to 50V DC input
www.cnx-software.com Maker Go RA4M1-R4 core board is a cheap Arduino UNO R4 Minima clone taking up to 50V DC input - CNX SoftwareThe Maker Go RA4M1-R4 core board is another Arduino UNO R4 Minima clone but offered at a price point much lower than the original and the Waveshare R7FA4
- • 96%hackaday.com Hardware Bug In Raspberry Pi’s RP2350 Causes Faulty Pull-Down Behavior
The newly released RP2350 microcontroller has a confirmed new bug in the current A2 stepping, affecting GPIO pull-down behavior. Listed in the Raspberry Pi RP2350 datasheet as errata RP2350-E9, it …
- github.com GitHub - Mr-Bossman/pi-pico2-linux: RISC-V linux on the raspberry pi pico 2
RISC-V linux on the raspberry pi pico 2. Contribute to Mr-Bossman/pi-pico2-linux development by creating an account on GitHub.
- • 100%hackaday.com Building A Microcontroller From Scratch: The B4 Thinker Project
[Marius Taciuc’s] latest endeavor, the B4 Thinker, offers a captivating glimpse into microcontroller architecture through a modular approach. This proof-of-concept project is meticulously doc…
- www.tindie.com Negotchi - network security scanner by OlleStore on Tindie
Netgotchi: Your Network's Guardian Netgotchi is Pwnagotchi's older brother
- www.hackster.io Rajesh K T's Arduino UNO Clone Shows True Flexibility — Literally
The "Flexiduino" offers everything you'd expect from an Arduino UNO compatible — but on a floppy PCB substrate.
- • 100%www.instructables.com How to Build an RC Duck - With Arduino and Wi-Fi
How to Build an RC Duck - With Arduino and Wi-Fi: It is summer, it is warm - well at least on some days here in Germany - sounds like the perfect time to take the duck out for a spin. Sounds a little bit weird, because it is, but it is also a heck of fun. In this Instructable I will show you how yo…
- www.tindie.com Flipper Zero ESP8266 Deauther by PCB Studios on Tindie
ESP8266 Adapter Board For Flipper Zero
- • 93%www.hackster.io Turning an Ultracheap “Electronic Game” into a Fun Arduboy
X3e hacked a cheap handheld electronic game and turned it into an Arduboy.
- • 100%
Turi Scandurra's Library Collection Gets Your Raspberry Pi Pico 2, RP2350 C Projects Started Right
github.com GitHub - TuriSc/Raspberry-Pi-Pico-Libraries: A collection of C libraries for Raspberry Pi Pico (RP2040) and Raspberry Pi Pico 2 (RP2350)A collection of C libraries for Raspberry Pi Pico (RP2040) and Raspberry Pi Pico 2 (RP2350) - TuriSc/Raspberry-Pi-Pico-Libraries
- shop.pimoroni.com Pimoroni Explorer - Board Only
An electronic adventure playground for physical computing, built around the RP2350 chip. Includes a 2.8" LCD screen, a speaker, a mini breadboard, and much more!