|
|||||||
| Home | Forums | Rules | Articles | Store | Gallery | Blogs | Register | Donations | FAQ | Calendar | Search | Today's Posts | Mark Forums Read | Search |
| 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 |
|
![]() |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
diyAudio Member
Join Date: Apr 2003
Location: suceava
|
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 |
|
|
|
#2 |
|
diyAudio Member
|
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. |
|
|
|
#3 | |
|
diyAudio Member
Join Date: Dec 2002
Location: Hong Kong
|
Quote:
http://www.ustr.net/infrared/index.shtml |
|
|
|
|
#4 | |
|
diyAudio Member
Join Date: Dec 2002
Location: Hong Kong
|
Quote:
And Here http://www.asmfr.com/code.aspx?id=15195 |
|
|
|
|
#5 |
|
diyAudio Member
|
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 |
|
|
|
#6 | |
|
diyAudio Member
Join Date: Mar 2002
Location: diepe zuiden
|
Quote:
Click my webpage below It's assembly though, but for a pic. I have some 'happy customers' using this
__________________
GuidoB |
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
|
|
|
|
||||
| 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? |
| Page generated in 0.08504 seconds (78.01% PHP - 21.99% MySQL) with 10 queries |