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.

Help on input-output circuit

Status
Not open for further replies.
Wait a minute.
The absolute max continuous output current of a 74HC04 is 25mA and it works as an inverter with a supply voltage down to only 2.0V.
But it certainly won't have an output current of 25mA when its supply voltage is low, maybe just one mA.
 
Well, I have to look for another IC then.

I thought about MOSFET drivers, but those I got will only operate down to 4.5V (TC4424).

If anyone got a suggestion for an IC, please post a reply :wink:
 
Ok, I'll do that.

I want to take a digital signal from the LPT port from a PC, and "convert" it to a digital signal used to communicate with a PIC microcontroller during programming.
The LPT port output voltage can vary depending on the PC as mentioned earlier. That's why I use a NPN transistor to interface the LPT port.

Now, the PIC can be programmed at 5V and verified at 2V, that's why I need both 5V and 2V. Actually, it would be nice to be able to use 6V also, to verify the PIC at MAX Vdd, but it's not a great demand.

Also, the PIC is programmed In Circuit, so I need an output that can drive approx. 25mA since the programming pins on the PIC could be connected to other things at the target board during programming. The PIC can sink/source 25mA, and then I want the programmer to be able to do the same.

The easy way out, could be to leave the programming pins unconnected, or use jumpers on the target board (and use the 74HC04), but it would be nice to be able to avoid this.

I hope this cleared some things up.
 
Futterama said:
Ok, I'll do that.

I want to take a digital signal from the LPT port from a PC, and "convert" it to a digital signal used to communicate with a PIC microcontroller during programming.
The LPT port output voltage can vary depending on the PC as mentioned earlier. That's why I use a NPN transistor to interface the LPT port.

No disrespect, but the output from a PC parallel port is a 5V logic signal - that's ALL you need to know, don't worry about anything else. So the first part of your worry is completely irrelevent!.

Now, the PIC can be programmed at 5V and verified at 2V, that's why I need both 5V and 2V. Actually, it would be nice to be able to use 6V also, to verify the PIC at MAX Vdd, but it's not a great demand.

Also, the PIC is programmed In Circuit, so I need an output that can drive approx. 25mA since the programming pins on the PIC could be connected to other things at the target board during programming. The PIC can sink/source 25mA, and then I want the programmer to be able to do the same.

The easy way out, could be to leave the programming pins unconnected, or use jumpers on the target board (and use the 74HC04), but it would be nice to be able to avoid this.

I hope this cleared some things up.

There are already plenty of PIC programmers out there, and I consider it EXTREMELY foolish to try and drive the external circuits from the PIC programmer, either don't use those pins, or isolate them in some way.
 
Nigel Goodwin said:
No disrespect, but the output from a PC parallel port is a 5V logic signal - that's ALL you need to know, don't worry about anything else. So the first part of your worry is completely irrelevent!.
Nigel, if you actually measure the voltage, you will notice that the voltage will go down as low as 3V - especially on laptops, so I think this is an important thing to consider. I would be uncomfortable making a programmer board that won't work on a laptop.
And when the data and clock is 2V, the supply of the IC (74HC04) is 2V and then the signals from the LPT port will be too high for the IC's inputs.

The other issue - well, I'll just use jumpers to connect/disconnect the external circuit during programming.

Regards,
Futterama
 
Ok, I'll do that.

I want to take a digital signal from the LPT port from a PC, and "convert" it to a digital signal used to communicate with a PIC microcontroller during programming.
The LPT port output voltage can vary depending on the PC as mentioned earlier. That's why I use a NPN transistor to interface the LPT port.
The circuits that have been posted (including the ones that audioguru made a couple of huge red X's on) are not necessary, and I think they should only be for audio only applications.

Futterama said:
if you actually measure the voltage, you will notice that the voltage will go down as low as 3V - especially on laptops, so I think this is an important thing to consider. I would be uncomfortable making a programmer board that won't work on a laptop.
And when the data and clock is 2V, the supply of the IC (74HC04) is 2V and then the signals from the LPT port will be too high for the IC's inputs.

The other issue - well, I'll just use jumpers to connect/disconnect the external circuit during programming.

Regards,
Futterama
maybe you can use one unused pin of the parallel port as the VCC if the internal resistance is low enough.

I doubt that an IC will screw up if an input pin is connected to a voltage higher than the VCC voltage, unless any voltage is above 6V. Cmos (4xxx series) can go up to at least 15V.

Have you considered using batteries? connect VCC and ground to the batteries, and make them your primary voltage source for your circuit.
use the LPT port as your secondary source.
 
Futterama said:
Nigel, if you actually measure the voltage, you will notice that the voltage will go down as low as 3V - especially on laptops, so I think this is an important thing to consider. I would be uncomfortable making a programmer board that won't work on a laptop.
And when the data and clock is 2V, the supply of the IC (74HC04) is 2V and then the signals from the LPT port will be too high for the IC's inputs.

You're worrying without any reason, there are a great many PIC programmers (and other port connected devices), and I've NEVER seen one, or heard of one, doing such a thing. The ports are TTL/CMOS compatible, and that's ALL you need to worry about.

Bear in mind, the parallel port is intended to be connected to a printer! - do you think printers mess about with different voltages?. The parallel port is TTL compatible (even though it may be CMOS), and that's ALL you need to know.

So it's not at all important to consider, and you are probably the first person I've ever heard of even mentioning it?.
 
mstechca said:
I doubt that an IC will screw up if an input pin is connected to a voltage higher than the VCC voltage, unless any voltage is above 6V. Cmos (4xxx series) can go up to at least 15V.
Read about the inputs of CD4xxx ordinary and 74HCxx high speed Cmos ICs.
They will instantly blow-out their input resistor and protection diode if you apply an input voltage higher than a little above their supply voltage UNLESS YOU LIMIT THE CURRENT WITH A SERIES RESISTOR!
Even if it operates from only a 3V supply, applying an input voltage of more than about 3.8V or 4.0V will break its input. The negative max input voltage is a diode drop below ground.
Their absolute max input current rating is only 10mA.
 
Nigel, if I left out the transistor, and connected the 74HC04 to the LPT port through a 10K resistor, you believe it will work on all PC's? I can try it out - I could just leave the space for the transistor on my prototype board, and if it doesn't work on all PC's, I could just add the transisitors.
Or perhaps a weak pullup resistor will do since I've heard that the parallel port sinks current better than it sources.
The 10K resistor (10K or less perhaps) is definitely needed when the supply of the IC will be 2V to limit the current.

Regards,
Futterama
 
Futterama said:
Nigel, if I left out the transistor, and connected the 74HC04 to the LPT port through a 10K resistor, you believe it will work on all PC's? I can try it out - I could just leave the space for the transistor on my prototype board, and if it doesn't work on all PC's, I could just add the transisitors.
Or perhaps a weak pullup resistor will do since I've heard that the parallel port sinks current better than it sources.
The 10K resistor (10K or less perhaps) is definitely needed when the supply of the IC will be 2V to limit the current.

Try examing the great number of existing parallel port programmers, they generally use open collector buffers, and pullup resistors to pull the lines high.

But again, you are worrying without reason, the parallel port is CMOS/TTL compatible, and that's ALL you need to really know. Do you think printers take special precautions with complicated interfaces?.

Generally NOTHING works on all PC's, you'll always find one that has a really perculiar port, but it's nothing to do with voltage levels.
 
if I left out the transistor, and connected the 74HC04 to the LPT port through a 10K resistor, you believe it will work on all PC's?
depends on the software, and the ports the PC has.

I can try it out - I could just leave the space for the transistor on my prototype board, and if it doesn't work on all PC's, I could just add the transisitors.
why do you need transistors? what you are doing is completely digital, and digital can mix with digital.

what I recommend is that you use external pull-up resistors (about 4.7K) connected to each data pin you use, and then you can connect the data pins to your circuit any way you want (provided you don't short something).
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top