Page 1 of 1

DTSP switch suggestion

Unread postPosted: Mon Oct 07, 2013 5:10 pm
by Russell
Please consider a DTSP switch or push button. "I found a 2 inch one on eBay as an arcade game replacement."
Could the software be modified so that the common terminal (CO) is connected to DB-9 pin 4 (DTR)
Normally open (NO) is connected to DB-9 pin 6 (DSR)
Normally closed (NC) is connected to DP-9 pin 8 (CTS)
Then it doesn't matter how much the switch bounces. It is always saying the same thing on a particular pin.
In one configuration push could be start and release could be stop.
In another configuration each push could toggle the start/stop state.
-
Note that DB-9 pin 4 (DTR) never changes state.
-
DB-9 pin 7 (RTS) could change states when the timer times out
-
A second button could be used for Snap. (Here one might want to enable skip contact bounce.)
The computer reads:
DB-9 pin 6 DSR
DB-9 pin 8 CTS
DB-9 pin 9 RI <- switch <- DB-9 pin 4 DTR (for snap)
Russell

Re: DTSP switch suggestion

Unread postPosted: Wed Oct 09, 2013 5:16 pm
by Stopwatch
Did you mean SPDT? What for? Contact bounces? It doesn't help.

Re: DTSP switch suggestion

Unread postPosted: Wed Oct 09, 2013 10:49 pm
by Russell
Thank-you, Stopwatch.
Yes, to both of your questions.
The skip bounce software delay option has to limit the reaction time and accuracy; in the case of very short durations.
Using electronic debounce; the program can read the switch and immediately look for the toggle without software delay.
The software would look in two different places rather than look for a toggle at a single place.
This option requires:
A SPDT switch.
A RS232 Receiver/Transmitter chip.
A Set/Reset latch chip.
A power source for the chips.
One thing that bothers me is the RS232 standard. The standard has levels of plus and minus 15v.
It seems that many RS232 devices, now-a-days, use 0v and +5 volts.
I would appreciate any suggestions about chips and how to implement them.
Russell

Re: DTSP switch suggestion

Unread postPosted: Fri Oct 11, 2013 1:02 pm
by Stopwatch
It's much easier to buy a finished debounced switch.