newbie logic

Status
Not open for further replies.
jon_jon_phenomenon said:
hi i am designing a logic circuit and i want to make an output go from 0 to 1 to 0 at the press of a button

any ideas?

thanks

You mean you want to generate a short positive pulse in response to a button press?. There are a number of ways to do this, but essentially it's called a monostable circuit - a 555 can do it, as can various configurations of logic gates.
 
Debounce circuits were discussed in this forum some weeks ago. I suggest you search on "debounce" or search for my posts as I made a contribution.

Len
 
555 monostable

thanks for the replies

ok, a 555 monostable is getting closer,but i really want the input to change from 0 to 1 , so that it can only be activated once, instead of a push switch

any way of modifying the circuit in the attachment?

my apologies if i was a bit vague earlier
 

Attachments

  • 555.jpg
    26.9 KB · Views: 730
Re: 555 monostable


It's still just as vague :lol:

You said originally that you wanted 0-1-0, now you say 0-1.

Which is it?.
 
Re: logic

jon_jon_phenomenon said:
oops

i want the input to go from 0 to 1 (im using an SR latch for this)

the output from 0 to 1 to 0

hope its clearer now

No, I'm afraid not :lol:

At a guess, I'd presume you want a single button press to generate a short positive pulse, but only once - after been pressed once it won't work again (until reset in some way).

How about telling us exactly what you are trying to do?.
 
logic

ok

in the pic here , each time a button is pressed a led comes on.
the 1st press is green, 2nd - red , 3rd - green again, pressing them in any order should follow this pattern

however pressing a button more than once, causes the counter at the top to count another step, which could cause the 'other' led to turn on.. (both undesired)

so i need something to stop each button having any further effect after being pushed once
 

Attachments

  • count3a.jpg
    116.4 KB · Views: 694
logic

ive tried this way using an SR latch, (just on the 1st switch) and some gates

because when 1 led comes on , then the NOT Q outputs at B and C must be different

but theres a problem with the counter - after the button press , the logic at D stays at 1. thats why i wanted '0 to 1 to 0' to go in at D

any better?
 

Attachments

  • count9a.jpg
    112 KB · Views: 691
Re: logic


Yes, it makes sense now - but it didn't on it's own :lol:

As usual, I'm going to suggest a PIC to do it - a PIC 16F628, the switches, LED's and series resistors are all that's required. It would drastically reduce your component count and enable you to do anything you wanted with the buttons.
 
A PIC is a wonderful device :lol:

It's basically a complete computer on a single chip, you program it to do what you want - essentially becoming a custom chip for your design.

Have a look at the tutorials in my signature, they will give you some idea of what you can do with them.
 
have a look at state machines.

the best pace to start on a design like this is to draw a flow chart. and have a good look at wha tyou need and what parts of the circuit will be repeated.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…