This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Need 8051 soup-to-nuts recommendation please

A few years ago, I inherited dozens of tubes of 8051 MCUs, specifically the Atmel AT89C51ED2-IM. I know they're old - and clearly tons of much better MCUs exist - but they'd be useful. (Plus, it just feels wrong discarding 100+ good chips.) 

Any suggestions what Keil (or other) product to use, which programming gizmo, and possibly a dev board? I'd like to spend as little as possible as this is hobby stuff.  8051 assembler or C is fine.

So far, I've found these but am uncertain if they'll work:

  • PK51 pro kit - might be too costly(?) --- is there a set up that just does 8051 cores?
  • Mikroe-1382 programmer --- backordered, less than $75
  • Mikroe-257 dev board --- in my price range of $25 :) ...

I understand that Arduino's can be used for the programmer / loader, but apparently the "C" type Atmel's I have need a more sophisticated programming device than the "S" types (or is that incorrect?)

Any assistance is greatly appreciated. thanks!

  • There are lots of new 8051's with modern debugging, compared to these parts you have. The ones you have might be worth a pretty penny on eBay and someone may desperately need them, but that's a guess. If you can sell them you can buy SILabs parts or Nuvoton, both if which have excellent development boards with real debugging and great C language support (as well as assembler).  My $0.02.

    If you want to start from scratch with your existing parts then look for simulator support or a monitor program.

    Lots of chip vendors have full licenses for the Keil tools for free, including, but not limited to, SILabs and Nuvoton. I personally hate the tools from Atmel and/or Microchip.

  • Seems like a pretty capable chip.  64k flash, EEPROM, and x2 mode (6clocks/cycle, rather  than 12.)  Arrived at Atmel via one of their acquisitions.  Maybe start here: https://sourceforge.net/projects/mcu8051ide/ (although I don't see 89c52ed as one of the explicitly supported chips.) (Note that wherever these came from, they're among the 8051 derivatives where the letters AFTER "89C51" are relevant to identifying the individual chip features.  Ie, these are NOT direct replacements for an Intel 80C51.)

    The usual recommendation for cheap development is SDCC (Small Device C Compiler) or assembly language.

    This device looks programmable via UART, but it IS different than the ISP protocols used for 89s52.  Theoretically, it's easier.  I don't know if there are tools that help, though.

  • This was a pretty good device many years ago with 64K of on-chip Flash. Here are some recommendations:

    • You could use our PK51 to generate code. The code size limit of the free evaluation version is just 2K.
    • You don't need a programmer to download your application to the on-chip Flash. You can do that via UART interface with the free FLIP tool. See:https://www.microchip.com/en-us/development-tool/flip. This tool can be set up as a download tool within our uVision IDE
    • Like most old 8051 devices, this chip does not have a debug interface. However, you could use our ISD51 (https://www.keil.com/c51/isd51.asp) to debug your application via UART.
    • Since this device is usually used without an external bus system (RAM/Flash), an evaluation board could be quite simple. This chip only needs a power supply and a crystal oscillator with two caps. You can then connect a USB to serial converter which outputs 3.3V or 5V signals rather than a RS232 signal levels. These are available on ebay for a few euro/dollar. Maybe you can find a breakout board with a PLCC44 socket to make it easier.
  • Thanks for the detailed reply, Hans.

    Just downloaded C51 --- at first glance, it looks good.

    However, I've been reading that the chip version "C" (AT89C51) I have cannot be programmed via the UART, whereas the at least the "S" types can be (AT89S52, etc.).  Do you know if that is correct?

    I am also unclear which programmer I'd need for that specific chip together with C51 (or PK51 eval.)  ... been digging but uncertain ... e.g. ULINK.

    Any suggestions?  (Again, since this is hobby-level, I'd like to keep it as inexpensive as possible.)

    These, btw, are DIP40's - and I've got all those goodies you mention, and then some, to set up that simple eval board. (ZIF Sockets are your friend :)

    thank you for your time,

    - Howard

  • Grant, selling them on Ebay's an interesting idea that hadn't occurred to me. All the varieties of 8051's I looked at there ranged from ~= 1.50USD to a whooping 18 USD. (I guess that seller needs to pay for their Shrink's visit. LOL).  Mine were discards from a machine-controller manufacturer - when they upgraded their MCU's, they just tossed 'em in the dumpster where a friend retrieved them. I guess if I try the Ebay thing, I'd better look and see what other sellable things I have in my shop to make the effort worth it. I can't imagine selling them for more than a couple of bucks each. That it might help someone else would be a good thing.

    I appreciate the leads on SILabs and Novoton - I will check them out and grab a few of the newer versions.

    (I too have issues with Microchip's tool chains :)

    Thanks for the reply!

    - Howard

  • Bill, thanks for the informative reply.

    yes, it does indeed seem capable - for driving simple displays, keypad input, motor/solenoid, PID, etc... I can think of tons of applications. (BTW, I still use Parallax's SX chip, which they obsoleted years ago. It's fast still and makes for a good hardware controller. Besides, I have a few hundred :)

    RE the AT89C51 in question:

    This device looks programmable via UART, but it IS different than the ISP protocols used for 89s52.  Theoretically, it's easier. 

    I really need to understand that. Where did you find the information?

    thanks again,

    - Howard

  • From the 89c51ed2 datasheet, section 24.6 "Bootloader architecture."
    (fixed) https://ww1.microchip.com/downloads/en/DeviceDoc/doc4235.pdf

  • I mentioned the eBay angle since there is such a huge supply chain issue right now and someone might be in desperate need. Having said that, the old parts like this are not affected as much, but they will still be rare probably.

    From that one Errata it looks like the keyword is FLIP. I would research that angle:

    https://www.google.com/search?q=AT89C51ED2-IM+FLIP

  • >However, I've been reading that the chip version "C" (AT89C51) I have cannot be programmed via the UART, 
    >whereas the at least the "S" types can be (AT89S52, etc.)

    An old AT89C51 cannot be programmed via serial interface, but in your initial question you mentioned the AT89C51ED2. Bill already gave you the link to the datasheet. In chapter 24.9.1 they mention the FLIP utility and I already gave you the download link in my first reply of this thread. On this page you also see that the AT89C51ED2 is on the compatibility list of FLIP.