Go Back   Home > Forums > Source & Line > Digital Source
Home Forums Rules Articles Store Gallery Blogs Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Digital Source Digital Players and Recorders: CD , SACD , Tape, Memory Card, etc.

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 15th May 2005, 04:23 PM   #1
nbcd is offline nbcd  Romania
diyAudio Member
 
Join Date: Apr 2003
Location: suceava
Default remote control 5

hy all , can someone tell me how to decode an Remote Control version 5 signal .I must use a PIC. What is the general ideea that must be used to solve this problem.
Thanks.
Best regards.
__________________
eugen
  Reply With Quote
Old 15th May 2005, 04:46 PM   #2
diyAudio Member
 
Join Date: Jan 2004
Location: Palmerston North
Send a message via ICQ to samborambo
you're better off using a small atmel avr instead of a pic since you can use bascom-avr, a basic compiler, to write the decoder. Pretty simple. everyone knows how to program in basic and there's even functions specificly for RC5.

literally, it'll take you five minutes to write the software and flash the avr.

google RC5 for more info.

Sam.
  Reply With Quote
Old 16th May 2005, 01:21 AM   #3
MCLL is offline MCLL  Hong Kong
diyAudio Member
 
MCLL's Avatar
 
Join Date: Dec 2002
Location: Hong Kong
Default Re: remote control 5

Quote:
Originally posted by nbcd
hy all , can someone tell me how to decode an Remote Control version 5 signal .I must use a PIC. What is the general ideea that must be used to solve this problem.
Thanks.
Best regards.

http://www.ustr.net/infrared/index.shtml
  Reply With Quote
Old 16th May 2005, 01:23 AM   #4
MCLL is offline MCLL  Hong Kong
diyAudio Member
 
MCLL's Avatar
 
Join Date: Dec 2002
Location: Hong Kong
Default Re: Re: remote control 5

Quote:
Originally posted by MCLL



http://www.ustr.net/infrared/index.shtml

And Here
http://www.asmfr.com/code.aspx?id=15195
  Reply With Quote
Old 16th May 2005, 09:24 PM   #5
diyAudio Member
 
Join Date: Jan 2004
Location: rouen
Send a message via ICQ to apolon34
here you can find an explanation about rc5:
http://kudelsko.free.fr/gradateur/rc5.htm

here's my implementation (in C)

void RC5Reception(void)
{
//Cette fonction va effectuer la réception rc5
//elle renseigne le code appareil et le code commande recu

unsigned char NbBits;

//On met les codes a zero
code = 0;
commande = 0;
repeat = 0;

//On attend que le signal passe a zero (IR a un)
while(!RC5_IN) {}

//Second bit de start
//on attend le prochain front
RC5WaitBit(!RC5_IN);
//On attend 1332uS, 3/4 bit
Delay1332US();

//on lit la répétition
if(RC5_IN) repeat = 1;
RC5WaitBit(!RC5_IN);
Delay1332US();

//on recoit les 5 bits du code
NbBits = 5;
while(NbBits)
{
//On décale a gauche
code = code << 1;

if(RC5_IN) code = code | 0b00000001;
RC5WaitBit(!RC5_IN);
Delay1332US();
NbBits--;
}

//Reception de la commande
NbBits = 6;
while(NbBits)
{
commande = commande <<1;

if(RC5_IN) commande = commande | 0b00000001;
RC5WaitBit(!RC5_IN);
Delay1332US();
NbBits--;
}

Delay1332US();
Delay1332US();
}

void RC5WaitBit(unsigned char code)
{
//cette fonction va permettre d'attendre le prochain front

unsigned char i,j;

//boucle, qui permet d'éviter de bloquer le pic en cas de mauvaise reception
for(i=0x2D; i!=0; i--)
{

//tempo
for(j=0x20;j!=0;j--) {}

//on vient lire le port IR
if(code == RC5_IN) return; //on a trouvé un changement de valeur
}
}

RC5_IN is RB0
the receiver (tsop1838) inverts the signal
the function is called by interrupt on falling edge
  Reply With Quote
Old 16th May 2005, 11:12 PM   #6
guido is offline guido  Netherlands
diyAudio Member
 
guido's Avatar
 
Join Date: Mar 2002
Location: diepe zuiden
Default Re: remote control 5

Quote:
Originally posted by nbcd
hy all , can someone tell me how to decode an Remote Control version 5 signal .I must use a PIC. What is the general ideea that must be used to solve this problem.
Thanks.
Best regards.
Apart from the general idea's. A good (better?) way is to use a state machine (programmed into the controller).

Click my webpage below It's assembly though, but for a pic.

I have some 'happy customers' using this
__________________
GuidoB
  Reply With Quote

Reply


Hide this!Advertise here!

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Remote volume control for existing remote? theAnonymous1 Parts 7 6th August 2007 08:22 AM
The remote control paratactic volume control audio-gd Solid State 33 7th June 2007 11:16 PM
remote control motorised control for volume pot/knob CharlesY Parts 0 25th July 2005 11:12 AM
Remote control nlinus Solid State 8 23rd February 2005 11:35 AM


New To Site? Need Help?

All times are GMT. The time now is 12:16 AM.

Page generated in 0.08504 seconds (78.01% PHP - 21.99% MySQL) with 10 queries

Copyright ©1999-2012 diyAudio