Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Johnson counter

Status
Not open for further replies.

Ybody

New Member
There is probably an extremely easy way of doing this that I am missing.

Using a 4017, I am able to verify my counting works by breadboarding some LEDs to the respective outputs.

I have a stopwatch that requires a low to start and another low to stop. Normal stopwatch, so if the low never goes high, it will still be timing. As it stands right now, once output 0 goes from high to low, the timing starts. It cycles through all the other LEDs and the stopwatch continues running. Go back through the cycle, LED 0 lights up and as it goes out, the timer stops timing. Say I want it to start on the dropout of LED 0 and stop on the dropout of LED 8...

Code:
|   4017   |
|__________|
0 1 2    8 9
|        |
|        |
R1       R1
|        |
LED      LED
|_*____*_|
     |
     |
     SW
     |
   Ground

Should I just pop 2 diodes in where the "*"s are or is there a better way of doing this? SW is the stopwatch connection to the start/stop button. This is my first shot at this, and after about a day and a half of 4017 and quad comparitor searching, mind mind is pretty much fried. TIA
 
Since LED is also a diode, you don't require any additional diodes. :)
 
Edited for stupid mistake :oops:
The best way of dealing with this (depending on what you want) is...
Use the LEDs as the 'OR' gate - move the resistor to further down the circuit
-- still loses about 2v across the LEDs

Better to use signal diodes (1N914 or similar) as the 'OR' gate then the LEDs can be omitted if required
-- only loses about 0.7v across diodes
 

Attachments

  • Stopwatch.gif
    Stopwatch.gif
    3.2 KB · Views: 645
Use the LEDs as the 'AND' gate

Two diodes, with their cathodes shorted will form "OR" gate not "AND" gate. :) The output will be logic 1 even if anode of any one diode is at logic 1. And thats the truth table of "OR" gate.
 
The two diodes can work as AND gate with reverse polarity, and pull-up resistor in common anode....
 
Dho !

Sorry guys --- you got me :!:

The diagram is correct :)
My waffle is wrong :oops:
Not thinking before I rattle my keyboard -- I meant 'OR' gate, honest :roll:
....................Original post corrected !
 
Sebi said:
The two diodes can work as AND gate with reverse polarity, and pull-up resistor in common anode....

Yeah ,thats true!
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top