Determining InfraRed (IR) device codes

slimplynth

Senior Member
Hello everybody

I have a Daewoo DE televsion, searched the web for the Remote Control IR device codes (R-54B02) but the ones I found failed to produce any telly box changes.

Using Hippy's brilliant IR guide, cheers for that :cool:.
http://http://www.hippy.freeserve.co.uk/picaxeir.htm#Bit_Banged_Decoding

I set about trying use one of my 08M's to determine the correct codes...

Code:
'This program cycles through all 32 infrared device codes. 
'For all device codes, ten identical pulses are transmitted for the 128 IR function codes 
  
Symbol IRDEVICECODE = b0 ' create a variable name that holds the Infrared device code value
Symbol IRCODE = b1 ' create a variable name that holds the SIRC function code value
 
main:

Pause 5000 ' Wait 5 seconds before transmission starts
IRDEVICECODE = 0
IRCODE = 0
For IRDEVICECODE = 0 to 31 ' loop through the possible 31 IR device codes
		
	For IRCODE = 0 to 127 ' nested loop for cycling IR command		
		Infraout IRDEVICECODE,IRCODE 
		pause 45 '45mS pauses between pulses this simulates a button being held down on a TV remote 
		infraout IRDEVICECODE, IRCODE 
		pause 45 
		infraout IRDEVICECODE, IRCODE 
		pause 45 
		infraout IRDEVICECODE, IRCODE 
		pause 45 
		infraout IRDEVICECODE, IRCODE 
		pause 45 
		infraout IRDEVICECODE, IRCODE 
		pause 45 
		infraout IRDEVICECODE, IRCODE
		pause 45 
		infraout IRDEVICECODE, IRCODE 
		pause 45 
		infraout IRDEVICECODE, IRCODE 
		pause 45 
		infraout IRDEVICECODE, IRCODE 
		pause 100 '
		
             debug IRCODE

	Next IRCODE
 
Debug IRDEVICECODE
	
Next IRDEVICECODE

End
also used is Hippy's 'Pulsin' IR detector program, which is currently running on my axe090's 18X, The axe090 is sitting next to my Tellybox close to the IR detector, The signal is reaching the tellybox because the LED is flashing as expected.

Once the device code is determined, detailing of the function codes can begin, assuming my code/approach is correct

I'm only writing this thread because the cycling through of the device and function codes is taking forever, currently on device code 27. Could have narrowed the IRCODE for..next loop range but slow and steady wins the race vs. my potentially fatal lack of patience... :D

Assuming that it does work, I'm sure other newbies like me will appreciate the explanation. Alternatively, an it's starting to look and fel like it won't work, I'd really appreciate some help:D... anyone any ideas where I might be going wrong? Was thinking the 45ms pauses between pulses might need shortening?

mmm After writing all this I now wonder if the Daewoo is using the SIRCS protocol at all? hehe - no matter if it's not. Not a complete waste of time, may have learned again how not to do something - as is often the case :)

Regards

Slimplynth
 

slimplynth

Senior Member
bummer, it didn't work. What I was really looking for was a thread that contained a link to a free download for a PC basd oscilloscope to anaylse IR signals, can't for the life of me remember what it was called.. so had a go at the above effort.
 

sedeap

Senior Member
Daewoo protocol

Hi:

i've found this, and maybe it will be useful to you.

Sound like Daewoo uses their own protocol for IR remotes...

/daewoo.htm

:eek:

Pc Oscilloscope Software

Try this

Salu2 (Regards)
 
Last edited:

slimplynth

Senior Member
Daewoo - reinventing the wheel

many thanks for that - why couldn't I have had that final thought about Daewoo using their own protocol before id started this arvo hehe typical but not surprising i guess, seeing as they did make some satelites once upon a time :D
 

slimplynth

Senior Member
Daewoo'd and confused

so had my television been a SIRCS compatible one ... a Sony for example :p my code would have worked?
 

sedeap

Senior Member
PC Oscilloscope

Well... The more you live the more you learn...

Some pc sound card, can be used as Oscilloscope inbound...

Here, the software for that use.

Or This One Same use different Brand

Many other softwares available... just google it...
 
Last edited:

slimplynth

Senior Member
Cheers, I did google it but there was freeware app i saw posted on a thread somewhere on here, not been able to find it since. It looked the business and i wish I'd donloaded it now.
 

slimplynth

Senior Member
just a little bit confused

Thanks Eclectic, I'll check those out in a bit - which brings me to my plee for more help. While daydreaming at work today I couldn't stop thinking about how to go about using the 14bit Daewoo IR protocol (I hope my boss isn't reading this, as there is a stack of work on my desk that is staying put til im happy again)

I thought about trying the following (there are no comments yet because its knackered from the start)

Code:
b0 = bit6: bit5: bit4: bit3: bit2: bit1: bit0
b1 = bit13: bit12: bit11: bit10: bit9: bit8: bit7

main:

	For b0 = 1 to 31
		
		For b1 = 0 to 127
                         pulsout 0,80
	            pause 4

			if bit 0 = 1 then gosub one else gosub zero
			
			if bit 1 = 1 then gosub one else gosub zero
			
			if bit 2 = 1 then gosub one else gosub zero
			
			if bit 3 = 1 then gosub one else gosub zero
			
			if bit 4 = 1 then gosub one else gosub zero
			
			if bit 5 = 1 then gosub one else gosub zero
			
			if bit 6 = 1 then gosub one else gosub zero
			
			pulsout 0,55
			pause 40
			
			if bit 7 = 1 then gosub one else gosub zero
			
			if bit 8 = 1 then gosub one else gosub zero
			
			if bit 9 = 1 then gosub one else gosub zero
			
			if bit 10 = 1 then gosub one else gosub zero
			
			if bit 11 = 1 then gosub one else gosub zero
			
			if bit 12 = 1 then gosub one else gosub zero
			
			if bit 13 = 1 then gosub one else gosub zero
			
			pulsout 0,55
			pause 600

		Debug b1
		Next b1
	
	debug b0
	next bo
end
		
One: 
pulsout 0,55
pause 145
return

zero: 
pulsout 0,55
pause 45
return
Raced home and typed it up into the PE but it won't compile. Error message for the syntax on the first line, so consulted the 2nd manual, pg. 9 and copied the following..

(I only need the 14 bits, thought that might be the problem -copied the full 16 anyway)

b0 = bit7: bit6: bit5: bit4: bit3: bit2: bit1: bit0
b1 = bit15: bit14: bit13: bit12: bit11: bit10: bit9: bit8


This failed to compile for the same reason (tried it in a different, simple as it gets program to no avail).:confused:

I'm confident the program, as a whole, will not achieve what i was hoping to do or (work at all) but to fail on the first line.. well.. it hurts :D

Thanks for listening this far, any help much appreciated.
 
Last edited:
Top