AVR Reverse Engineering Hack Chat

On beyond Arduino

Wednesday, April 21, 2021 12:00 pm PDT Local time zone:
Hack Chat
Similar projects worth following

Uri Shaked will host the Hack Chat on Wednesday, April 21 at noon Pacific.

Time zones got you down? Try our handy time zone converter.


We've all become familiar with the Arduino ecosystem by now, to the point where it's almost trivially easy to whip up a quick project that implements almost every aspect of its functionality strictly in code. It's incredibly useful, but we tend to lose sight of the fact that our Arduino sketches represent a virtual world where the IDE and a vast selection of libraries abstract away a lot of the complexity of what's going on inside the AVR microcontroller.

While it's certainly handy to have an environment that lets you stand up a system in a matter of minutes, it's hardly the end of the story. There's a lot to be gained by tapping into the power of assembly programming on the AVR, and learning how to read the datasheet and really run the thing. That was the focus of Uri Shaked's recent well-received HackadayU course on AVR internals, and it'll form the basis of this Hack Chat. Then again, since Uri is also leading a Raspberry Pi Pico and RP2040 course on HackadayU in a couple of weeks, we may end up talking about that too. Or we may end up chatting about something else entirely! It's really hard to where this Hack Chat will go, given Uri's breadth of interests and expertise, but we're pretty sure of one thing: it won't be boring. Make sure you log in and join the chat -- where it goes is largely up to you.

  • Hack Chat Transcript, Part 2

    Dan Maloney04/21/2021 at 20:56 0 comments

    Uri Shaked12:55 PM
    I don't believe those are mutually exclusive.

    Thomas Shaddack12:55 PM
    Talk him into opening it if the commercialization fails.

    Inne12:56 PM
    @Uri Shaked Regarding the up comming HADU Pico course, is there something you wish to see/would happen during the course. What would make you happy.

    Dave Blundell12:56 PM
    Any advice on making money from open source hardware?

    ailaG12:56 PM
    Or find someone to fund it as open source for him

    Uri Shaked12:57 PM
    As I see it, making LOTS of money is a skill, which is pretty much orthogonal to being a great developer, creating amazing projects or anything similar.

    ailaG12:57 PM
    opensource is awesome but it is a challenge

    Dave Blundell12:57 PM
    I don't sell any open source things, yet, but have two projects I'd love to be open if I can figure out a way to

    Uri Shaked12:57 PM
    @Dave Blundell I'd start with interviewing Limor from Adafruit and Nate from Sparkfun

    RichardCollins12:57 PM
    I agree, but he is rather stubborn and wants to change all computing - "his way". I love him, but he can be hard to love. Yeah, i offered to help him raise the money. He just wants to do it his way, and probably does not want his older brother to help him.

    rjtescher12:58 PM
    Older brothers can be .... at times.


    I have some and are one!

    Uri Shaked12:58 PM
    I can only talk about The Skull, which made something like $1,500, which I don't think it's a LOTS of money

    Uri Shaked12:59 PM
    @Inne I'd love to see creative things people do with what they're learning.

    No, but do that same thing enough times and you can make it something big

    rjtescher12:59 PM
    @Uri, so a 0.02 percent of ROI?


    RichardCollins1:00 PM
    I downloaded Wikipedia the last two days. When I was working on Google ngrams, I had a problem that was taking my program 32 hours to run. He memory mapped and optimized and it ran in three minutes. I beg him to let me use that to solve some Internet global problems, but he has some other things in mind. He is thinking about my Wikipedia problem.

    Uri Shaked1:00 PM
    For instance, in the AVR course, people had an assignment to build a pong game in AVR assembly, from scratch.

    Uri Shaked1:00 PM
    It was fun to see how everyone approached this differently, and some people even went the extra mile and added some fun features like a speaker

    Uri Shaked1:01 PM
    @Dan Maloney as Derek Sivers once said, you never know where the lottery tickets are.

    rjtescher1:01 PM
    Pong? Whoa! I feel that could easily get over my head!

    I always thought the way they added "English" to the paddle in hardware with the original Pong was a pretty cool hack.

    rjtescher1:02 PM
    @Dan, so there was "English" involved?

    No wonder I was so bad at it!


    RichardCollins1:02 PM
    @Uri Shaked How about "Find all the covid mentions on the Internet (about 8 billion), identify the owners, contact them, classify the use and purpose, enroll the people in a global cooperative effort. Copy the problem to more computers, keep going till you find everyone and get them working together =--- simple algorithm, hard to get enough computer resources to do. And human buying in and agreement.

    Uri Shaked1:02 PM
    Here's @Michael Möller pong, I really love the logs he's written along the way:

    Uri Shaked1:02 PM


    AVR Asm Exam

    I attended the AVR assembly course, and it has a Final Project or Examination. This is my submission thereto. Well, it is more than that, it is also my trials and errors on getting there. While the main purpose is to present a software implementation on the simulator, this project will also run on real hardware.

    Read this on Hackaday

    Michael Möller1:03 PM
    Thanks for the mention.

    Uri Shaked1:03 PM
    @Dan Maloney reference please?

    rjtescher1:03 PM
    @Uri Shaked and @Michael Möller Thanks!

    I'll have to look that up -- think I mentioned it in a story I did when the dude who wrote pong passed away...

    Uri Shaked1:04 PM
    p.s. @Michael Möller ,...

    Read more »

  • Hack Chat Transcript, Part 1

    Dan Maloney04/21/2021 at 20:55 0 comments

    Hi everyone, welcome to the Hack Chat today. My name is Dan and I'll be moderating today along with Dusan. We're joined by Uri Shaked today, who's doing a HackadayU course soon on RaspPi 2040 and Pico, and completed a course earlier in the year on AVR programming.

    Uri Shaked12:01 PM
    "Hello world\n"

    Welcome Uri! Can you start us off with a little about yourself?

    rjtescher12:01 PM

    Is there audio?

    Uri Shaked12:01 PM

    @rjtescher - No, just text. Old school, like IRC

    Uri Shaked12:02 PM
    no audio today, but here's a recommended soundtrack for this hackchat:

    - Atom heart mother by Pink Floyd


    - Court of the Crimson King by King Crimson

    rjtescher12:02 PM

    Radu Motisan12:02 PM
    hehe, nice!

    Uri Shaked12:03 PM
    About me...

    Uri Shaked12:03 PM
    Software engineer by passion, and in the recent year, this passion has grown for projects that also involved hardware

    Uri Shaked12:04 PM
    Especially ones that challenge my gray cells and teach me new skills. Like building an in-real-life version of the Chrome T-Rex game

    I feel like I wrote an article on that...

    Uri Shaked12:05 PM
    or trying to decipher encrypted 3D printer firmware for weeks

    Inne12:05 PM
    @Uri Shaked do you remember a revelation you experienced when diving deeper into MCU programming, (like "wow now I can do something really cool").

    Uri Shaked12:05 PM
    About the 🦖?

    Dave Blundell12:05 PM
    decypher files on PC or reverse engineer a code dump that just doesn't have symbol tables?

    I knew it:

    Hackaday Dan Maloney

    Mechanical Build Lets You Jump Cacti In Real Life

    Simple to learn, hard to master, a lifetime to kick the habit. This applies to a lot of computer games, but the T-rex Runner game for Chrome and its various online versions are particularly insidious. So much so that the game drove one couple to build a real-world version of the digital game.

    Read this on Hackaday

    Dave Blundell12:06 PM
    (re: printer fimrware)

    Uri Shaked12:06 PM
    @Inne that's a great question.

    Uri Shaked12:07 PM
    I think that 3 days into writing a simulator for AVR, when I got "blink" to work for the first time, I realized how little of the MCU features most code actually uses

    Galactic creature 4212:07 PM
    What’s up ;)

    Michael Möller12:08 PM
    The AVR instructins or the specific hardware extra IO ?

    Uri Shaked12:09 PM
    Mostly the hardware extra IO. I don't remember exact numbers, but I think Arduino's blink used between 50% to 80% to the overall instructions.

    Nathan Brown12:09 PM
    It that a comment on what programs use, or the boat of Arduino?

    Nathan Brown12:10 PM

    Uri Shaked12:10 PM
    but that instructions was really the easier part about the emulator. The peripherals, especially the timers, took a lot longer to write. But for blink, I initially faked the timer with a few lines of code

    Michael Möller12:10 PM
    Friend of mine was using the library to time a pulse, there is a specific way to do it. He couldnt get it to work for two inputs. So I looked at the code and found there was a special hardware register setup for that - which I then found in the specs, whch is limited to one pin (on the 328)

    Uri Shaked12:10 PM
    @Dave Blundell decrypt the firmware on the PC, using python + numpy/scipy and jupyter:

    Jean-Charles joined the room.12:11 PM

    Uri Shaked12:11 PM
    @Nathan Brown what programs actually use.

    Phil.sydor12:12 PM
    @uri - Was your simulator written in HLL ? And what assembler package (s) do you use to code AVR?

    Uri Shaked12:12 PM
    The ATmega328p has 3 hardware timers. Most programs run fine with just Timer 0.

    Uri Shaked12:12 PM
    @Phil.sydor the simulator is written in TypeScript (a variant of JavaScript), so yes.

    Uri Shaked12:13 PM
    When I need I just use the GNU assembler. You can use it from directly in Arduino projects, e.g. - look at simon.S)

    Uri Shaked12:14 PM
    Other than being a maker with passion for...

    Read more »

View all 2 event logs

Enjoy this event?



Interested in attending?

Become a member to follow this event or host your own