I'm trying to make a programmer for the 8051 microcontroller IC's, specifically the AT89C2051. I saw a circuit online (the blowit programmer) in which the unused GPIO pins are left floating.

When the 8051 is in normal execution mode, the outputs are always high-impedance or grounded, and applying external ground never hurts the IC, but applying external VCC causes the IC to not operate correctly if I set a logic low on the same GPIO pin in software.

I checked the datasheet and it does not mention anything about the state of the pins that are not used when programming the IC.

I'm curious. For this IC or any other 8051 based IC, is it a problem if I ground all unused GPIO pins during programming?

I also think if I can do that, then a side benefit would be less noise, but then again I'm not sure if that benefit applies because each GPIO pin has an internal pull-up resistor.

  • \$\begingroup\$ Those use a high (\$12\:\text{V}\$) programming voltage. The datasheet, from page 4-20 through 4-22, tells you what to do. As far as the remaining pins, do NOT do anything with them. They should float. If you aren't instructed to ground a pin, then don't. The default is to assume N/C (no connection) unless stated otherwise. (Do note that P1 may operate in either direction, input or output, depending on what you are doing at the time.) \$\endgroup\$
    – jonk
    Commented Jun 15, 2019 at 5:48
  • \$\begingroup\$ Wow, it's been a while since I saw the AT89C2051 being used in a new design, which isn't so surprising considering that its new price is pretty steep, because it's basically only used where someone has a verified design and needs the original, >25 years old microcontroller. Are you sure you want to go through cost and effort to work with this microcontroller? There's significantly cheaper, yet better, MCUs available, and there's cheaper, yet better, programming and debugging hardware for them. \$\endgroup\$ Commented Jun 15, 2019 at 6:41
  • 1
    \$\begingroup\$ @MarcusMüller I got tubes of them "back in the day." (I hadn't known at the time how many I might need.) I used for them for a push-button "Jeopardy" game allowing up to 8 game players in once case and a cheap hobbyist power supply supporting both constant voltage and constant current modes in another case. I have many left over. I might use them in a new project where I had existing useful code floating about that I could "borrow" to push along another project. (Given that the new price is steep, perhaps I should go market the stupid things. They were very cheap when I bought them.) \$\endgroup\$
    – jonk
    Commented Jun 15, 2019 at 6:54
  • \$\begingroup\$ nice! Yeah, "steep" isn't the right word – they're still about 1 US peso each, but cheapo 8-bitters come at half that. I also think it's worthwhile having a bunch of "I know exactly how to program these to fulfill an easy job" MCUs lying around, for whenever you need something that does something after something pushed some button or so. \$\endgroup\$ Commented Jun 15, 2019 at 6:59
  • 1
    \$\begingroup\$ @MarcusMüller Well, crap. That's about what I paid for the darned things. Yup, lots of MCUs are cheaper and I use them today: PIC10(L)F322 for example. But you get a lot of pins for USD1. Thanks for the link. I will take down my "sell" page now. (hehe.) \$\endgroup\$
    – jonk
    Commented Jun 15, 2019 at 7:08

1 Answer 1


I strongly suggest that you take the antique AT89C2051's to the trash can and then head over to www.silabs.com and take a close look at their 8051 clone lineup. These parts are way better and you can get USB programming pods for about 20 bucks which is way better than you can do trying to hack your own. Another huge benefit is that the same USB pod can be used to interface with the full debug support built into each chip that allows run/stop operation, data and code breakpoints, viewing registers memory and peripheral registers.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.