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.

[Solved] AND as logic switch?

Status
Not open for further replies.
Hi

Based on the logic table for AND gates, i should be able to use either as a simple digital switch. That is, say input 1 is running at 40khz, and input 2 is 1 Hz. Then, every second, our output should toggle between 0 for half a second, then 40kHz for half a second. Correct?
**broken link removed**

I'm not getting that in this falstad. What am i doing wrong?
https://tinyurl.com/y92bwo98

thx!
 
Your signals are 40 Hz (not kHz) and 1 Hz. The timing changes about every 25 ms, which seems about right.
 
40 Hz is 25 ms per cycle.

Just did an LTSpice simulation. Same result:

upload_2017-8-9_5-46-58.png




Note, since the logic is AND, when either input is off, the output is off. And as expected, when the 1 Hz is on, the output will switch on and off at 40 kHz. That is what you are seeing (I suspect), if you zoom in on your time scale.

John
 
Note, since the logic is AND, when either input is off, the output is off. And as expected, when the 1 Hz is on, the output will switch on and off at 40 kHz. That is what you are seeing (I suspect), if you zoom in on your time scale.

Not seeing that. Just seeing continuous oscillation at output.

Can you check this? I zoomed in.
https://tinyurl.com/y78psgqh

where does your sim go further to the right?

thx
 
Last edited:
You have to run your simulation longer. I ran your simulation and it switched from 40 kHz pulses to off and visa versa every 500 ms.

I only posted a snippet at the change from pulses to off. It repeats, if one runs the simulation longer.
 
Your simulation does exactly the same as mine did:

upload_2017-8-9_6-30-26.png


Why would you expect it to be any different?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top