Author Topic: 8048 & 8051 (and variants) - software and hardware development, debugging, etc.  (Read 2834 times)

0 Members and 1 Guest are viewing this topic.

Offline MrWifiHifiTopic starter

  • Regular Contributor
  • *
  • Posts: 63
  • Country: sk
Hello

I got some 8048/8049/8035 and 8051/8031/8032 microcontrollers a while back. After a long time, I finally dug in and put together an EPROM simulator with which I started to revive the 8035. Compared to today's MCUs, it is a somewhat longer process, but if you learn it, it goes quite quickly. I currently have one project in progress where the 8035 communicates serially with multiple devices, but it still needs to be tested.

But to the point. I created this post mainly to better understand how to develop hardware and software for these microcontrollers. I looked on the Internet to see what the possibilities are for debugging a program. HSE-49 and SDK-51 were developed by Intel for program development and debugging. Here in Slovakia, HSE-49 was more or less copied as TEMS-49. But it has 2x 8035 instead of 2x 8039, schematic has been changed to suit the component base of the time, and it also has additional 8155. For 8051, I am not yet aware of something like SDK-51 being produced in our country. Either way, the HSE-49 and SDK-51 are built on a similar principle. It is possible to insert breakpoints, read the states of internal MCU registers, step the program, rewrite values ​​in memory, and the like.

My question is whether it would be possible to make a minimalistic version of such emulators for debugging and testing programs. I am mainly interested in the possibility of reading the internal registers and then how the 8051 could be operated. Also, is there a more detailed description of the hardware for the HSE-49, as there is not much in the "8048 Family Application Handbook". More on HSE-49 and SDK-51. How is it actually with the emulation of that MCU, is it a full emulation for example 8048 or is it more something between 8048-8035, so it is not fully compatible with the ROM MCU version? Can it work with all ports or is it somewhat restricted?

I would also like to ask if there is any literature available somewhere regarding writing programs for these MCUs, for example what principles to follow, how to use memory, how to work with individual peripherals, program branching and also perhaps examples of some routines for mathematical operations or for working with peripherals. Or is only Intel literature available?

Thanks in advance for the helpful answers.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4657
  • Country: us
8051/8052 chips are still widely used (often in updated and more powerful versions), and you can find all sorts of info about them on the web.  Maybe start at https://www.8052mcu.com
Keil has a full modern compiler/assembler/simulator, and silabs has a modern IDE (and IIRC, free access to the Keil tools.)  https://www.silabs.com/mcu/8-bit-microcontrollers

I don't know about the older chips.


 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 6902
  • Country: li
Yep, Keil or IAR are the best for that. They include a simulator so you may step through your code easily and watch registers/memories..
They support many various chips based on that archs, including some embedded into ADCs etc.
BTW., the IAR enables to compile up to 16MB large binaries off the C for the chips (with some prerequisites), afaik..

https://www.iar.com/embedded-development-tools/iar-embedded-workbench
« Last Edit: January 11, 2026, 10:51:02 am by iMo »
Readers discretion is advised..
 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 3358
  • Country: au
I got some 8048/8049/8035 and 8051/8031/8032 microcontrollers a while back. ....

My question is whether it would be possible to make a minimalistic version of such emulators for debugging and testing programs. I am mainly interested in the possibility of reading the internal registers and then how the 8051 could be operated.

If that is your goal, you are best to retire those 8048-cored parts, and focus on 8051.
There are many 8051 simulators, but I do not recall an 8048 simulator.

As mentioned above, Silabs have 1T 8051 parts with good Step/Break/Examine SFR support in their USB Bridge debug tools and their older EFM8BB1LCK is low cost, tho for 3v3 part.

The newer EFM8BB52 is wide Vcc with better peripherals and 50MHz and is supported on the BB52-EK2701A, so that is a better 'landing point'.

After a long time, I finally dug in and put together an EPROM simulator with which I started to revive the 8035....
 How is it actually with the emulation of that MCU, is it a full emulation for example 8048 or is it more something between 8048-8035, so it is not fully compatible with the ROM MCU version? Can it work with all ports or is it somewhat restricted?
The Silabs parts use two pins for serial DEBUG : RST and one other.

Otherwise older parts did lose ports to access the external eprom, and some used parallel mapped IO like the 8155 to give partial port restoration.



If you have an eprom emulator IIRC there were piggyback 8048 parts you could

AI finds this
Intel 87P50: A known piggyback version in the MCS-48 family that used a separate EPROM.
National Semiconductor NS87P50D: Another example of a golden ceramic piggyback development chip designed for MCS-48 systems.


ebay has one listed, tho not cheap ($60)... and unclear if it works.
 

Offline MrWifiHifiTopic starter

  • Regular Contributor
  • *
  • Posts: 63
  • Country: sk
It's more about using the parts I have. That's why the 8048 and 8051, I don't plan to buy any newer ones. As for the 8048 emulation. Even if I lost those ports, it can still be considered as an 8035 emulator, which would also have the possibility to look at the contents of the registers, which I personally see as a plus.

As for a single step 8051, in SDK-51 it is solved through INT0 and breakpoint logic, which ensures it. But I still have to read it properly, how it works, and somehow deduce from it what and how it could be implemented.

As for some emulation and debugging of the 8048 and 8051, I'm doing it for now to make my tinkering easier. Ideally, if I could make something, for example with an Arduino, which I would be able to step and watch the state of the registers together with the setting of breakponints, even though only through the serial line and the terminal.
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 6106
  • Country: nl
A long time ago I used to work with these MCU's a lot and wrote my own simulator for the 8051 and also one for the 8052. The old visual studio projects are attached and maybe they are of some use to you.

To make your own emulator with one of the MCU's you have, you can use a rom emulator in which you replace instructions on the fly to turn them into a software interrupt and have an interrupt handler take over the process until you are ready to release it. Just like what you found used in the SDK-51.

https://hackaday.com/2024/11/05/picorom-a-dip-32-8-bit-rom-emulator/
https://hackaday.io/project/203946-pico2romemu-pico2rp2350-rom-emulator

Above are a couple of links to what others have done to emulate rom's.


Offline mino-fm

  • Regular Contributor
  • *
  • Posts: 168
  • Country: de
Above are a couple of links to what others have done to emulate rom's.

Let me add this one, I'd shown last week: https://www.eevblog.com/forum/projects/32-kb-(ep)rom-simulator-using-rp2040-pico-board/
Easy to solder because it uses a standard Pico-Board. Easy to connect because is uses RS232, so you could use 8088 PCs too ;-)
Costs should be < 10 €. (MEGA - make EU great again :))
« Last Edit: January 12, 2026, 09:28:13 am by mino-fm »
 
The following users thanked this post: PCB.Wiz

Offline josip

  • Regular Contributor
  • *
  • Posts: 176
  • Country: hr
When I was looking how to debug 8051, I found this...
https://www.analog.com/en/resources/app-notes/using-the-keil-microvision-debugger-with-the-ds89c4x0.html
One serial and one timer is used without extra parts on board.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4657
  • Country: us
BTW, I share your frustration.  I've got several 8051 series parts (including UV-eraseables and a bunch of 80552 chips) that "might be interesting" to get working and program, but it would be so much easier (if I'm mostly interested in the programming) to just get a more modern implementation.

I did design this cute little board, and had some made.  But it's been 9 years and I haven't fully built one, or gotten one running...  :-(

 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 6106
  • Country: nl
I have used and designed several boards for different 8051 based MCU's and wrote loads of software in assembler for them. Still have a couple of boards lying around that work, but am not tempted to start using them again, with so many better options available nowadays.

If the goal is to learn embedded programming in assembler, the AVR based MCU range is a better choice in my opinion. When the goal is to learn embedded programming in C, the ARM or Risc-V based MCU's are even better.

Even peripherals have been improved on and provide more functionality.

Apart from the 8051 based MCU's that have FLASH or build in UVEPROM, there is the fiddling with external memory, and to do something more meaningful there is the need to add external RAM. Even though still used, also to be found in the CV1800B used on the Milk-V duo, it is cheaper and easier to just get something like a blackpill to play with.

Offline mino-fm

  • Regular Contributor
  • *
  • Posts: 168
  • Country: de
I have used and designed several boards for different 8051 based MCU's and wrote loads of software in assembler for them. Still have a couple of boards lying around that work, but am not tempted to start using them again, with so many better options available nowadays.

... it is cheaper and easier to just get something like a blackpill to play with.

You are right and you are wrong.
Playing arround with old electronic stuff is not for the money but for my mind.:)
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 6106
  • Country: nl
I have used and designed several boards for different 8051 based MCU's and wrote loads of software in assembler for them. Still have a couple of boards lying around that work, but am not tempted to start using them again, with so many better options available nowadays.

... it is cheaper and easier to just get something like a blackpill to play with.

You are right and you are wrong.
Playing arround with old electronic stuff is not for the money but for my mind.:)

Sure it can be fun, but so is playing with new stuff that can be just as much a challenge.

I still have a bunch of new old stock Xilinx XC3042 FPGA's somewhere, that could be fun to play with, but compared to new FPGA's offer so little, that, for me, it is not worth the hassle. It is a bit like been there, done that.  :)

Offline MrWifiHifiTopic starter

  • Regular Contributor
  • *
  • Posts: 63
  • Country: sk
So as for some development and debugging with x48 and x51, I have such experience with it that it simply needs to be programmed and tested gradually. Last time I did one application with 8035 where I had an EPROM simulator for faster development. I wrote the code step by step and tested it. I was able to write a SW serial with a custom protocol. I tried the communication functionality with Arduino.
8035 had T0 as Rx and P2.7 as Tx, I partially copied the routines for receiving and sending the byte from HSE-49 and another multimeter where x48 was used, of course it still had to be adapted for the given protocol. Subsequently, I programmed the reception of the header, checksum calculation and modification of the header.
I have yet to test the device for the application, but if that is done I can provide the code and wiring diagram.

As for me, you can go crazy on those old microcontrollers, but you have to follow some principles when writing SW and also when working with HW.
As for modern microcontrollers, I agree that there are better debugging options out there. For example, I worked with the TMS320F28379D, where the program could be stepped and the variables could be monitored.

But for me, those old microcontrollers still have their charm.
 

Offline MrWifiHifiTopic starter

  • Regular Contributor
  • *
  • Posts: 63
  • Country: sk
As for some more code development for x48 and x51, I have seen quite a few simulators for x51 with the possibility of connecting some virtual HW, for example in the MCU 8051 IDE (unfortunately, it seems to be no longer developed). Was there or is there any IDE environment for working with x48? As far as I could see, it was mostly just some console debuggers.
 

Offline Rafiki

  • Regular Contributor
  • *
  • Posts: 59
  • Country: 00
Long time ago I developed some devices which uses different types of 8031/8751/80C52/special Intel chips with 8051core/special Philips teletext chips based on 8051 core... Usually we had InCircuit Emulators for that. Starting with MCS-51 (? big blue tower) and pods which you put into the uC socket instead of final 8xxx chip. These ICE pods where equipped with special processors versions which cost a lot when you damage one. But they allowed single stepping and register read out. I've still an ICE-5100 (?) from Intel somewhere in the store and some Hitex ICEs (AX/MX-51). It breaks my heart when I've to put it into trash. But I'm sure I never will use them again. Although the control software pretty sure would still run on one of my OS/2 machines in Win-OS2 (Win31) subsystem.

I've also PROMICE (?) adapter which can be used to download the program into RAM (EPROM emulator) when I had the need for program/debug more than one 8031 at the same time. That all worked quite well at that time. But nowadays I never would play with these old chips again as for me this would be such a big waste of time. Only wanted to point out here that of course such serial downloaders where available for 8051 at that time. But real developement needed an ICE.

IIRC Keil uVision (v5 or ?) had also included a 8051er simulator. If this would be of any use for you, maybe I find a copy of that.
 
The following users thanked this post: MrWifiHifi

Offline iMo

  • Super Contributor
  • ***
  • Posts: 6902
  • Country: li
Long time back I had big fun with the Dallas (then Maxim and now ADI) DS89C430/DS89C450 series of 8052 based MCUs. With max 33MHz clock, "1 cycle/instruction" (33MIPS), up to 64kB flash, serial/timers,  5V, DIL40 and flatpacks, etc. It possessed an onchip "rom bootloader" - flashing it simply via serial. Still in my collection somewhere.
Btw., I made some single precision fp math benchmarks (Keil/IAR) at that time against the atmega328p (Arduino) and DS was aprox half the performance clock2clock..

PS: below 2 boards from around 1990 I've found in my junkbox.. A rather exotic TESLA MHB8748 as a part of a "distributed data aquisition blah blah" (with ID7 so we had 8 of them) and a small 8031/805x SBC running I do not know what (forgotten, but something big as there is a 62256 and a 27C256 in the sockets).. and yes, I made them..  :D  :D
« Last Edit: January 23, 2026, 06:13:52 pm by iMo »
Readers discretion is advised..
 
The following users thanked this post: MrWifiHifi


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->