×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Nut Counter!!! :)

Nut Counter!!! :)

Nut Counter!!! :)

(OP)
i am making a device which will be counting nuts (bolts) coming thorugh a optoreflector or an LED/LDR combination. and this would have to be connected to a parallel port. anyone here can help me understand how to send 1 and 0's to the computer parallel port to communicate and use the data in a program on the PC?

am sort of confused with what actually goes to the port when the circuit is broken (hypothetical circuit)

i would appreciate any help :)
thankyou

RE: Nut Counter!!! :)

PC parallel port does have a few bits that can be read in the printer status register. Just take whatever the number of bits you need to count your nuts, which may be defined as a leading edge plus a trailing edge (010.

Obviously the case of two or more nuts stick together must be considered.



RE: Nut Counter!!! :)

I just wrote a program that controls the Parallel port.  The command in QBasic is OUT Reg, Data and Data = INP (Reg).  In 8086 assembly it is OUT Port, Reg and IN Reg, Port.  Another freebee is that most parallel ports are located at either 378h (most common) and 278h.  Also, make sure you are using a bi-directional parallel port (PS/2, EPP or ECP).  The really old ports are output only (on the data bus).  However, if you cannot get a hold of a bi-directional, you can always use the 4 control bits as inputs to read in values.  Just a thought.

Hope this helps and keep us posted!!!

P.S. Make sure you do a search on Parallel Ports!!!!!

RE: Nut Counter!!! :)

You may find the address of the parallel port at 0x0000:0x0408  (LSB-MSB) Usually it is 0x378 as Melona wrote.

<nbucska@pcperipherals.com>

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources