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.

Help required in remote controller key delay/debouncing

Status
Not open for further replies.

Praful

Member level 3
Joined
Jul 3, 2005
Messages
54
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,665
I've made a project in which a relay can be operated through a IR remote
but one problem occurred is if we press and hold remote button a relay can toggles on to off to on to off to on to off
I want must function same as TV remote function off mean off and on means on it cant toggle
even a key pressed and hold it. It only operates again when we release the button and press it again to on.
So Please can any body tell me the solution for it I used a delay but also it toggles after a delayed time
The hardware, which I used, is At89c52 uC. and ke*il compiler and a program is in "C" language.
Example shown:--- :|
case 0xAC: onf1var--;
if(onf1var<=0)
{
ONF1ON=~ONF1ON;
putchar(digit[ONF1ON]); ONF1();
for(i=0;i<5500;i++);
}
break;

void ONF1(void)
{
if(ONF1ON)
{
ONF1LED=0;
}
if(!ONF1ON)
{
ONF1LED=1;
}
for(i=0;i<5500;i++);
 

the debouncing is quite simple.

just read the port on which the keypad is connected. give a little delay( using loop within a loop) and then read the port again and "logically and" the two readings and then proceed only if the anded result isn't equal to the "key release" result.
if u need i can upload the coding for u
 

Dear Afti_Khan,
Very thankful to you Please send your file or sugession.
Thanks
:!:
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top