This is a circuit I made in an attempt to validate that the 20-pin microcontroller is an AT89Cx051. and the correct LED will turn on based on how much ram the chip has.

AT89Cx051 tester

While the first step is successful, the second step causes a reset. I don't know if I should blame the chip itself or if there is something I can do to improve my circuit, especially with the clock. I only need to advance the clock by one. Now I did add a 47nF capacitor across the clock button to try to avoid debouncing.

Here's How the circuit runs

  1. The NORM button (top left) is pressed so RST = 5V. This works.
  2. The first byte of data is verified through the 1st decoder (IC1E) so 1E_DETECT is zero. This works.

  3. I hold clock button down to make the clock a low to high transistion. Sad truth is contents of P1 do not change until I let go of the button (making XTAL high to low transistion which is contrary to what the datasheet indicates).

  4. Upon releasing the button, the circuit resets because the MSB at port 1 is a logic high.

Based on all datasheets I read for AT89C2051, AT89C4051, and AT89C1051, They (Atmel) indicate the data at 1st address (which is always detected correctly by my circuit) is 1Eh. Then they indicate the 2nd byte is 11h, 21h, or 41h depending on how much ram the chip has. Nowhere in their documents does it state that the MSB of P1 is set when reading signature bytes.

So what's the best course of action I should take here?

  1. Complain to the people I bought the IC's from that their chips don't work?

  2. Add/change/remove capacitors and/or resistors?

  3. Something else?

And in case anyone wondered, All diodes are 1N4148, and resistors for LED's are 1K, and power is 5 VDC regulated. and the diodes arranged in groups of three are 3-input nor gates and I used diodes because it would have been impossible to create a single-sided PCB if I used the actual logic gate chips themselves.


1 Answer 1


Arranging diodes that way doesn't give you a NOR gate. There is no way to create a NOR gate using only diodes, as diodes cannot invert a signal.

Diode logic can only be used to create AND or OR, and even then you need a pull-up/down resistor:


simulate this circuit – Schematic created using CircuitLab

  • \$\begingroup\$ I meant to say it works as a nor because its connected to an inverted input on the decoder. Isn't the pull-ups in the micro itself sufficient? \$\endgroup\$
    – user152879
    Jan 25, 2018 at 21:49
  • \$\begingroup\$ The pull-ups in the microcontroller only apply to its inputs (and even then, I'm not sure they'd be active during a programming cycle). 74HC parts, like the 74HC138s you're driving with these gates, have high-impedance inputs; their inputs will float if not driven or pulled. \$\endgroup\$
    – user39382
    Jan 25, 2018 at 21:53
  • \$\begingroup\$ I just added a 10K resistor network across P1 (so each bit P1.0 through P1.7 has an external 10K pull-up resistor added to it). I tested my circuit with two microcontrollers. One that previously worked and one I just got from ebay. Both returned the same data: 1Eh and FFh. The second byte should be 41h not FFh. \$\endgroup\$
    – user152879
    Jan 26, 2018 at 0:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy