Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Can I use this circuit instead of complex IC with high impedance output?

Status
Not open for further replies.

mik3ca

Member
I'm trying to create a simple circuit that would allow me to select which micro (w77e58 or at89C52) to program using jumpers and data input. Based on datasheets, the w77e58 use P3.0 through P3.3 to determine what programming operation happens. at89C52 does not.

The w77e58 also uses P3.0 to determine whether erase mode should be active or not while P3.1 through P3.3 should be logic low.

In the circuit, P3.0 through P3.3 are the top 4 connections on the microcontroller side and all have reverse-based diodes and pull-up resistors.

I use reverse based diodes because I only want high impedance input to those pins if the at89C52 is used (I don't think high impedance will destroy the chip?), but if the other chip is used then I want P3.0 controllable and P1.3 to P3.3 logic low.

In the schematic, DEV means device. If DEV = high then its a w77e58 device we want. Otherwise its at89C52. Feature is the actual erase option that controls P3.0

CIRCUIT.png

So if this schematic is OK to use, then for diodes, could I get away with 1N914/1N4148? and for resistors, could I get away with 100K or is that too high for either microcontroller to see as a logic high?
 
Why wouldn't you just connect the output of DEV directly to the uC? Those diodes and resistors aren't doing anything that the NAND gate isn't already doing.

Those MCU lines will never be in high impedance. They will always be either pulled high when DEV = LO or be pulled LO by the NAND when DEV IS HI. They will always equal the output of the NAND gate.
 
Ok, but what about current? Isn't current from the nand gate to the pins much higher than the 100K pull-up resistors? I mean if I hook the nand directly and I decide to program the at89c52 and it works then I'm awfully lucky because their datasheet doesn't tell me its safe to put those pins at a (strong) logic high or logic low. I just don't want to blow up something inside a chip.

My other idea is to eliminate pull-ups and replace diodes with resistors but then if I do that, and the at89c52 decides to output all lows on those pins during programming, and I set some nand outputs to high then I'd be wasting some current, but I'm not sure I'm ready to trust a direct connection from nand output to the micro.
 
Ok, but what about current? Isn't current from the nand gate to the pins much higher than the 100K pull-up resistors? I mean if I hook the nand directly and I decide to program the at89c52 and it works then I'm awfully lucky because their datasheet doesn't tell me its safe to put those pins at a (strong) logic high or logic low. I just don't want to blow up something inside a chip.

My other idea is to eliminate pull-ups and replace diodes with resistors but then if I do that, and the at89c52 decides to output all lows on those pins during programming, and I set some nand outputs to high then I'd be wasting some current, but I'm not sure I'm ready to trust a direct connection from nand output to the micro.

I don't know where you think all this extra drive current is going to come from. It's not like those inputs are small resistors to ground. They're high impedance MOS gates. They were designed to be driven by 5V and at 5V will have a tolerable amount of current pass through them.
 
Last edited:
Current.

Isn't it bad if I force a logic low or a logic high with no current limitations on port pins for a chip when it doesn't specify to use those port pins during programming? I mean if the port pins from the micro were in high-impedance mode then i wouldn't worry either and could drive them with what I want, but I'm trying to not burn the pins
 
Current.

Isn't it bad if I force a logic low or a logic high with no current limitations on port pins for a chip when it doesn't specify to use those port pins during programming? I mean if the port pins from the micro were in high-impedance mode then i wouldn't worry either and could drive them with what I want, but I'm trying to not burn the pins

If they're inputs it won't matter. It only matters if they're in a output mode. But if you're that worried about then place a series resistor between the NAND and the pin. It'll do the same thing and is simpler. But I still don't understand where you think all this excess current is going to come from.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top