PDA

View Full Version : MCE RC6 decode



sgufa
- 2nd July 2007, 19:01
Hi. Anyone has an example routine for decoding the ir signals from a Microsoft MCE remote? It's using M$/Philips RC6-6-32 protocol...
Please help me

jrt4fun
- 3rd July 2007, 09:50
Have a look here: www.picbasic.nl
Under Projects you will find this link: The TV-remote RC5/RC6 codes on a LCD

Bare in mind that the code is written in Proton picbasic!
I guess you will have to make some adjustments...

Regards,

sgufa
- 4th July 2007, 00:46
Already seen
I've also modified the code as follows:

Start:
LED_Green = OFF
ATXPWON = OFF
LED_Red = OFF
BD1 = 0
WHILE IR_Receiver = UIT
WEND
WHILE IR_Receiver = AAN AND BD1 < Glitch
iNC BD1
WEND
CommandOld = Command
SysteemOld = Systeem
LED_Green = ON
BD1 = 0
Command = 0
Systeem = 0
WHILE BD1 < 255 AND IR_Receiver = AAN
INC BD1
WEND
CodeRC5X = FALSE
CodeRC6 = FALSE
SELECT CASE BD1
CASE 25 TO 90 ;RC5X
CodeRC5X = TRUE
Command.6 = 1
DELAYUS 1280 ; 900 - 1700 (RC5X)
CASE > 90 ;RC6
CodeRC6 = TRUE
CASE ELSE ;RC5
DELAYUS 2180 ;1800 - 2600 (RC5)
END SELECT
GOSUB BitOphalen
LED_Toggle = Value
GOSUB BitOphalen
Systeem.7 = Value
GOSUB BitOphalen
Systeem.6 = Value
GOSUB BitOphalen
Systeem.5 = Value
GOSUB BitOphalen
Systeem.4 = Value
GOSUB BitOphalen
Systeem.3 = Value
GOSUB BitOphalen
Systeem.2 = Value
GOSUB BitOphalen
Systeem.1 = Value
GOSUB BitOphalen
Systeem.0 = Value
GOSUB BitOphalen
Command.7 = Value
GOSUB BitOphalen
Command.6 = Value
GOSUB BitOphalen
Command.5 = Value
GOSUB BitOphalen
Command.4 = Value
GOSUB BitOphalen
Command.3 = Value
GOSUB BitOphalen
Command.2 = Value
GOSUB BitOphalen
Command.1 = Value
GOSUB BitOphalen
Command.0 = Value

IF Systeem <> SysteemOld OR Command <> CommandOld OR CodeRC6 <> CodeRC6Old THEN
CLS
PRINT "RC6"
PRINT " Protocol"
DELAYMS 1000
CLS
PRINT "Sys:", DEC Systeem
PRINT AT 1, 9, BIN Systeem
PRINT AT 2, 1, "Com:", DEC Command
PRINT AT 2, 9, BIN Command
ENDIF
CodeRC6Old = CodeRC6
GOTO Start

(the rest of the script is the same as the original)


In this way I'm able to distinguish signals that come from different buttons but with following problems:

1) I must press the button 2 times because the first time the LCD displays me the same value for any button I press on my remote. 2nd time i can see different values for any different button.

2) I'm not sure if the values I see are exactly decodified, since I've not any reference about RC6 32BIT protocol (the script was for the 16 bit type)

P.S. I'm using microsoft MCE remote

Please any suggestions?