|
Grex > Science > #76: Tips on Serial Port Programming for a Geiger Counter? | |
|
| Author |
Message |
mvpel
|
|
Tips on Serial Port Programming for a Geiger Counter?
|
Dec 9 02:30 UTC 2001 |
I have a geiger counter that I'd like to hook up to the PGP random number
generator that uses the keystroke interval input as the random seed, except
replacing geiger clicks for keystrokes.
What I think this will require is asserting DTR on the serial port connected
to the geiger counter, and then translating a RI signal into a blip for the
PGP code in the place of a keystroke.
Does anyone have experience with serial port programming who can offer
suggestions or sample code? I've tinkered with a few things but can't seem
to get the expected results, even with an americium source saturating the tube
of the counter.
|
| 3 responses total. |
gull
|
|
response 1 of 3:
|
Dec 10 16:20 UTC 2001 |
If you're doing this on a *nix system, you might look for simple UPS
daemons for your OS that have source code available. There are a few
available for Linux, for examle. They have good examples of serial
port bit-twiddling, since most inexpensive UPS's signal by closing
contacts connected to some of the serial port lines.
|
mvpel
|
|
response 2 of 3:
|
Dec 17 21:23 UTC 2001 |
Thanks for the suggestion, I'll check it out. Do you happen to know if the
RI generates an alarm condition that can be handled with a poll() call?
|
gull
|
|
response 3 of 3:
|
Dec 18 01:32 UTC 2001 |
I don't know, sorry.
|