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.

IR Remote Control Receiver Problem

Status
Not open for further replies.

g_shyam1682

Full Member level 4
Full Member level 4
Joined
Jan 11, 2010
Messages
204
Helped
53
Reputation
106
Reaction score
43
Trophy points
1,308
Location
Udaipur-Rajshan-India
Activity points
2,538
Hello friend

I have one IR Remote and TSOP1738 Receiver
I found that my remote transmit 32 to 34 pulse for any one key press

I have tried to decode that pulse, but i am not success
I have used AT89c2051 controller and Program write in C language

Anybody have any hint or idea or C language code
Please give me

Thanks in Advance

Ghanshyam
 

This programme is used for NEC IR decode.
Wish you good luck!
void NEC_decode_interrupt(void) interrupt IE0_VECTOR using 2
{

EX0 = 0;
ES = 0;
ET0 = 0;
TR0 = 0;
IR_Time_High = TH0;
IR_Time_Low = TL0;

IR_Time_Val = ((uint16)IR_Time_High)<<8|((uint16)IR_Time_Low);



IR_FallEdge_Cnt++;
if((IR_Time_Val < 0x3a2d)&&(IR_Time_Val > 0x3605)) {
IR_HeadRevd_Flag = 1;
//IR_Decode_Staute = Decoding;
IR_FallEdge_Cnt = 0;
}
else
{
if(IR_HeadRevd_Flag == 0)
{
IR_ReCode_Flag = 1;
}
}
if(IR_HeadRevd_Flag == 1) {
if(IR_FallEdge_Cnt <= 32)
{
if((IR_Time_Val > 0x800))
{
IR_Decode_Val <<= 1;
IR_Decode_Val |= 0x00000001;
}
else
{
IR_Decode_Val <<= 1;
IR_Decode_Val &= 0xfffffffe;
}

if(IR_FallEdge_Cnt == 32) {
IrFrame = (IRFRAME*)(&IR_Decode_Val);
if((IrFrame->add1|IrFrame->add2 == 0xff)&&(IrFrame->cmd1|IrFrame->cmd2 == 0xff))
{

TI = 0;
SBUF = 0xA5;
while(!TI);

TI = 0;
SBUF = IrFrame->add1;
while(!TI);
TI = 0;
SBUF = IrFrame->add2;
while(!TI);
TI = 0;
SBUF = IrFrame->cmd1;
while(!TI);
TI = 0;
SBUF = IrFrame->cmd2;
while(!TI);

TI = 0;
SBUF = 0x01;
while(!TI);

TI = 0;
SBUF = 0x5A;
while(!TI);

IR_HeadRevd_Flag = 0;

IR_FallEdge_Cnt = 0;

IR_Decode_Staute = Over;

Key_Statue = Down;
}
}
}
}

TH0 = 0x00;
TL0 = 0x00;
TR0 = 1;
EX0 = 1;
}
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top