Give Your Projects A Retro Tint With This 8051-based Arduino Uno

Most of us are familiar with the Arduino Uno, a starting place for electronics projects since 2010. But what if the Arduino Uno was released in 1980? You’d probably get something like [ElectroBoy]’s 8051-based Arduino Uno.

28-pin DIP integrated circuit with a window revealing the die
Close-up shot of the 87C752, an 8051 with EPROM

The Arduino Uno-compatible board has an MCS-51 (often called 8051 instead) instead of the usual ATmega328P/ATmega168. Specifically, [ElectroBoy] uses the AT89S52. Like the ATmega microcontrollers, the AT89S52 has an 8-bit CPU with a Harvard architecture and very similar GPIO capabilities. Unlike the ATmega, however, the original MCS-51 has a CISC CPU (as opposed to ATmega being RISC) and a release date about 36 years earlier.

The board itself also has some differences from the original Arduino Uno. First of all, it has a USB type-C port, which is definitely a bonus. Secondly, it’s simpler: No USB-UART (which also means no USB programming), a different pin layout (Arduino shields likely won’t fit) and more I/Os than the ATmegas have. Sure, it’s not as practical as an actual Arduino Uno, but it’s definitely cool for our retrocomputing nerds.

37 thoughts on “Give Your Projects A Retro Tint With This 8051-based Arduino Uno

  1. I’m confused:

    >”The Arduino Uno-compatible board …”

    >”No USB-UART (which also means no USB programming), a different pin layout (Arduino shields likely won’t fit) and more I/Os than the ATmegas have”

    How exactly is is arduino-compatible? The hallmark feature that makes arduino (usb plug-n-play) is missing, the form factor is different, and I’m not aware of any C++ compilers available for the 8051.

      1. I was just looking at the CH552 series microcontrollers, which are also MCS51 based, and the Arduino extension for it is apparently limited because there are no free C compiler (noted here: https://github.com/DeqingSun/ch55xduino)

        AFAICT, there are no unencumbered compilers for the MCS51 (I’d be happy to be proven wrong about that)

        Though to address the point at hand – I think “Arduino Uno” compatible may reference the form factor of the board, including pinout. Whether that’s meaningful for shields and libraries related to Arduino is the deeper question.

        1. Many years ago I used SDCC to develop code for several NRF24LE1-based products (that chip marries an 8051 core with the NRF24L01+ radio). I think SDCC is GPL licensed (except for some PIC header files). It is easy to use and I found it to put out good code and by the end of the projects I was turning out really performant and functional code with it (I spent a bit of time looking at the assembly it generated). I don’t think I ever found a bug. I just looked and it is still being supported and improved.

          The thing that I haven’t seen anyone discuss here is that the thing that makes a board an Arduino is the ability to build and program from the Arduino IDE and a set of libraries at least implementing the core Arduino functionality. This board has neither. I think someone could do that using SDCC but it would be a labor of love. Despite the quirky fun of the MCS51 architecture the world has moved on.

        2. Around the late ’80s there was Small-C which ran on a few 8-bit chips at time. Although I only used the 6502 (native on a BBC Microcomputer with 32KB!) compiler.

          Although with a little googling shows there was an SDCC (Small Device C Compiler) release supporting 8051. There sourceforge.net page is not responding for me, here’s the archive.org version:
          https://web.archive.org/web/20230128034654/https://sdcc.sourceforge.net/
          And wikipedia:
          https://en.wikipedia.org/wiki/Small_Device_C_Compiler

          And for reference the wikipedia Small-C page:
          https://en.wikipedia.org/wiki/Small-C

    1. It also doesn’t have many of the similar peripherals. The project itself simply says the vague shape is what ties it to Arduino, and reads a bit like an advert for a PCB fab.

      I’d prefer those big clunky PIC devboards with this 8051.

      Plenty of stuff to implement but you can’t deny it’s artistic fun seeing the clash of modern and old here.

    2. You know you can program the arduino from the serial port right? You absolutely do not need a usb port to program an arduino. You can use another arduono if you so desire. And while we generally use usb to access serial ports, serial predates the heck out of usb.

    3. Hi. The Arduino Uno uses a humble serial connection internally.

      There’s an USB to Serial converter on the board to make it look USB (one control pin triggers reset on the ATMega chip).

      On the software side, it’s just a classic COM port, though.

      So there’s nothing wrong to just use a real serial port straight away.

      Rather the contrary.
      A traditional RS-232 port on motherboard or PCI/PCIe expansion card has a true FiFo buffer and supports things like 5-Bit format.
      So frame issues won’t happen (an old issue with USB serial dongles).

      So if the voltage levels are correct (3.3v to 5v TTL), there’s no issue.

      The microcontroller mustn’t get +/- 12v on its RX pin or reset pin.

      Using a simple one transistor driver, opto-coupler or MAX232 can do it.
      Some people claim to have used an 7805 in series, even. Was in the 80s, I think.

      The other way round is not so critical (microcontroller transmitting to PC).
      A real RS-232 port can understand TTL levels, even if it’s a bit quick&dirty to rely on that.

  2. When I started my apprenticeship with 16, the AT89S52 was the first MCU I’ve written C for, that was in 2006.
    And just a couple of weeks ago I wrote some code to run on an Cypress FX2 that also has an 8051 core. RISC-V is being used more and more as a replacement for many of the use cases (e.g. cheap USB peripherals), however, I doubt the 8051 will be gone anytime soon. It is immortal by now.

  3. The only thing Arduino UNO about this is the shape of the base PCB.
    Connectors are all different (USB) and in different positions (POWER jack, I/O headers).
    Arduino UNO shields won’t work.
    Kind of like calling a VW bug a Lamborghini because they both have four wheels.

  4. FYI, The ATmega4414, 8515, and 162 have the same pinout, including most peripherals.

    I went the other way, starting with 8051, then moving onto AVRs and mostly stuck with the 8515. Though, 8051’s (and 8031’s) are so common, I’ve thought about going back to them for small/slow projects.

    Also, the 8051-series has a pin to bypass the internal ROM for an external one… which means even scavenged OTP 8051’s could be reused as though they’re 8031’s.

    And, yes, SDCC.

    1. Hi. I think it’s also possible to use a PS/2 or mini-DIN type connector here, which has similar dimensions to USB-B connector.
      We need to have 4 pins merely. GND, TXD, RXD, RESET.

      Alternatively, a 3 ring 3,5mm phono jack could be used.
      The 2 ring (stereo) version was being used by cheap electronic organizers (aka databases, PDAs) in the 90s, already.

      That’s when Windows 3.1x was being around, still. It predated USB, so serial connections were being used for all sorts of things (they could survive shorts).
      Parallel connections were more critical by contrast.

  5. As a newbie, one thing that I’ve tried is a Arduino Uno shield for 8051 programming. I’m kind happy that I could pull it of after one year learning electronics from almost zero (I’m only a software developer with more than 10 years of experience), but one bummer is that I couldn’t make it work as a “development board” (quotes because it depends on being attached to an Arduino as ISP) too… I guess the missing part is figuring out how to cut the ICSP communication between the ATMEGA and the AT89552 after the programming procedure.

  6. Interesting side note here, an awful lot of the original Intel 8031/8032 chips were actually factory programmed 805x chips.

    Putting them in a programmer capable of reading them would often yield code, one such device I found had MCS BASIC 1.0 instead of the far more common V1.1.

    1. One wierd thing about 8031 is that it has disadvantages of both Havard and Von Neumann. Like Havard, the data and code address spaces are seperated, can execute from data space and the can use same instructions for ro-data and rw-data requiring roundabout ways like tagged pointers. Like Von Neumann, both code and data is accessed over single bus, leading to bus congestion and data read-writes influencing instruction fetches.

      1. Did you mean “can’t” when referring to execution from data space and same pointer operations for both spaces?

        One think that was commonly done back in the 8051 days was to overlap the upper 32K address spaces into a single SRAM chip. This would let you execute code from RAM and was very useful for testing and development.

  7. How about AT89LP51RD2 ? It is pin compatible with AT89C51, has 64KB flash, 2.2KB sram, most instructions in 1 cycle, hardware multiply in 2 cycle, dedicated 16×16 multiply accumulate hardware, numerous peripherals both digital (TWI, enhanced USART, 7 8-bit PWM, N 16-bit PWM, all pin configurable as push-pull, open drain, quasi bidirectional) and analog (10-bit ADC/DAC, analog comparator). Has, self writing support and already has factory programmed serial bootloader. Can run at as low as 2.4V and as fast as 20MHz. And has higher performance than equivalent AVR uC.

  8. You can call the atari 2600 a microcontroller since the versions from the late 80s and early 90s used a single chip

    Just give it 5v, clock, color delay voltage, and 4k of rom, plenty of bankswich schemes to add RAM and extra rom

    Joystick ports provides is your gpio, paddles can be used for bit banged serial ports

    And built in graphics with s-video, though the single chip may only spit out composite iirc

    With a full 6502 instruction set

    Better compatibility than a noac

          1. Only problem is that your 6502 only runs at about 1 mhz

            You could do what I do and just build a full computer based around the chipset

            As a digital engineer, not an analog one

            Have a memory map and programming scheme that doesn’t give you an aneurysm.

            Use a real 6502, a 138 or 139 to generate a bunch of chip selects and some 74 glue logic and latches for builtin bankswitch

            Run an atmega to dma tia, 6502 needs tristating to do this, bus stuffing can also be exploited.

            128 bytes becomes zero page cache, because you’ll have 32-128k bankable, advantage of adding ay8910 or ay8930 with 16 bit gpio and get dat nes and c64 sound too along wit tia audio

            Rom still is 4k but you have ability to fuck with a12, a13,a14,a15 as flags, and writing and reading will actually now do things a 6507 cant

            2k and 4k roms should work natively because they should never need to access these areas, 8k and larger can simply be ported remove the bankswitch, write a loader, and just load the entire cartridge data or rom in ram, and just remap addresses to work

            With the atmega coprocessor, running at 21.47727mhz it’s own interrupts, uart, timers, and pipelining, 1 clock cycle = 1 instruction on average maybe 2 or 3 depending on Instruction. 18 times faster than the 6502, 6 time the tia clock (I use ntsc chips, best one with the largest color pallette)

            Can do audio, and graphics u never though a atari vcs can actually do

            Can even over clock the cpu thru a gate and soft switch, to get a 3.579545mhz cpu clock.

            Or try overclocking the tia, but need a cpld to spit out an rgb signal since hardware timing changes and tv looks retarded trying to read dat video signal

  9. Unlike the antic the atmega can also do memory operations and write to work ram, has its own eeprom and ram, with flash

    Store a bootloader, and some lookup tables in eeprom for tia

  10. Arduino uno has to be one of the worst pcb layouts for connector spacing, designed to be awkward. Never liked or used it. Arduino Nano for the win, and ESP8266 / ESP32 for anything needing wifi or more speed.

    remember using 87C752 dev kit from philips to learn microcontroller prorgramming with 2004 lcd. erasing eprom for code change not fun.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.