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.

Parallel Port... again!

Status
Not open for further replies.

Menticol

Active Member
Hi everyone!

I know it's already a thread about PP, but I'm having different troubles. I have made the newbie arrangement, diode, transistor, relay, load, and It's freaking me out:

Please:

1. Why does the PP fire random signals during system startup? There is some way to prevent that? (instead of disconnecting the port, ofcourse)

2. Can I receive signals through parallel port? According to almighty google yes, but it talks about complex circuits, I just want to know the state of a microswitch in my door

3. Why, if more than three "pins" are ON (I mean, firing 5V), the program goes lazy and cease to respond until I turn them off? Is this a programmer fault, or actually the PP has a limit of maximum "pins" active?

Thank you so much in advance!! My DIY proud is on the floor, and I don't want to switch to serial port yet
 
Last edited:
blueroomelectronics said:
Your printer port was designed for a printer. Your OS is probably looking for a plug and play printer while its booting.

Thank you for answering, by the way how could I make a circuit for filtering the signals, i.e. don't leting pass pulses of < 3 second of duration from the Parallel Port? (I know my lights will delay 3 seconds turning on, but is preferable)
 
Menticol said:
Hi everyone!
1. Why does the PP fire random signals during system startup? There is some way to prevent that? (instead of disconnecting the port, ofcourse)
Trigger a monostable from a high going P378 pin, use the end of the mono period to set a latch, the output of the latch provides an enable signal to AND gates driving your output circuits.

2. Can I receive signals through parallel port? According to almighty google yes, but it talks about complex circuits, I just want to know the state of a microswitch in my door
Yes

3. Why, if more than three "pins" are ON (I mean, firing 5V), the program goes lazy and cease to respond until I turn them off? Is this a programmer fault, or actually the PP has a limit of maximum "pins" active?
No the Port can drive ALL the output pins High at the same time, unless your port driver is faulty.
Thank you so much in advance!! My DIY proud is on the floor, and I don't want to switch to serial port yet

hi,
Down load this zip and unpack it, place the two DLL's in the Windows/System folder also get from the web the VB5 runtime files. [free]
Look thru the pics and text for a port description.

Run the parport.exe to test and exercise the parallel port.

Its recommended that you use 74LS06 or LS07 buffers between the port and the OSWD.

Do you follow OK.
 
Last edited:
Its Perfect!!! Thank you so much! Works great, and much more stable than the program I got. I just have 4 questions, If you have time

EDIT - I did some research (try and burn) and answered 2 answers - hope someone building the parallel port project could find them useful

1. What is a pull up resistor? Something like a ghost load? (The pins have internal pull up resistors)

unknown

2. According to the table, some pins have and active low signal, and others are inverted. What does that mean?

here is the answer
https://www.codeproject.com/KB/cs/csppleds.aspx?df=100&forumid=21021&exp=0&select=974134

3. There are 8 "IN" on the port. So, if I want to check the state (i.e.) a microswitch in the window, should I connect any of those pins in series with the microswitch, and then (I guess) any ground?

10 /Ack In
11 /Busy In
12 Paper In
13 Select In
14 /Auto In/Out
15 /Error In
16 Initialise In/Out
17 /Select Prn In/Out

yes! that's the way it works. Refer to the above link for more info

4. Why is necessary to get the buffer? Is not enough to simply connect the port through a diode, and a transistor, to drive the relay?

unknown


Thank you again!
 

Attachments

  • untitled.JPG
    untitled.JPG
    63 KB · Views: 209
Last edited:
Menticol said:
Its Perfect!!! Thank you so much! Works great, and much more stable than the program I got. I just have 4 questions, If you have time

EDIT - I did some research (try and burn) and answered 2 answers - hope someone building the parallel port project could find them useful

1. What is a pull up resistor? Something like a ghost load? (The pins have internal pull up resistors)
A pull up resistor is required in cases where the driver ic output pin is open collector, it has not got an internal resistor to Vss, a o/c pullup is about 220R thru 1K0 depending upon the application
Also pull up resistors are used on inputs to ic's in order to pull them to a 'good' logic high, about Vss, an input pullup can be typically from 1K0 thru 10K


In some cases the circuit may require a pull down resistor.


unknown

2. According to the table, some pins have and active low signal, and others are inverted. What does that mean?

here is the answer
https://www.codeproject.com/KB/cs/csppleds.aspx?df=100&forumid=21021&exp=0&select=974134

3. There are 8 "IN" on the port. So, if I want to check the state (i.e.) a microswitch in the window, should I connect any of those pins in series with the microswitch, and then (I guess) any ground?

10 /Ack In
11 /Busy In
12 Paper In
13 Select In
14 /Auto In/Out
15 /Error In
16 Initialise In/Out
17 /Select Prn In/Out

yes! that's the way it works. Refer to the above link for more info

4. Why is necessary to get the buffer? Is not enough to simply connect the port through a diode, and a transistor, to drive the relay?
The PC port drive capability vary from one PC to another, some can supply 12mA and others 20mA at about +3.5V
This is often not enough to drive an external input, so a transistor amplifier is used to supply a higher current to the external load, relay etc.

unknown


Thank you again!
hi,
To keep things simple, I would suggest initially you use the 'IN's' port pins, the IN/OUT pins require o/c drivers.

Ask if you require mored detail.?

Feel free to cut/paste and use my VB5 source code anyway you wish.
 
Last edited:
Sorry by bringing this old topic again, reciclyng is better than creating a new one.
The circuit is working great (thank you again Eric!), and now it's time to go further on the "PC Controlled Room".

Please:

1) Can the parallel port be interfaced to drive more than 8 devices?

2) I'm trying to measure room's temperature, and if higher than desired, turning on a fan. Offcourse, showing room temp. on PC screen would be great.

The existing solutions involves an LM35, comparator and a relay (No PC required), and a LM35's R232 interface to PC.

I would like to keep using the parallel, before buying adapters or older PC

My newbye knowedge states this:

The LM35 add +10 mV for each °C
If using a analog to digital converter...
Can this "mV value" be turned into binary, and then transmitted through any input line of the parallel? (Then VB makes the binary to base 10 conversion, and voilá!)

3) If you know about a good one, what R232 tutorial would you recommend for my application? (Plan B, If parallel port fails)

Thank you in advance!
 
Last edited:
1) Can the parallel port be interfaced to drive more than 8 devices?
You only need 3 pins to address 8 devices. 0-7 or 000- 111. Use a address decode chip like the 74xx138, and use a 4th pin as an enable.
 
Sorry by bringing this old topic again, reciclyng is better than creating a new one.
The circuit is working great (thank you again Eric!), and now it's time to go further on the "PC Controlled Room".

Please:

1) Can the parallel port be interfaced to drive more than 8 devices?
Yes, Some posters are using 100 devices.!

2) I'm trying to measure room's temperature, and if higher than desired, turning on a fan. Offcourse, showing room temp. on PC screen would be great.
LM35 into a MCP3320, thats a dual 12bit ADC, connected to the Paraport.

The existing solutions involves an LM35, comparator and a relay (No PC required), and a LM35's R232 interface to PC.

I would like to keep using the parallel, before buying adapters or older PC

My newbye knowedge states this:

The LM35 add +10 mV for each °C
If using a analog to digital converter...
Can this "mV value" be turned into binary, and then transmitted through any input line of the parallel? (Then VB makes the binary to base 10 conversion, and voilá!)
YES.
3) If you know about a good one, what R232 tutorial would you recommend for my application? (Plan B, If parallel port fails)
The PP port just fine for all you are doing.

Thank you in advance!


hi Menticol,

Pleased to hear its working.

If you use Visual Basic, I could post the VB basic code for the LM35 and MCP3302 ADC.
Its rough and ready but it works for my projects.
You could modify to suit your application.

I use my VB programs in a similar way to project boards, I cut and paste my code, depending upon what I am measuring..:rolleyes:

EDIT: attached screen shot.:)
 
Last edited:
hi,
Correcting a typo in my last post. Unable to edit the post.!!:(

MCP3320 should read MCP3202
 
Last edited:
You only need 3 pins to address 8 devices. 0-7 or 000- 111. Use a address decode chip like the 74xx138, and use a 4th pin as an enable.

Following that, I have found this schematic, clearer as water

**broken link removed**

My only question is, does the 74LS139 mantain its logical state even if the A B C D settings are changed? or do I need a flip flop circuit or something like that for each pin?

EDIT: attached screen shot

Graph included, very nice!! Im looking for MCP3202 datasheet right now
 
hi

The 74LS139 does not retain its output state, when the input address is changed.
Look at the HEF 4514 and HEF4515 for latched inputs and the HEF4043 and HEF4044 for latches.
 
Yes your right, the 138 is not latched. Thanks for pointing that out. Another part that would work is the 74HC237. It is the same as the 138 but with latches.
 
I've seen both 138 and 139 mentioned. Be sure you know the difference before you buy or hook up.
 
Latched inputs

Just to make sure, the HEF4515 says "with input latches". Does that mean that even if the input is changed, the state of my previously actioned output pins will be mantained?

My english is not very good, so here's an imaginary example:

A = high
B = high
C=low

result: O13 low

then:

A = low
B = low
C= high

result: O15 low and O13 KEEPS low, as previously

To get O13 high, put A=high B = high C= low again

Latches

I have checked the latches IC's, but they include a "ON" pin and a RESET pin. So I need 2 transistors, to actuate the ON and RESET for each pin. Is that correct? I find it too complex (30 transistors!!)

Thank you!!! And sorry if I'm shooting questions like a machine gun
 
I have not looked at the datasheet for the HEF part, but the 74HC/HCT237 part is simply the 138 part with a latch added. Here is verbage from the datasheet.

The 74HC/HCT237 are 3-to-8 line decoder/demultiplexers
with latches at the three address inputs (An). The “237”
essentially combines the 3-to-8 decoder function with a
3-bit storage latch. When the latch is enabled (LE = LOW),
the “237” acts as a 3-to-8 active LOW decoder. When the
latch enable (LE) goes from LOW-to-HIGH, the last data
present at the inputs before this transition, is stored in the
latches. Further address changes are ignored as long as
LE remains HIGH.
So tie your OE1 low, your OE0 high, use one pport pin as a write for the LE pin.
Sequence of events:
  • On pport output address
  • Assert latch En low --Keep address pins valid at this point.
  • deassert LE --make LE high
  • address is now saved :)

Here is a link to a TI part.
https://www.electro-tech-online.com/custompdfs/2008/06/cd74hct237.pdf

My only thinking is that my approach will waste 1 pin for the LE line. Maybe someone has a better solution. I will have to think on it a bit.

Eric, I never heard of HEF parts, is that like fast logic?
 
Last edited:
I think, if you use Extended pport mode, you can use a control port pin for LE, that way you still have 8 data pins.

**broken link removed**
 
hi menticol,
The 74HC237 only latches the input address, not the output state.
If a new address is applied to the input and the LE switched the addressed output will change.

All this means thats once latched the addressed output will not change until the next address is latched LE.
This would normally be used on a address 'bus' that was being shared by other ic's.
The LE would enable the 237 to hold the address.

If you look at the paraport diagram, you have 12 output lines.

Can you post a diagram showing exactly what you want to do with the logic.?

Might be able to suggest alternatives.:)
 
Last edited:
This would normally be used on a address 'bus' that was being shared by other ic's.
The LE would enable the 237 to hold the address.
I kinda thought that is what he wanted to do. If I am mistaken, my apologies.
Your right though, a block diagram or something would help.
 
I kinda thought that is what he wanted to do. If I am mistaken, my apologies.
Your right though, a block diagram or something would help.

hi Mikebits,
I think a drawing would help us both to figure out a solution.:)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top