Two LEDs one is on the other cannot be on.

ian field

Joined Oct 27, 2012
6,536
Well here's the alternative micro version (picaxe, arduino). Assuming said micro inputs have pull up resistors. Overkill? Maybe when you compare it to the Apollo computers.
View attachment 139489
Wouldn't be too hard to muck up the code so that both LEDs can be on at the same time.

A J/K master-slave flip flop might do it, but you have to scrutinise the truth tables on the data sheet to see how it responds to "illegal" input combinations.
 

MrChips

Joined Oct 2, 2009
34,872
A microcontroller solution is flawed. What happens when the two signals occur 1ns apart? Are the signals processed with equal priority?
What happens when the two signals occur simultaneously, less than 1ps apart?
 

spinnaker

Joined Oct 29, 2009
7,830
A microcontroller solution is flawed. What happens when the two signals occur 1ns apart? Are the signals processed with equal priority?
What happens when the two signals occur simultaneously, less than 1ps apart?

Its for model cars. What are the chances the of a 1 nanosecond difference? A picosecond??? TS needs only 1ms resolution. I am no model car racing expert but I think even that is a bit presumptuous that it will be that close. Even so 1 ms is a long time in the microcontroller world.
 

MrChips

Joined Oct 2, 2009
34,872
Its for model cars. What are the chances the of a 1 nanosecond difference? A picosecond??? TS needs only 1ms resolution. I am no model car racing expert but I think even that is a bit presumptuous that it will be that close. Even so 1 ms is a long time in the microcontroller world.
Murphy's Law. It doesn't matter what you don't care about but it will happen.

What I am referring to, on an MCU, one input is likely to have priority over another. Hence the system will always be biased to one input when the timing is tight.

In hardware, let us assume that all rise times, fall times, and delays are identical.
Now we have two flip-flops receiving clocks that are occurring at exactly the same time. Since there is set-up time on the D inputs, both flip-flops will change states. The set-up time on a 74F74 is 2ns. If the separation of the two clocks is greater than 2ns then the flip-flops will register the correct results.
 

GopherT

Joined Nov 23, 2012
8,009
maybe splitting hairs to you but what does a newbie look for? The "someSortOf2017" or the new and improved "someSortOf-2018"
 

Thread Starter

Beemakka

Joined Nov 16, 2017
15
The one on the left should always win in case of <1mSec difference.
I have built timers in the past with the help of a colleague who was a mecho-electronics wizz working in the oil industry on sea rigs. He used picaxe and told me that they oscillate so quickly from lane switch to the other one that a tie is impossible.
 

Thread Starter

Beemakka

Joined Nov 16, 2017
15
I have built timers in the past with the help of a colleague who was a mecho-electronics wizz working in the oil industry on sea rigs. He used picaxe and told me that they oscillate so quickly from lane switch to the other one that a tie is impossible.
we're talking 1000th of a sec here over 20 metres travelling at about 80kph
 

Thread Starter

Beemakka

Joined Nov 16, 2017
15
I'll be sure to put my car on the left when racing at your track!
Is that the left facing down the track or up? You won't know if I swap the switches. Can't see why the left should win each time anyway. That hasn't been my experience of doing this with hundreds of school kids over the past 15 years.
 

Thread Starter

Beemakka

Joined Nov 16, 2017
15
Is that the left facing down the track or up? You won't know if I swap the switches. Can't see why the left should win each time anyway. That hasn't been my experience of doing this with hundreds of school kids over the past 15 years.
Yikes! I love winning... but I think I love dinner more. I'll just have to take my chances in any ol' lane.
I'll take the track with the least dinner spilt on it!
 

Thread Starter

Beemakka

Joined Nov 16, 2017
15
maybe splitting hairs to you but what does a newbie look for? The "someSortOf2017" or the new and improved "someSortOf-2018"
Definitely splitting hairs. Since the times are used to sort the cars in order fastest to slowest and from there writing them into a draw for a two-life knockout competition, I can't see one msec making things too unfair. The initial timed run counts for nothing in our rules except place on a list. The main competition is all about the knockout.
 

Thread Starter

Beemakka

Joined Nov 16, 2017
15
Wouldn't be too hard to muck up the code so that both LEDs can be on at the same time.

A J/K master-slave flip flop might do it, but you have to scrutinise the truth tables on the data sheet to see how it responds to "illegal" input combinations.
Wouldn't be too hard to muck up the code so that both LEDs can be on at the same time.

A J/K master-slave flip flop might do it, but you have to scrutinise the truth tables on the data sheet to see how it responds to "illegal" input combinations.
Hi Philba,
Thanks for the attachment which I have just discovered. That is what I will aim at using. I will have to learn a little picaxe programming first. Hopefully a 70 yr old can do it :)
 
Top