Archived

This topic is now archived and is closed to further replies.

Cosmic Ray detetctor needs data sent through parallel port

This topic is 5500 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, my school is building a cosmic ray detector and I have been volenteered to created a program to send it some patterns through the Parellel port. What we need is different patterns sent on different pins... something like this

time---------------------------------------->
pin 0 0-1-0-1-0-1-0-1-0-1-0-1-0-1-0-1-0-1-0-
pin 1 1-1-0-0-1-1-0-0-1-1-0-0-1-1-0-0-1-1-0-
pin 2 1-1-0-1-1-0-1-1-0-1-1-0-1-1-0-1-1-0-1-
pin 3 0-0-1-0-0-1-0-0-1-0-0-1-0-0-1-0-0-1-0-

 
not neccessaraly these exact patterns but some simmilar. when you use the code:
_oput(PARELLEL_PORT, 0xff);
 
what exactly does this do? does it set every one of the 8 pins to 1? does it send 8 one''s to the first pin? what does it doi exactly (per pin)? thanx for the help! tazzel3d ~ dwiel

Share this post


Link to post
Share on other sites
Basically each pin represents a bit in the number you send, although IIRC you need to do something special to enable all 8 pins for input (I think only the first 5 work by default) and one of them is hardware inverted, so you need to xor with some number to make it come out right.

Nevermind that, I was thinking of reading data from it.


[edited by - smart_idiot on November 18, 2002 10:36:50 PM]

Share this post


Link to post
Share on other sites
No, I think you''re right. Even on input some of the pins are inverted, so will need to take that into consideration. Easiest way to sort these things out usually is just to connect an LED to each pin ''n see what happens with outputting all 0''s and then all 1''s.

BTW, what''s a cosmic ray detector? Why sorta patterns are you outputting to it? Stepper motor controller (sorta what the pattern looks like)...

Share this post


Link to post
Share on other sites
Thanx for the answers... I got the program running now, but I thought i''d let you know that I don''t even know *exactly* what it is... I do know that I am sending 4 bits per ''send'' and they are going to some PMT bases.... sabout all I know ... that and my physics grade is basically a sure- A... even though we started the trimester on onay lol...

sorry I can''t tell ya more.

tazzel3d ~ dwiel

Share this post


Link to post
Share on other sites