It's the Final Microcontroller! (da da duh daaa da da dut dut daaaaaa...)
Вставка
- Опубліковано 12 лис 2022
- This is a video I've tried to do a couple times in the past but stock keeps changing. "What can you do with the last high quantity available MCU?" I finally settled on one that's been consistently available this whole time. Will be a multi-part series, here in Part 1 we select a chip, make a breakout board and then port an Arduino LCD library to work on it bare-metal.
- Наука та технологія
Ben messing with microcontrollers is still one of things that I will never get tired of.
"It's really expensive for how lame it is"
Yeah, thats been my experience of life in general.
So... Looks like I am not the only one that buys microcontrollers even when I don't need it.
The Louis Rossman real estate channel cracks me up. 😂
"This chip is bad and expensive." Yeah, I think I have a theory about why that model has been consistently in stock and available in large quantities...
thank you post production Ben Heck I can only imagine the amount of "it's the final mcu" was immeasurable you did what you had to do and made the cut.
ESP32-C3 is honestly a pretty awesome chip for the price. It's only $1.95 and there's lots of stock. It's a bit bulkier and WiFi may not be something you need/want, but you don't have to enable it if your project doesn't need it. As a bonus, you don't need any extra ICs to program it, you just need to connect USB to a shared ground and wire the USB D-/D+ pins straight to the microcontroller
Since i worked quite a bit with the esp32: do it. The documentation and examples are excellent, the peripherals are really nice, the 3 core design is awesome. There are a few drawbacks, since everything is quite general purpose and cheap, but man the connectivity is superior to most other chips out there (i would say inside the 10$ class)
But dont try anything with arduino, although the implementation is quite flat (in contrast to stm32f1xx),it is just ballast and you need the espressif functions sooner or later anyway
@@alainfelger93 Yeah I'd written arduino code for the esp8266 before, but with the C3 I'm writing in Rust using the esp-idf libraries. It's a super smooth experience so far, I highly recommend it
the ending of daylight savings news cycle was so dumb, it was only passed in the senate and accidentally to boot
It's fortunate that this GND connected initially to the VCC pins magically got fixed in editing, and prior to ordering the boards ;)
Huh. I didn't even notice that. I restarted the schematic at some point (not screen captured) so that's when it would have been "fixed"
"I've started this video at least two times before, but every time I didn't have my beer!" Thanks for the vid Ben 👍
Thanks for the video. I am not sure what is better... Watching your soldering techniques on your board OR the ongoing monologue...love it
It would encapsulate the chip shortage situation if after only an hour of design and kicking off the board, you check digi-key again, and the part is both obsolete and out of stock.
That's exactly what happened last time I tried to make this video I think like in May? Was gonna use the SAMD11C and then poof! Gone.
We all know that cat has reverse engineered WiFishy. It's now dancing a jig and delivering 5G, so kitty can order Greenies.
Attack of the Petscii robots on this microcontroller??? Sure...
ben's soldering always makes me nauseous until he scrubs it up and it comes out looking great
“I’m sorry, Dave. I’m afraid I can’t do that” HAL-9000
If by some miracle you find an appropriate substitution for Jennifer Connelly, then I will consider supporting your Rocketeer remake. hahaha
Thanks for clarifying what Louis Rossmann's channel is about!
Who?
I became a fan of his channel for the Apple bashing :)
nice effort. i enjoyed the several tangents on pop culture... but of course, insanity prevailed in the end, as always!
This movie you are describing reminds me a lot of Last Action Hero. One of the most under rated movies ever.
Also one of the few movies so heavily edited that the writers lost their credit. But yeah, that sounded like an excellent match.
Bah, back in engineering school we didn’t have all these fancy libraries. It was straight machine language courtesy of some archaic assembler. I have fond memories crafting custom drivers for those lcd interfaces and making them do cool display stuffs. Was in the middle of coding a game on a 20x2 when my 8-bit micro bit the dust. The semester was about to end and I still had to complete my final project so put the game code aside for later. That was over 20 years ago. Seeing this video really brought back fond memories of wrestling with micros into the wee hours of the night when others were out drinking.
Sometimes it makes more sense to use assembler. Especially when you're trying to remember what trick you were supposed to use to tell the C compiler to put a constant in flash rather than allocating RAM for it. Also when you have no idea how many instructions C is going to take to do something like >>=.
@@BrightBlueJim yeah but nowadays that "trick" is called "`const` and have a compliant compiler"
There's nothing more satisfying than not just owning tech, but to know the exact chips, & how they work, makes everything you own, (technology wise) immortal because you can replace faulty components without replacing the entire thing!
Until you discover that the ALU chip has vanished into memory and dust. Guess it's time to get into GALs.
For a hobbyist this check the boxes, being microcontroller agnostic armed with multiple layers of abstraction has its own perks especially with this market availability situations.
This does bring back memory 20 years ago I made basicStamp replica for uni final project. 1k Flash and 64B RAM half of it used for the interpreter leaving half for user scripts.
Such a shortage we're throwing microcontrollers away even faster with them in everything.
Parroty
The best videos are coming from the ones that just do what they like and share it with us, Thanks for caring enough for the viewers to not care about YT !
Back to the pic18f84 horror show! I bet it comes with the caveman club !
The problem with saying where one can get microcontrollers these days is that it's probably the one way you can guarantee you won't be able to get them in the future.
Great video as usual Bud - your human does the funniest things!
that's what I used to make the world's smallest game of PONG 12 years ago. The 8k of flash allowed me to put a game select in, you can play PONG, Breakout and Tetris on this thing. Used the DIP version though because I (still) suck at soldering SMD.
Hotplate strikes me as an easier route for SMD.
always set the parody bits right :P
Doing the lords work, sir. Can't wait for Ben to hack together his own chip interconnects so we can combine 80 of these things to power a single Furby.
Thanks, Car Industry
The headers on that are like DRM against any future soldering.
Just use a hotplate or hot air unit. Or oven, for that matter. Or a set of soldering tweezers for some items.
Your channel is the only reason I come to UA-cam anymore. Fellow Wisconsinite here. You betcha.
Another fine video Ben.
I particularly enjoyed the 8-BIT Guy impression..porting Petscii Robots over to his toaster !
Unfortunately though, my flaky internet connection dropped out about a minute or so before the end of the video.......Ah well, you can't win 'em all.
Oh man, Story Lord's actually scared the crap out of me as a kid! Lol
I always laugh when you talk about the louis rossman real estate channel 🤣
And now there's a Europe song stuck in my head
Thorzuul's making a little cash on the side as the mayor of flavortown...
I saw digi-key open and after your first sentence I knew your struggle. The struggle is so real that we've resorted to stripping chips off boards in some cases. I work with 3 assembly houses and we still can't find MCU ICs. I pray to the silicon gods to make in extreme mass production a general use 8-16 bit MCU that is cheap and easy to use and won't go out of style. Please take our money.
Your life long exposure to u.s. tv really shows.
I live about 30 minutes from mpja order a few things from there a few times a year. Not a huge catalog but they have sales on some things that are unique often and a great price. I programmed in avr studio a few years ago. Haven't tried it recently, I'll have to re-download now and see what I can remember. Have to get those fuses correct! Good job, cool video.
I like the Zilog eZ80 - can clock up to 50MHz, is Z80 backward compatible, has 24-bit registers and can address up to a whopping 16MB (which must be static RAM as God intended Mankind to enjoy - not the spawn of the devil's workshop, dynamic RAM)
Amen brother !
Stick a smidge of logic and a ram on that bus, and it can get you up to as much address space as you want. 64 bits is in reach... _if you can get past the DRAM!_ *lightning sound effects*
ez80 is nice, but right now is super expensive
Hey Ben, can you share the gerbers for that breakout board on oshpark or your blog?
I think Mathnet was part of Square One. My favorite educational drama was called "Read all About it". I also liked "Bloodhound Gang" from 3 2 1 Contact.
Even if the Atmel8 is literally the only one on the market right now, it's always great to use these microcontrollers to start learning the basics of programming. KISS, direct communication, and no redundancy or bloat.
The fun you can have and make with a microcontroller and small LCD and code templates 😁👍🏼 reprogram the world!
At 56:14 it looks like you've used _delay_us(50) instead of _delay_ms(50) - might be the cause of some of your startup shenanigans
Today in wisdom bestowed by Ben: Moses is Superman but also Goku. 13:31
9:57 I love how well you're impersonating him lol
I'd get a general-purpose microcontroller like this if I knew something I wanted to do with it. Right now, I have an Arduino that's already been programmed to interface as a jank Yamaha YM2151-based electronic piano (college project, medium-length story, short years-old video of the thing in action is on my channel) and an unused Arduino still in a box from a couple of years ago with no idea what to use it for. If I can't even think of something to do for myself with an Arduino with its bells and whistles, what would I do with the relatively barebones ATMega by itself?
Oh man.. Mavis Beacon's Typing of the Dead. That is incredible.
IIRC, Waterworld was the last blockbuster film that primarily relied on practical effects. I think it holds up alright because at that time, we were "done" with non-CGI video, but now it's an amazing spectacle to see. I really enjoyed it the last time I watched it (about 2 years ago) but 95% of the reason was seeing what the FX department was doing without the use of CGI.
There's a decent amount of CGI water but yeah. For the most part.
Ben should team up with the RedLetterMedia guys. He'd fit right in.
48:20 this is a common misconception that can cause serious problems. ANSI C only defines the MINIMUM size of a char to be 8 bits. it can be more. sometimes it is more. sometimes it is 16 bits and then your code breaks horribly and you spend so long figuring out why. same for short and int, which are both 16 bit min. sometimes an int will be 32 and a short will 16 on a system, sometimes they are both 16. Its USUALLY 8 bits in a char, but not always. and when its not, it can seriously grenade your code in exciting ways. i learned pretty quickly when i first started as an embedded software engineer to essentially never use char for 8 bits or int for 16 bits. for one thing, it was in our company style guide to use strongly defined bit lengths (usually just uint8_t or the like). C/C++ isn't nearly as good as Ada in doing this kind of work, but the explicit bit lengths worked fine.
Also you can write code that will work with whatever the size of a char or int is on the fly using sizeof and some other tricks, but its generally not worth it. the APIs we used that didn't want to throw around uint8_t for whatever reason, would just type def their own types. so in a library you would see API_CHAR as the type used everywhere, and some main header they just wrote a typedef for it. this makes a lot of sends for a company distributing an API because it squeezes a lot of reusability out of C.
I'm not saying Ben is wrong though. He knows all this i'm sure, and he also knows that in his targeted platform, char IS always 8 bits (which it is for that MPU). but now his code is locked into that assumption and requires refactoring to be deployed against a different platform. Ben is implying this will never happen, which is likely true. But its a bad habit i think. Always try to take care of the next guy to use your code in the future, because the next guy will likely be you!
Sometimes char is 9 bits, and you start wondering why someone's compiling your code to run on a mainframe.
@@absalomdraconis oh god lol. sometimes i wake up at night and have a flash of anxiety about misaligned strings or endianness. most of my work for years was writing interop code and it was common to carry a string from C to C# to C++ to C++/CLI to Ada to Fortran and back. i had to make sure the string didn't get mangled and came back without any extra null terminators in the C# portion
int8_t forever.
Wait! The Mr Clinton channel used to be a real estate channel?!?!
"Sorry, I couldn't find a device named robot fish." Damnit Ben!
LOL!
hey do your socks have holes in? no? then how did you get your feet in?
Don't forget one of the great edutainment shows "Square One Television"
Was that the one that had MathNet?
Just order a bunch of washing machines and salvage those microcontrollers 😉
there arent that many in there and they are sometimes otp... like i have salvaged one from a washing machine a couple months back because the 10 year old thing died and i wanted a benchmark for my new hotair station. --> yields nothing but a otp renesas r8k series mcu. not great
are you saying that the ESP32 does not qualify as a microcontroller?
Ben, could you share these pcb boards, please. I’ve will make them, have atmega 8 and 16 , nice to be using.
I fell in love with MCUs when I first learned to program the PIC16C711... today Im in a love hate relationship with pretty much all microcontroller manufacturers because of their spastic support. Microchip is a great MCU manufacturer but when it comes to programming they are a real PITA. Chip support for many older pics is no longer available in terms of programmers unless you buy an expensive universal programmer (or buy a cheap programmer and hope they dont install viruses in your PC) and port the hex code from the IDE. newer chips may or may not be supported with any one of the 5 different programmers they offer, or the programmer they did have quickly became obsolete... so your stuck having to research if the programmer you have is capable of programming the chip... Some of the larger MCUs they released fell off the wayside and they then pretend like they never existed (THE PIC17 series) Other manufacturers like motorola and Intel with their 8051s have great MCUs but the programming software and hardware are unobtanium ... So we are stuck with either PIC or AVR as the new front runners and deciding if we should go with high Horse power or basic capabilities with chips as small as 6 pin to as big as 64 plus.
You could use sprintf ?
Well done. One thing I have yet to see on UA-cam is some sort of µDOS with a tiny µC. I mean like a simple terminal with tiny programs and SD-cards instead of floppies. There is already something called TinyTV which is a potential monitor for a such µPC. :P
We're getting spoiled with your content recently!
I've run 128 sample FFT and visualized it on a small color TFT using the Mega8 before, so it is capable... It just doesn't like Arduino framework hehe.
Those are some good Bud meows.
i just double checked, and adafruit is selling atmega32 breakout boards with chips installed. they are selling arduino clones too, all for normal retail prices. its not as fun as making your own breakout board, but if you want some mega action with the extra memory its there
Milkbreath, eh? That's some peak 80s.
I'm glad you complained about the prices...
I'm glad you chose the worst cpu...
I'm glad your new flashing LED project will save the world...
It is interesting to see how many 'commodity parts' are now unobtainable. 2kx8 Srams are only from Rochester. Jfet J111 and several other parts are "obsolete". I usually prefer to buy from Newark, or Digikey but I find myself buying from Jameco a lot more now. Their "pulled" parts section.
Aren't ESP32's and even the ESP8266 way more powerful than this MCU?
Yes, ESP32 is somewhere around 80 times as powerful on a single core.
28:00 I'm pretty sure your toolchain is going to eliminate all that unused code from your final binary anyway, so no need to go in and delete lines manually.
re: the time change, airlines and similar institutions begged for another year of the status quo to give them time to patch their software. That's why we have to go through this one more time.
I don't blame them. Time zones sucks.
@@BenHeckHacks At least they're getting easier -- removing the special condition instead of adding it.
this is brilliant 👍 challenge: alternatives to microcontroller and other component shortages, also what would you need if a CME hit Earth for data storage and retrieval.
You connected vcc to ground on pins 4 and 6!
Pets don't like the conversion from DST. HEY YOU, it's DINNER TIME! (No not for another hour!)
When I try to solder SMT QTF's like you do, I end up with solder blob shorts UNDER THE LEGS where the solder braid won't go!!!!!
I've got a small hord of atmega328's left over from a project. Please post your gerbers for that board, or did you share the thing on OSH park?
Atmel Studio (aka microchip studio) is a bloaty hog, that only runs on windows. So, I use MPLAB XIDE on Linux.
The secret to Ben's technique is that you drag the solder out from under the legs _before_ removing it with the braid, not at the same time.
The RP2040 is cool, but really needs an external QSPI flash to work with it.
it seems like the ESP32 is starting to replace the atmel chips as the goto for hobby stuff. there is still a strong community of anti-scalpers for atmel chips though and raspberry pi's. i've been following some of them, and people are getting pi 4's at normal retail from a few sellers before the scalper bots snap them up. the fact is, there is enough of a constant demand on pi's from scaled usage that the scalpers will always make double or triple (or more) from buying the entire supply. from what i've read, the supply is back to where it was before covid now too, but the scalpers have just hit a goldmine (i don't think production is really back 100% though). i think it's going to take a new hobby devboard that has nothing to do with components on arduino or pi in particular. hobby users will just simply not buy the boards at scalped prices, whereas production guys have no choice. if its a new hobby devboard, no production guys will be using them at scale
Last I heard, a lot of the production guys are buying their Pis direct, because the manufacturer is intentionally working to keep them in the ecosystem- it's definitely a production bottleneck. I myself am only scheduled to receive a few FPGAs that I ordered in summer this December.
I know it's outdated (situation changed, lots of chips back in stock again), but STM32G0 series is my sweet-spot: cheap af, plentiful, and package that can be hand soldered by noob like me (I am struggling with those QFN packages). It beats the 8bit AVR chips in computational power, can be cheaply programmed with stlink or via UART bootloader. Not many GPIO though.
Are masked chips still a thing or is everything 'field programmable' now?
The secure IROM programs in some chips appear to be mask ROM still, not sure about the equivalent part of the RPi MCU. It's also unclear if the "fuse bits" in modern chips are true fuse PROM circuits or just crippled flash EEPROM circuits.
we "need murder sho wrote" where we know that she the author was the killer all along, not contrived like "dexter" but tongue in cheek, poking fun at how dumb we really are.
17:40 If sega won't make this, a fan really ought to. But then, which model model for Mavis Beacon?
Adafruit Chip Shortage song plays in background.
Haha great office reference
I hate that I can hear the song from that title.
Hi Ben, I did a tear down and an analysis video on a cheap BESC which I found uses this Atmega8 MCU in a very interesting way. I am not sure, but given the configuration of this MCU I would not be surprised if it is widely used in this way.
Omg love the luis realastate
ATMEGA8LAU ? That will certainly be enough to make an LED flash. I suggest an NE555 to do this.
18:22 "It got old 20 minutes ago!" Not even 19 minutes in, perfect timing.
The average video I make is done across 2-4 weeks so yeah I often forget what I've covered or said.
"Final Countdown" not too long ago, newer than "Hawaii O Five"
The prices of the ATMEL chips compared to STM32's (and clones) with far more power for cheaper is insane now. The RP2040 is also a brilliant MCU with far more periphs and custom logic than the ATMEL parts, although more power hungry. I've been using a lot of ESP32's recently too - fairly cheap and easy to source.
The MEGA8L used in this video is a 20 year old legacy part. New AVRxt cored parts are significantly cheaper. Neither compete in the same space as an RP2040.
the easily foundable loose chip pricing is insane, you can find clone arduinos for cheaper than the atmel chips on them
Is it wrong that I’m disappointed that Ben doesn’t have a reflow oven?
I do, it's in my garage because it stinks when I run it.
Lots of GD32 parts are available via LCSC.
The only thing I know of that uses an ATMega8L are those XenoGC modchips for the Nintendo GameCube. I suppose if you want to play burnt copies of Wind Waker then Digikey is your hookup!
Given up on Digikey now. Come on over to LCSC
You can still buy the STM32 'Bluepill' for just over €2 per board.
Just beware that they are all shipping with STM32 clones, not genuine STM32. They’re not even necessarily worse (as I understand it, some of the clones even fix bugs in the originals!), but nonetheless that can cause compatibility issues.
I have an ATTINY412-SSN reel of 1000 (well, around 860 pcs now) that I bought during the beginning of chip shortage. These are not bad and are for me "the last microcontroller". At least with the UPDI interface shared with the reset pin, 6 pins are usable. Selling these at 20-length cuts at digikey list price + shipping if anyone's interested. Can't wait for SAMD21/51 to become Obtainium again.
Those are nice chips I've used them before.
Nice Rossman burn
Heck I looked on eBay for something as backward as a basic stamp and the prices are almost insultingly high
You should try the same project in EmBitz :) Then you don't have to swap IDE for AVR, STM, NXP etc... And the debugger is good :)
Ben got to say bare metal, I never got to...