Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

push button debouncing problem

Status
Not open for further replies.

mohmd10

Junior Member level 1
Joined
Jun 18, 2009
Messages
17
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,388
push button problem

hi all ,
I need a circuit to take the pulse o/p from the push button then make it accurate

.there is a distortion in the pulse although I use pull up resistor=10k and a capacitor 1nf

what should i do ?

thank you alot
 

Re: push button problem

mohmd10 said:
hi all ,
I need a circuit to take the pulse o/p from the push button then make it accurate

.there is a distortion in the pulse although I use pull up resistor=10k and a capacitor 1nf

what should i do ?

thank you alot
Hi!
You should to read the following document.
 

Re: push button problem

little help please!what is needed to be added to this code, so the switch to jump to a label and to maintain it,and at the next switching jumping to another and so on? to change the pattern of 2 blinking led's! something like this:

red on,off,green on, then switch to red on/off 2times greenon/off 2 times....

8 bit MCU PICBASIC PRO language....
 

Re: push button problem

eueuu said:
little help please!what is needed to be added to this code, so the switch to jump to a label and to maintain it,and at the next switching jumping to another and so on? to change the pattern of 2 blinking led's! something like this:

red on,off,green on, then switch to red on/off 2times greenon/off 2 times....

8 bit MCU PICBASIC PRO language....
Dear! You made a mistake when had asked here. This topic's wrong. Also you haven't downloaded the code.
 

Re: push button problem

allready done!
Code:
@ DEVICE PIC16F676
@ DEVICE INTRC_OSC_NOCLKOUT, MCLR_OFF 

cmcon = %111111
ansel = 0
trisA = %000001
portA = %000000
trisC = %000000
portC = %000000

buttonPIN var portA.0
buttonState var byte
buttonState = 0
countVar var byte
LED1 var portC.1
LED2 var portC.2
LED3 var portC.0


main:
if buttonPIN = 1 then
pause 5
if buttonState = 0 then
countVar = countVar + 1
if countVar > 1 then
countVar = 0
endif
buttonState = 1
endif
else
buttonState = 0
endif
gosub FLASHMODE
goto main

FLASHMODE:
branch countVar,[FLASH1,FLASH2]
return

FLASH2:
LOW LED3
HIGH LED1
PAUSE 100
LOW LED1
PAUSE 100
HIGH LED1
PAUSE 100
LOW  LED1
PAUSE 100
HIGH LED2
PAUSE 100
LOW LED2
PAUSE 100
HIGH LED2
PAUSE 100
LOW  LED2
return

FLASH1:
PAUSE 30
HIGH LED1
HIGH LED2
PAUSE 30
return

END
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top