r/microcontrollers • • Dec 15 '25

Is there a simple 8 bit microcontroller/assembly language that is nice to work with?

I'm searching for an 8 bit microcontroller where I can look at the actual hex/binary code. I've been learning 8051 assembly in university and I absolutely love seeing and understand every single instruction and value in the memory. But those microcontrollers are antiquated and need a bunch of "hacks" for compatibility. At least that's what it feels like everytime I put my code onto real hardware. So is there a simple 8 bit assembly language with actual chips I can program simple electronics projects with ?

29 Upvotes

43 comments sorted by

View all comments

Show parent comment

1

u/gm310509 Dec 15 '25 edited Dec 16 '25

Yeah, it is reasonably well structured and fairly consistent. Definitely easy enough to get started with.

Edit: I just wanted to double check some things before adding...

There are some gaps that I feel are a bit frustrating. For example, many instructions can only work with R16 - R31. Which is OK, but does often require additional instructions to do certain things.

Also, I feel it would be nice if there were ADDI (Add immediate) and ADDIC (add immediate with carry).

For example, incrementing a long:

   clr   R0,
   ldi   R16, 1     ; Can't use R1 here.
   mov   R1, R16    ; But I want my constant to be in R1 - because I'm running out of the 16 uppper registers.
   add   R20, R1    ; Increment my long in R23:R20.
   addc  R21, R0
   addc  R22, R0
   addc  R23, R0

I would prefer to be able to do something like this:

   addi  R20, 1    ; Increment my long in R23:R20.
   addic R21, 0
   addic R22, 0
   addic R23, 0

Along similar themes, there is a CPI (compare Immediate), but not a CPIC (compare immediate with carry) and some others. CPIC is useful for testing multibyte numbers (i.e. bigger than 2 bytes).

But that said, it is pretty consistent and I do acknowledge that it is RISC, so there may be some tradeoffs needed re CISC -vs- RISC instruction size, clock cycles required and no doubt other considerations.

And at the end of the day, while these "factors" are sometimes annoying, it isn't terrible.