gargamel011
Newbie
- Joined
- Sep 10, 2006
- Messages
- 5
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Location
- Belgrade, Serbia
- Activity points
- 1,326
I have problem with my project. The schematic is presented in attachment.
This electronic circuit is for 5-digit seven segment displays (made from LED).
Selecting the digit that should be changed is made by pressing SET push button
and the digit that is selected start blinking. Then using UP&DOWN push buttons
set up right number on selected digit and again press SET to move to another digit,
when all 5 digits are set 6 press of SET button set selected number on display.
Since I've didn't (as you can see on schematic) put any debounce filter on RB0-RB2
PUSH BUTTON pins I've used software debounce routine in mikroBasic, waiting 20mS.
Now my problem is I have to use 5m cable to connect push buttons
to this PCB and when everything is powered up it start working OK
but after few days when I press SET button it runs over two, three
digits like in debouncing and when I want to set number with UP or DOWN
button it's almost impossible to get (stop on) the right number.
Does any one have idea what can I do to solve this problem.
Thanks in advance.
This electronic circuit is for 5-digit seven segment displays (made from LED).
Selecting the digit that should be changed is made by pressing SET push button
and the digit that is selected start blinking. Then using UP&DOWN push buttons
set up right number on selected digit and again press SET to move to another digit,
when all 5 digits are set 6 press of SET button set selected number on display.
Since I've didn't (as you can see on schematic) put any debounce filter on RB0-RB2
PUSH BUTTON pins I've used software debounce routine in mikroBasic, waiting 20mS.
Code:
if (Button (PORTB,1,20,0)) then
Inc (digit)
while (RB1_bit <> 1)
if (digit > 11) then
digit=0
end if
cifre_array[n-1] = digit
wend
end if
Now my problem is I have to use 5m cable to connect push buttons
to this PCB and when everything is powered up it start working OK
but after few days when I press SET button it runs over two, three
digits like in debouncing and when I want to set number with UP or DOWN
button it's almost impossible to get (stop on) the right number.
Does any one have idea what can I do to solve this problem.
Thanks in advance.