Тёмный

Normally open push button switch turned into on or off flip flop circuit learning electronics 

electronzapdotcom
Подписаться 30 тыс.
Просмотров 4,7 тыс.
50% 1

Опубликовано:

 

28 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 18   
@mariouvalle45
@mariouvalle45 4 месяца назад
wow so impressive thanks for sharing your knowledge
@georgel.1776
@georgel.1776 2 года назад
You're the best
@LostInLeiden
@LostInLeiden Год назад
should still work the same with 7400 right? Mine doesn't 😞
@LostInLeiden
@LostInLeiden Год назад
the junction between my two not gates does not vary enough in voltage upon depressing the switch to trigger the change but I don't understand why, do you have an idea?
@hellmuth26
@hellmuth26 2 года назад
is it just me, or are those push buttons sometimes really finnicky at staying in the breadboard? a lot of the time the pop out which is really annoying.
@Electronzap
@Electronzap 2 года назад
They do jump out for a while. Then they stretch out the slots a little and stay in place a lot better. But smaller lead components may not connect as well in those slots. So I mostly just use certain pins for switches and/or dual inline package integrated circuits.
@themechatronicsguy9727
@themechatronicsguy9727 2 года назад
How do i retain the state memory after power loss?
@arthurfricchione8119
@arthurfricchione8119 2 года назад
Thanks for sharing. Very informative like all your videos. Great for a person like myself. Just a novice as far as electronics goes so your channel is very helpful. Thanks and stay safe and well Artie 👍
@alianwar128
@alianwar128 2 года назад
It looks like a latch circuit
@germaniorodio9585
@germaniorodio9585 Год назад
very good video but it doesn't work !!!
@Electronzap
@Electronzap Год назад
Sorry to hear!
@renaissanceman5847
@renaissanceman5847 11 месяцев назад
It works just fine... Ive tested it with a 7404, 74LS04, and even a 74HC540.. as long as you have two DIGITAL inverters. with the 74HC540 you can implement 4 on off latches. very compact.
@rishabshukla1532
@rishabshukla1532 2 года назад
I making a project in that i have three different modes so i want to control 3 modes by using push button . Singletape : mode 1 Double tap: mode 2 Triple tap: mode 3 This is my code: #define sw 5 //pin at push sw is connected #define SENSE A0 #include SoftwareSerial myserial(3, 4); // RX, TX int lastButtonState = HIGH; // the previous reading from the input pin unsigned long lastDebounceTime = 0; // the last time the output pin was toggled unsigned long debounceDelay = 50; // the debounce time; increase if the output flickers bool buttonState = HIGH; //saving state of the switch byte tapCounter; //for saving no. of times the switch is pressed int timediff; //for saving the time in between each press and release of the switch bool flag1, flag2; //just two variables long double presstime, releasetime; //for saving millis at press and millis at release void setup() { Serial.begin(9600); //for serial monitor myserial.begin(9600); pinMode(sw, INPUT_PULLUP); //setting pin 5 as input with internal pull up resistor pinMode(SENSE,INPUT); pinMode(2,OUTPUT); pinMode(LED_BUILTIN,OUTPUT); } void loop() { int reading = digitalRead(sw); if (reading != lastButtonState) { // reset the debouncing timer lastDebounceTime = millis(); } if ((millis() - lastDebounceTime) > debounceDelay) { if (reading != buttonState) { buttonState = reading; } } //Serial.println(buttonState); //when switch is pressed if (buttonState == 0 && flag2 == 0) { presstime = millis(); //time from millis fn will save to presstime variable flag1 = 0; flag2 = 1; tapCounter++; //tap counter will increase by 1 //delay(10); //for avoiding debouncing of the switch } //when sw is released if (buttonState == 1 && flag1 == 0) { releasetime = millis(); //time from millis fn will be saved to releasetime var flag1 = 1; flag2 = 0; timediff = releasetime - presstime; //here we find the time gap between press and release and stored to timediff var //Serial.println(timediff); //delay(10); } if ((millis() - presstime) > 400 && buttonState == 1) //wait for some time and if sw is in release position { if (tapCounter == 1) //if tap counter is 1 { if (timediff >= 400) //if time diff is larger than 400 then its a hold { Serial.println("Hold"); hold(); //fn to call when the button is hold } else //if timediff is less than 400 then its a single tap { Serial.println("single tap"); singleTap(); //fn to call when the button is single taped } } else if (tapCounter == 2 ) //if tapcounter is 2 { if (timediff >= 400) // if timediff is greater than 400 then its single tap and hold { Serial.println("single tap and hold"); tapAndHold(); //fn to call when the button is single tap and hold } else // if timediff is less than 400 then its just double tap { Serial.println("double tap"); doubleTap(); //fn to call when doubletap } } else if (tapCounter == 3) //if tapcounter is 3 //then its triple tap { Serial.println("triple tap"); tripleTap(); //fn to call when triple tap } else if (tapCounter == 4) //if tapcounter is 4 then its 4 tap { Serial.println("four tap"); fourTap();//fn to call when four tap } tapCounter = 0; } lastButtonState = reading; } void nolight() { } void singleTap() { } void doubleTap() { } void tripleTap() { } void fourTap() { } void hold() { } void tapAndHold() { } Pls help me out of this problem 🙏
@Electronzap
@Electronzap 2 года назад
Sorry but, I have no clue how to help you out with that.
@skirobotics
@skirobotics 2 года назад
Excellent. Thank you.
@germaniorodio9585
@germaniorodio9585 Год назад
very good video but it doesn't work !!!
@Electronzap
@Electronzap Год назад
Sorry to hear!
@sann2sh
@sann2sh 2 года назад
Thanks man
Далее
Meni yerga urdingda
00:20
Просмотров 375 тыс.
SR latch
12:58
Просмотров 1,9 млн
Get Started With FPGAs and Verilog in 13 Minutes!
13:30
How To Identify An Unmarked or Blown IC Chip
32:31
Просмотров 63 тыс.
The Two Transistor Latch
6:21
Просмотров 25 тыс.
How 3 Phase Power works: why 3 phases?
14:41
Просмотров 1,1 млн
10 awesome application of capacitors in circuits
29:01
Просмотров 402 тыс.
#1195 74HC74 Standby Current
6:07
Просмотров 5 тыс.