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:
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:
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!
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:
WestfW said: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,
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.