by spenczar5 · 4y ago · 0 comments
Like, I couldn't (or at least wouldn't) have gotten started on this project if I had to read the ATMega reference manuals from the very first step. But I did feel very frustrated that the Arduino "delayMicroseconds" function is so far off from accurate, and I felt frustrated also whenever I looked for deeper explanations of almost anything. It's a very copy-and-paste culture.
I eventually did find programming things more directly to be quite rewarding and worthwhile. My code is still in a ".ino" file, and uses some Arduino stuff, but it's basically built around ISRs in some frankencode middle state.
There's a lot of room for someone to create good tutorials and material for ramping up and out of Arduino. Would have helped me a lot, at least.
And then it should have an "export self-contained project" feature that gives you a directory containing a Makefile and all the dependencies to build your .ino, as source code form (and none of the ones you don't use), so you can easily see exactly what is getting built under the hood and can use that as a bridge to working outside the ecosystem. At the scale of 8-bit micros there's no reason not to work with copies of your dependencies, and it's very educational seeing everything in one place (and being able to hack on it) instead of having it scattered in a bunch of global package paths.
The frameworks and libraries are useful (if opaque and quirky and underdocumented), but the IDE is just so underwhelming... heck, it doesn't even manage to be a decent text editor.
Getting started with Arduino makes total sense, nobody's expecting newcomers to start off with the IC datasheet... but they should be able to eventually read the parts they need and work with it directly, instead of relying only on software abstractions. That's the beauty of these systems.
Good news they do exist (at least if i understood your statement correctly), You just need to search with the keywords "AVR", "atmega328", or whichever version you intend to use instead of "Arduino".
I attempted to make a simple PLC this summer and these resources were a great help :
[book] Make: AVR Programming https://www.amazon.com/AVR-Programming-Learning-Software-Tec...
and this complementary (or introductory) video to the book by the author i believe https://www.youtube.com/watch?v=ERY7d7W-6nA
[Youtube-videos] A playlist of Cornell's ECE 4760 AVR Lectures by the very chill "Bruce Land" (from 2012) : https://www.youtube.com/playlist?list=PLD7F7ED1F3505D8D5
The course website (labs, exercises and readings) : https://people.ece.cornell.edu/land/courses/ece4760/index_20...
Homeworks : https://people.ece.cornell.edu/land/courses/ece4760/homework... Labs : https://people.ece.cornell.edu/land/courses/ece4760/labs/old...
Although the course was centered around an atmega16 or something? i really don't recall sorry but the knowledge i gained was invaluable and easily transferable to a 328p.
Fundamentals of Microcontrollers - Arduino bare-metal breakdown (A playlist of a guy "Mitch Davis" exploring an atmega328 barebone and using tools like AVRdude etc..) https://www.youtube.com/playlist?list=PLNyfXcjhOAwOF-7S-ZoW2...
Atmel Programming Tutorial (by Chris Dahms ) https://www.youtube.com/playlist?list=PLoLaqVexEviMZu55Y4JO6...
Hope this helps.