An ATTiny board that one of the students developed for this project, etched on single-sided FR4.

Electronics and C ++ education with an ATTiny13

when [Adam, HA8KDA] he is not busy with his doctoral studies, he mentors a group of students interested in engineering. To teach them a wide range of subjects, he decided to build a fun little integrated project as they observe and participate along the way. With this ATTiny13A project decorated with LEDs, [Adam] demonstrated schematic and PCB design, then taught the basics and intricacies of C ++, especially when it comes to creating low-clutter software, and plugged it all into a real-world device that students could take home later. the project. Her course has gone way beyond the “Hello world” we typically expect, and some of us may only want a college experience like this.

He shares PCB files and software with us, but also talks about the C ++ 20 framework that ATTiny developed for this. The ATTiny13A is very cheap and also very limited – you get 1K of ROM and 64 bytes of RAM. This framework allows you to put it to good use, providing the basics like GPIO wiggle, but also things like low-power operating hooks, soft PWM with support for optional multiphase operations, and EEPROM access. Students could write their own animations for this device and even include them in the repository!

In educational projects, keep the code straightforward and clean, no-nonsense and accessible to students. These are the things you can only achieve when you truly understand the tools you are working with, which is the perfect position to teach them! [Adam] intends to demonstrate that C ++ is more than suitable for devices with limited resources and tells us about the EEPROM class code he wrote: compiling the same amount of instructions as an Assembly implementation and consuming the same amount of RAM, while providing the time compilation checks and fail-safe syntax.

We’ve already talked about using C ++ on microcontrollers, getting extra functionality at compile time without overhead, and this project illustrates the concept well. [Adam] he asks all of us, and especially our fellow C ++ wizards, for our views on the framework he designed. Could you achieve even more with this simple hardware: make your code more robust, clean, do more with limited resources?

What could you build with an ATTiny13, especially with such a framework? A flashy wearable hair clip, perhaps, or a remote-controlled RF plug for code learning. We also saw a tiny camera trigger for endurance racing, a handheld Flappy Bird– as a console and many more!

Leave a Comment

Your email address will not be published.