| |
 |
|
|
Science Forum Index » Electronics - Basics Forum » connect simple button through rs-232
Page 1 of 1
|
| Author |
Message |
| jimmi |
Posted: Thu Feb 08, 2007 9:58 pm |
|
|
|
Guest
|
|
| Back to top |
|
| Lord Garth |
Posted: Thu Feb 08, 2007 11:06 pm |
|
|
|
Guest
|
"jimmi" <bare.xld@gmail.com> wrote in message
news:1170986286.610124.212350@s48g2000cws.googlegroups.com...
Since you have only one button, I'd connect it across an output like DTR on
pin
4 and input like DSR on pin 6. It won't swing +v to -v but as it should but
many devices, especially laptops, don't adhere to the standard.
The status register will be what you read for the button push.
Connector pin assignments
http://www.aggsoft.com/rs232-pinout-cable/serial-cable-connections.htm
Specific instructions from a similar box + software to ease the task
http://www.psy.vu.nl/download/menu/xml/eprime_howto_port_com.xml
com1 is at 3F8, its status register is + 4 ports from there or 3FC...Windows
generally make direct port manipulations difficult.
Another good place to visit is Jan Axelson's page, I'd recommend you buy
her book. |
|
|
| Back to top |
|
| Si Ballenger |
Posted: Sat Feb 10, 2007 1:40 pm |
|
|
|
Guest
|
On 8 Feb 2007 17:58:06 -0800, "jimmi" <bare.xld@gmail.com> wrote:
I've done something similar making a simple rotation counter. I
connected the RTS to a 10k resistor, then to the switch, and then
to then Rx pin. When ever the switch made contact, jibberish was
put in the serial port input buffer. My program checked the input
buffer on a periodic basis to see if anything was in the buffer.
If there was anything in the buffer, the switch had made conact.
If the buffer was empty, then no switch action. |
|
|
| Back to top |
|
| Guest |
Posted: Sun Feb 11, 2007 12:50 pm |
|
|
|
|
|
| Back to top |
|
| |
|
Page 1 of 1
All times are GMT - 5 Hours
The time now is Thu Jul 24, 2008 1:29 pm
|
|