EEVblog Electronics Community Forum
A Free & Open Forum For Electronics Enthusiasts & Professionals
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
This topic
This board
Entire forum
Google
Bing
Home
Help
Search
About us
Links
Login
Register
EEVblog Electronics Community Forum
»
Electronics
»
Beginners
»
Binary counter troubles
« previous
next »
Print
Search
Pages: [
1
]
Go Down
Author
Topic: Binary counter troubles (Read 2320 times)
0 Members and 1 Guest are viewing this topic.
MechEng87
Contributor
Posts: 15
Country:
Binary counter troubles
«
on:
October 01, 2016, 01:23:08 am »
Hello everyone, I am new here and love the forum and the eev blog YouTube channels. I am working on a project for a counter that has me troubled. I am using g a 74ls163 binary counter and I am trying to get it to stop could time g at 9 and reset. I have done some looking online e and tried everything I can think of to get it to reset after 9 instead of counting all the way up to 15 then going g back to 0. I hope this isn't too basic a query but if anyone can help I'd appreciate it. I am working on building a light gate timer for velocity measurements.
Logged
ataradov
Super Contributor
Posts: 11782
Country:
Re: Binary counter troubles
«
Reply #1 on:
October 01, 2016, 01:47:27 am »
9 is 0b1001 (8421), so your stop signal is: (1 & 8 ) & ~(2 | 4). You can obviously rewrite this into whatever logic gates you have at hand. In this case you need 2 AND gates and one NOR gate.
Logged
Alex
MechEng87
Contributor
Posts: 15
Country:
Re: Binary counter troubles
«
Reply #2 on:
October 01, 2016, 01:58:35 am »
Ok, that's kind of were I was headed but so far nothing is working the way I expect. I tried putting a diode and gate with Qa and Qd as the inputs that would reset the timer on the next clock cycle but no luck. Is a diode AND gate appropriate? I'm using all 5 volt logic levels.
Logged
ataradov
Super Contributor
Posts: 11782
Country:
Re: Binary counter troubles
«
Reply #3 on:
October 01, 2016, 02:01:41 am »
You can make AND gate out of diodes, but AND gate alone is not enough here. And it is obviously better to use real gates for a real project.
Logged
Alex
KerryW
Regular Contributor
Posts: 112
Country:
Re: Binary counter troubles
«
Reply #4 on:
October 01, 2016, 03:38:29 am »
Actually, if you just NAND Q0 & Q3, you would get a Reset pulse at 9, 11, 13 and 15, but since it would reset to 0 at a count of 9 it wouldn't matter.
Logged
One accurate measurement is worth a thousand expert opinions
- Adm. Grace Hopper
ataradov
Super Contributor
Posts: 11782
Country:
Re: Binary counter troubles
«
Reply #5 on:
October 01, 2016, 03:53:53 am »
Quote from: KerryW on October 01, 2016, 03:38:29 am
Actually, if you just NAND Q0 & Q3
Good point. In that case diode AND should work just fine.
Logged
Alex
danadak
Super Contributor
Posts: 1875
Country:
Reactor Operator SSN-583, Retired EE
Re: Binary counter troubles
«
Reply #6 on:
October 01, 2016, 09:48:50 am »
Do you have a race condition or not meeting PW for the reset signal ?
A scope can help here, and look at datasheet to create a timing diagram to
see if you are not meeting chip timing.
Regards, Dana.
Logged
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
MechEng87
Contributor
Posts: 15
Country:
Re: Binary counter troubles
«
Reply #7 on:
October 01, 2016, 04:36:45 pm »
Got it! Thanks for everyone's help, I used an AND gate on q0 and Qd then fed it through an inverter and it works perfectly. I will just use a NAND gate as KerryW suggested. Thanks again everyone. I will post pics of it when I get the rest of the circuit going
Logged
Print
Search
Pages: [
1
]
Go Up
« previous
next »
Share me
Smf
EEVblog Electronics Community Forum
»
Electronics
»
Beginners
»
Binary counter troubles
There was an error while thanking
Thanking...
EEVblog Main Site
EEVblog on Youtube
EEVblog on Twitter
EEVblog on Facebook
EEVblog on Odysee