Hi the momentary switch is just that. It is pressed and released immediately."the same momentary action" ... so, if switch pole 1 (SP1) is closed for 1 second, then 2 seconds after it was first pushed you want switch pole 2 (SP2) to close for 1 second? In other words, does "the same momentary action" mean being closed for the same length of time, no matter how long or short that time was? If so, then you're looking at a time delay circuit, like a shift register. Not a big design problem, but not as simple as a 555.
I' on the other hand, SP2 can be closed for a fixed amount of time no matter how variable the SP1 closure time is, that is easier.
Next, does the 2 second time delay start when SP1 closes (is pushed) or when it opens (is released)?
As you can see, the hardest part of joining two switches into one is settling down on the exact sequence of events. If, for example, you say that when someone pushes a SPST pushbutton switch and either holds it down or releases it immediately, the circuit makes a short pulse immediately on one wire, waits 2 seconds, and then makes a short pulse on a different wire - all of that can be done with a single CMOS hex inverter.
ak
Yes, if the switches are connected to a uC then no external circuitry is needed it can all be done in code.Couldn't you use pin 7 and SP1 as is, use pin 11 or 12 to sense the setting of the toggle switch, then perform whatever action you wanted for SP2 by using a 2-second software delay?
This would be OK, but I have absolutely no idea how to change the code. It is a program written in assembly language.Yes, if the switches are connected to a uC then no external circuitry is needed it can all be done in code.
If all you want to do is change a delay, please post the code. More than a few of us use or are able to use Assembly.This would be OK, but I have absolutely no idea how to change the code. It is a program written in assembly language.
Hi the code is attached, and the relevant parts of the circuit. Basically it was designed to operate as follows. The on board LCD display shows a reading taken by the system and it also shows the co-ordinate for this reading. On pressing the save switch the reading and co-ordinates are recorded to an EPROM. The co-ordinate is a column and row number. Assuming I am on column 1 and row 1 for the first reading, I would then press the + switch to change the row no. to 2, move to that position and press the save switch. This would continue up to row 20. I would then change the column no. to 2 and take readings in that column. As I am starting at position 20 on that column I would press the - switch after each reading to count back down to 1. All odd columns would be counting up and all even columns counting back down. My plan is to insert a toggle switch across the + and - buttons so I can select odd or even. I would then fit a double pole momentary push button in place of the save switch and save the reading and increment/decrement the counter at the same time. I would want there to be a 2 or 3 second delay between the reading being saved and the co-ordinate no. changing. I would probably also add an LED or buzzer to indicate the reading being taken. I hope this makes sense and hopefully someone can make sense of the code. It was originally written in TASM, but was converted to MPASM and currently compiles ok.If all you want to do is change a delay, please post the code. More than a few of us use or are able to use Assembly.
John
Hi very interested in this. Thank youHere's a variation on AK's circuit to give positive pulses :
View attachment 107894
R2 and R5 limit the gate input curents.
If you can't change the code and really need positive-going pulses, hardware changes present two options.
First, if you change to NOR gates (and change some connections) the outputs become positive-going. The tradeoff is that there are no hysteretic NOR gates, and that 2-second ramp could be a problem.
Second, changing to a CMOS hysteretic hex inverter (CD40106) gets you clean transitions and positive-going outputs, but the circuit requires additional components (four diodes and two resistors). However, you now get a controlled pulse width for the first pulse.
ak