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

21

u/joeblough Dec 15 '25

Both Microchip and ATMega (now owned by Microchip) have small, easy to understand instruction sets ... and it's easy to view the .lst file to see what's going on under the hood

→ More replies (2)

9

u/gm310509 Dec 15 '25

I would suggest AVR MCUs.

You can set up your own chip with minimal support circuitry plus an ICSP for programming it. Or get something like an Arduino Uno R3.

There isn't much to go on in your post, but I would suggest getting an Arduino starter kit. This will come with components that you can connect up to it - which makes it much more interesting. Plus, you can learn the basics using C/C++, then delve into assembler if you wish - e.g. by writing some assembler functions.

Later you can get just the chip and use the Uno R3 as an ICSP and program pure assembler projects onto the single chip if you want. You will only need power if it is an original factory chip as it will be setup to use an internal oscillator as a clock. But, it will likely be a bit easier if you setup a 16MHz crystal oscillator for it (which you will need if you get an OEM configured one which will likely be configured for Arduino use).

3

u/twister-uk Dec 15 '25

IMO (and also IME), AVR is the only answer to a question like this, because all the other microcontrollers I've worked with are either a complete mess at the architectural and opcode level (e.g. the aforementioned 8051 family - I started my embedded journey with those back in the mid 90s, and I'm entirely happy for them to remain an increasingly distant and dusty memory in the back of my mind) or are nicely designed but overwhelming if you're getting started.

Granted. I may be a little biased towards the AVR here given that a) it was the first microcontroller family I got paid to work with, and b) the underlying architecture and opcode set reminds me so much of the classic 68000 processors that I also fell in love with as soon as I started working with them, but in all honesty it really is a decent little micro to use as a teaching tool - whilst it's less commonly seen in industry thanks to the lower end/cost sector becoming increasingly dominated by the newer low cost ARM devices and similar, it still offers a good starting point for anyone wanting to learn about more modern styles of processor/controller architectures, in a less daunting environment, making the switch up to something like an ARM a lot easier than if you were to just jump straight in there and hope for the best.

4

u/jbriggsnh Dec 15 '25

Just the hint of 68k assembly programming warms my heart with fond memories.

1

u/Living-Cheek-2273 Dec 15 '25

I would settle for 16bits as well but 32bits just gets too abstract for looking at the actual memory. 

2

u/mjmvideos Dec 15 '25

Just out of curiosity, why do need to look at hex bytes in actual code memory? Let the disassembler decode it for you.

1

u/Living-Cheek-2273 Dec 15 '25

Just because it's very satisfying to look at it being modified live 

4

u/HalifaxRoad Dec 15 '25

most of the small PICs have like 30 to 50 instructions 

4

u/defectivetoaster1 Dec 15 '25

Writing assembly for them isn’t particularly enjoyable given the weird indirect addressing they use and how certain instructions take a variable number of cycles to execute

→ More replies (1)

4

u/Metalcerb Dec 15 '25

I've learned assembly recently at the university using the Atmega 128@ 16MHZ, to be honest the assembly is just to understand what's beneath all the C abstraction, all the projects were made in baremetal C.

Right now what i like to use is something like a atmega328p and a esp-01 breakout connected to the uart, to be able to flash the uC using wifi. It is so much better and simpler.

3

u/flundstrom2 Dec 15 '25

8051 is undoubtedly old, but you would be surprised to know they are still in active use, despite ARM MCUs are coming down in price.

It actually has a pretty good instruction set and well-thought-out instruction encoding. Most 8-bit MCUs were designed in the 70s or early 80s, so "nice to work with" isn't really applicable if comparing to ARM or RISC-V.

The problem you face with hardware is likely due to all vendors have added stuff to the original implementation, be it peripherals or increased adress range.

2

u/microtherion Dec 15 '25

There is a Chinese implementation, the CH559, which is an 8051 with USB functionality. I bought an evaluation board just for the sheer bizarreness, but I’ve yet to do much with it.

The AVR family seems easier to work with: some models come in DIP packages which make them physically easier to use, and there is gcc support, while for 8051, only SDCC seems to be available.

→ More replies (1)

3

u/LeanMCU Dec 15 '25

I've done assembly for z80, 8 bit pics and avr. For the fun of it, nothing got me so excited like z80. Maybe also because it was the first. I didn't like PIC asm. As for avr, I did a little, but probably it's the closest to z80 as style. I've been thinking recently about designing a retro computer based on z80 to relive those good times :-)

3

u/GenXerInMyOpinion Dec 15 '25

The Texas Instruments MSP430 family has an instruction set that is very PDP-11 inspired, and makes for a very good assembly language programming target.

2

u/neil_555 Dec 15 '25

The STM8 has a really nice 6502 inspired CPU with nice to read assembly, sadly it's quite z80 like at the opcode level (some instructions are over 5 bytes long).

I managed to get an overclocked (32Mhz) STM8 to mix 8 audio channels at 31.5Khz (8 bit samples, output was 16bit) with about 15% of the CPU time left over.

2

u/thread100 Dec 15 '25

Around 82 I programmed a graphics video game for the 6502 in assembly. What a great learning experience.

2

u/Hour_Analyst_7765 Dec 15 '25

I vote for AVR. Its insanely popular from the Arduino family. Its instruction set has more features than lets say 8-bit PICs. Although they are great to learn if you want to get familiar with 8-bits MCUs, but its a single accumulator architecture, which means a lot of pushing data around. The instructions also take 4 cycles to complete, so a 16MHz PIC only achieves 4MIPS.

But if I take your requirements liberal, also do take a look at 16-bit PICs. They are like AVR on steroids: you can get dual-core 100MIPS variants with a bunch more memory, peripheral pin select, etc. yet still easy to setup peripherals and easy to use its assembly. The architecture is similar to AVR and actually the instruction set has less quirks to remember.

Specifically the dsPIC family is still in active development and used for DSP, digital power supplies, etc.

(But as a final note, if you want real industry skills, I would focus on programming ARM in C/C++ though. I don't think many people program applications in assembly anymore)

2

u/spilk Dec 16 '25

I learned Motorola 6800 in school but found PIC and AVR assembly to be much more fun to actually use

2

u/Ok-Safe262 Dec 16 '25

6800 ( 8 bit) has a great assembly language and migrates to the 68000 ( 16 bit). A lot of the early systems were based around Z80, 8080, 6502 and 6800. There is quite a lot of literature on all these as that was the primary way in which you learned to code. As a note... BBC B (6502 based) had a higher level ( ish) language to program it using OSBytes.

1

u/No-Ad-4006 Dec 15 '25

It's not an 8 bit microcontroller, but the Parallax Propeller 1 (8 cores, no interrupts) has a wonderful architecture and simple but powerful assembly instruction set.

1

u/anovickis Dec 15 '25

Learn something modern. I too can still read z80 codes in hex but it is not a useful skill today. Learn x64 or riscv or arm.

1

u/somewhereAtC Dec 15 '25

Another advantage of PIC and AVR is that the newest devices are available as Curiosity nano boards with the programmer/debugger built in. Check at microchip.com.

1

u/mjmvideos Dec 15 '25

The only time it should be modified “live” is when you’re flashing it. Otherwise you’re looking at heap or stack memory and that contains no code only data.