74ls190 used in a parking lot/car counter system, a little confused about what to do next

Thread Starter

Helo409

Joined Dec 11, 2014
2
Hello everyone.

We have a 3rd semester project to do.
It goes something like this:
Design a parking lot with 12 spots. When a car enters, the counter must count up and when one leaves, it must count down. Also, if the lot is at it's limit, the entry gate should remain closed even if a car approaches.

I have completed most of what the project asks for(with some help from the internet and my friends)-my Proteus ISIS schematic counts up and down. However our instructor brought to our attention the fact that when the lot is at it's limit, and another car approaches the gate, it must not make the counter count up from 12. She also said that it shouldn't count down from 00 i.e it shouldn't go from 00 to 99 (although practically there isn't much chance of that happening).

What do you guys think I should do? Is there some way I can wire the U/D of both 74ls190s so that they do not count up when the counter reaches 12 but they DO count down...?
I know that the E-pin stops the counting, but it stops it altogether. D: I need it to still count down at 12!!

Thanks in advance :)

 

Attachments

djsfantasi

Joined Apr 11, 2010
9,160
How are you going to differentiate if a car is exiting or entering? How many different ways can you stop a count from happening? The count enable input of the 74ls190 is one... There are others.
 

Thread Starter

Helo409

Joined Dec 11, 2014
2
Sorry, should have mentioned, there are two gates. One to enter, one to exit. About differentiating the enter/exit, we will position IR trasmitter/reciever systems that trip the switches. Either those or buttons under small cardboard plates which will trigger when a car is driven over them. When a car enters/exits, it will run over the STEP switch in both instances, but at one of the gates there will be something that will change the up/down switch. We're using small plastic toy cars for this.

Is it possible to do what I want using logic gates and (if needed) a logic toggle?
 

crutschow

Joined Mar 14, 2008
34,408
You detect the value of 12 at the counters and use that to bring the Count Enable (/CTEN) pins high and prevent any further counting up. But when it receives a down count from a car leaving, you need logic to then bring /CTEN low and allow it to count back down.
You can do that with simple logic gates and possibly a flip-flop.
I'll leave the design of that as a exercise to the reader.

You also need some additional logic from the two gate signals to generate the proper clock and up/down signals. You can do that from the two signals, you don't need any additional signal from the entry/exit to generate the up/down command.
Alternately you could use a 74192 decade (BCD) up/down counter with separate up and down clock inputs which would simplify the logic.
 
Last edited:
Top