View Full Version : Output stays high
ozzieB
- 9th January 2010, 11:30
Hi,
I am working on a program with 3 switches and 3 LED's.
Every switch is connected to 1 LED.
what i want, is that when i push Switch1, LED1 must go on but when i release the button LED1 must stay high until i pressed Switch2 again.
can someone help me?
Acetronics2
- 9th January 2010, 12:05
Hi, Ozzie
This is a pure logic question ... but your problem is not clearly enough explained : no " cooked " solution available with so little detail given ...
so, you could have a look here :
http://karnaugh.shuriksoft.com/
this would help you to write
Led1 = Button1 + ? ....
Led2 = Button2 + ? ...
Led3 = Button 3 ...
Now you also can try to do it the " hard way " using some SELECT CASE statement ... lazy boy solution !!!
looks some school homework , no ???
Alain
ozzieB
- 9th January 2010, 12:53
Hi, Ozzie
This is a pure logic question ... but your problem is not clearly enough explained : no " cooked " solution available with so little detail given ...
so, you could have a look here :
http://karnaugh.shuriksoft.com/
this would help you to write
Led1 = Button1 + ? ....
Led2 = Button2 + ? ...
Led3 = Button 3 ...
Now you also can try to do it the " hard way " using some SELECT CASE statement ... lazy boy solution !!!
looks some school homework , no ???
Alain
yess it is for a project at school, well i will try to explain what i want..
basicly it is:
if button1 is pressed once LED1 must go on and stay on until button 2 is pressed
if button 2 is pressed once LED1 must go of and LED2 must go on until button 3 is pressed
if button 3 is pre......
thanks
Acetronics2
- 9th January 2010, 13:37
May I state it's YOUR exercise to define what has to be done for wich input combination ...
AND we're supposed to help for programming the PIC application ...
In short words :
The logics problem is yours ... not ours to solve.
Alain
Powered by vBulletin® Version 4.1.7 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.