PDA

View Full Version : IR Codes for Toshiba Remote



Russell
08-17-2005, 09:15 AM
I have been playing with the IR Buddy and can get it to read codes from a Magnavox remote control for a TV.· I need to get it to read the codes from a Toshiba remote control for a TV.· It looks like the Magnavox remote uses RC5 codes and the product number inside the battery area starts with RC.· The Toshiba remote doesn't seem to use RC5 codes and the product number on the remote is DC-SB1.

It looks like my situation is similar to Humlan who asked about IR codes on 8/11/05.· I looked at the responses and link suggested in the replies but they aren't applying to this Toshiba remote.

Any ideas?

allanlane5
08-17-2005, 09:54 PM
You can't use the IR-Buddy with any remote that doesn't implement the RC-5 protocol. The Phillips RC-5 protocol is the one the RC-buddy uses. If you can't convince the Toshiba remote to output RC-5, then you can't use it with the IR-Buddy.

So, alternatives:

1. You can try to record, using an IR-Decoder chip (like the SSIR module) what the Toshiba protocol is. Then, maybe you can generate that protocol using FREQOUT commands to an IR-LED.

2. Convince the Toshiba to output RC-5.

3. Quit using the Toshiba remote, and get a cheap "multi-remote" from Radio Shack, and use that.

Larry~
08-18-2005, 12:59 AM
IR Stuff

I have some code for Ir remotes it was written for a Pic chip in basic and could give you some ideas what to do using pulsin command,·By testng each bit and using debug you should be able to read most remotes using a radio shack ir detector ( metal can type 40 khz·).



1st program

DEFINE OSC 10

TRISB= %01000000

TOTAL VAR BYTE

LEADER VAR WORD

VALUE VAR WORD

A VAR BYTE(16)



PAUSE 500

SEROUT2 PORTB.3, $4054,[254,1]

PAUSE 100

SEROUT2 PORTB.3, $4054,[" IR CODE READER"]

PAUSE 2000

MAIN:

PULSIN PORTB.1, 0, LEADER

IF (LEADER < 310) THEN MAIN

IF (LEADER > 320) THEN MAIN

PULSIN PORTB.1, 0, A(0)

PULSIN PORTB.1, 0, A(1)

PULSIN PORTB.1, 0, A(2)

PULSIN PORTB.1, 0, A(3)

PULSIN PORTB.1, 0, A(4)

PULSIN PORTB.1, 0, A(5)

PULSIN PORTB.1, 0, A(6)

PULSIN PORTB.1, 0, A(7)

PULSIN PORTB.1, 0, A(8)

PULSIN PORTB.1, 0, A(9)

PULSIN PORTB.1, 0, A(10)

PULSIN PORTB.1, 0, A(11)

'PULSIN PORTB.1, 0, A(12)

'PULSIN PORTB.1, 0, A(13)

'PULSIN PORTB.1, 0, A(14)

'PULSIN PORTB.1, 0, A(15)

FOR TOTAL = 0 TO 11

IF A(TOTAL) > 150 THEN ONE

IF A(TOTAL) < 130 THEN ZERO

SEROUT2 PORTB.3,$4054,[254,1]

SEROUT2 PORTB.3,$4054,["A",DEC TOTAL,DEC A(TOTAL)]

PAUSE 2000

ONE:

A(TOTAL) = 1

GOTO ENDD

ZERO:

A(TOTAL) = 0

ENDD:

NEXT

VALUE1:

VALUE.BIT0 = A(0)

VALUE.BIT1 = A(1)

VALUE.BIT2 = A(2)

VALUE.BIT3 = A(3)

VALUE.BIT4 = A(4)

VALUE.BIT5 = A(5)

VALUE.BIT6 = A(6)

VALUE.BIT7 = A(7)

VALUE.BIT8 = A(8)

VALUE.BIT9 = A(9)

VALUE.BIT10 = A(10)

VALUE.BIT11 = A(11)

VALUE.BIT12 = 0 'A(12)

VALUE.BIT13 = 0 'A(13)

VALUE.BIT14 = 0 'A(14)

VALUE.BIT15 = 0 'A(15)

DISPLAY:

SEROUT2 PORTB.3,$4054,[254,1]

SEROUT2 PORTB.3,$4054,[" ",DEC VALUE]

SEROUT2 PORTB.3,$4054,[254,192]

SEROUT2 PORTB.3,$4054,[BIN VALUE]

PAUSE 2000

IF VALUE = 4074 THEN VALUE = 1

IF VALUE = 4042 THEN VALUE = 2

IF VALUE = 4010 THEN VALUE = 3

IF VALUE = 3978 THEN VALUE = 4

IF VALUE = 3946 THEN VALUE = 5

IF VALUE = 3914 THEN VALUE = 6

IF VALUE = 3882 THEN VALUE = 7

IF VALUE = 3850 THEN VALUE = 8

IF VALUE = 3818 THEN VALUE = 9

IF VALUE = 3786 THEN VALUE = 0

SEROUT2 PORTB.3,$4054,[254,1]

SEROUT2 PORTB.3,$4054,[" BUTTON # ",DEC VALUE]

LEADER = 0

VALUE = 0

PAUSE 500

DONE: GOTO MAIN



2nd program

·

' IR3 PROGRAM

' JAN_14_2001

' LARRY GAMINDE LGAMINDE@TELEVAR.COM

'

' THIS IR RECEIVE PROGRAM WAS WRITTEN FOR UNKNOWN TYPE OF TV IR TRANSMITTER (LIVING ROOM TV)

' 1. IT USES 24 BITS OF DATA AND HAS A START_BIT AND LEADER_BIT

' 2. IT USES THE HIGH SIGNAL FOR BIT DATA

' 3. START_BIT IS 6mS TO 7mS LONG

' 4. LEADER_BIT IS 3mS TO 4mS LONG

' 5. HIGH_BIT IS 2mS LONG

' 6. LOW_BIT IS 1mS LONG

DEFINE OSC 10

TRISB= %01000000

STARTBIT VAR WORD

TOTAL VAR BYTE

LEADER VAR WORD

VALUE VAR WORD

A VAR BYTE(16)

N VAR WORD

PAUSE 500

SEROUT2 PORTB.3, $4054,[254,1]

PAUSE 100

SEROUT2 PORTB.3, $4054,[" IR CODE READER"]

PAUSE 2000

MAIN:

pulsin portb.1,1,startbit

if startbit < 935 then main

if startbit > 956 then main

PULSIN PORTB.1, 1, LEADER

IF (LEADER < 449) THEN MAIN

IF (LEADER > 462) THEN MAIN

PULSIN PORTB.1, 1, N

PULSIN PORTB.1, 1, N

PULSIN PORTB.1, 1, N

PULSIN PORTB.1, 1, N

PULSIN PORTB.1, 1, N

PULSIN PORTB.1, 1, N

PULSIN PORTB.1, 1, N

PULSIN PORTB.1, 1, N

A(15) = N /2

PULSIN PORTB.1, 1, N

A(14) = N / 2

PULSIN PORTB.1, 1, N

A(13) = N / 2

PULSIN PORTB.1, 1, N

A(12) = N / 2

PULSIN PORTB.1, 1, N

A(11) = N / 2

PULSIN PORTB.1, 1, N

A(10) = N / 2

PULSIN PORTB.1, 1, N

A(9) = N / 2

PULSIN PORTB.1, 1, N

A(8) = N / 2

PULSIN PORTB.1, 1, N

A(7) = N / 2

PULSIN PORTB.1, 1, N

A(6) = N / 2

PULSIN PORTB.1, 1, N

A(5) = N / 2

PULSIN PORTB.1, 1, N

A(4) = N / 2

PULSIN PORTB.1, 1, N

A(3) = N / 2

PULSIN PORTB.1, 1, N

A(2) = N / 2

PULSIN PORTB.1, 1, N

A(1) = N / 2

PULSIN PORTB.1, 1, N

A(0) = N / 2

FOR TOTAL = 0 TO 15

IF A(TOTAL) > 210 THEN ONE

IF A(TOTAL) < 210 THEN ZERO

ONE:

A(TOTAL) = 1

GOTO endd

ZERO:

A(TOTAL) = 0

ENDD:

NEXT

VALUE1:

VALUE.BIT0 = A(0)

VALUE.BIT1 = A(1)

VALUE.BIT2 = A(2)

VALUE.BIT3 = A(3)

VALUE.BIT4 = A(4)

VALUE.BIT5 = A(5)

VALUE.BIT6 = A(6)

VALUE.BIT7 = A(7)

VALUE.BIT8 = A(8)

VALUE.BIT9 = A(9)

VALUE.BIT10 = A(10)

VALUE.BIT11 = A(11)

VALUE.BIT12 = A(12)

VALUE.BIT13 = A(13)

VALUE.BIT14 = A(14)

VALUE.BIT15 = A(15)

DISPLAY:

SEROUT2 PORTB.3,$4054,[254,1]

SEROUT2 PORTB.3,$4054,[" ",DEC VALUE]

SEROUT2 PORTB.3,$4054,[254,192]

SEROUT2 PORTB.3,$4054,[BIN VALUE]

'IF VALUE = 4074 THEN VALUE = 1

'IF VALUE = 4042 THEN VALUE = 2

'IF VALUE = 4010 THEN VALUE = 3

'IF VALUE = 3978 THEN VALUE = 4

'IF VALUE = 3946 THEN VALUE = 5

'IF VALUE = 3914 THEN VALUE = 6

'IF VALUE = 3882 THEN VALUE = 7

'IF VALUE = 3850 THEN VALUE = 8

'IF VALUE = 3818 THEN VALUE = 9

'IF VALUE = 3786 THEN VALUE = 0

'SEROUT2 PORTB.3,$4054,[254,1]

'SEROUT2 PORTB.3,$4054,[" BUTTON # ",DEC VALUE]

LEADER = 0

VALUE = 0

PAUSE 500

DONE: GOTO MAIN