Infra Red Remote bit banging mischief maker

Paix

Senior Member
Hello bit bangers, some strategic advice please, if you will.

I have a LED020 IR sensor (from Tech Supplies) and have fed the output to a Logic analyser which seems to indicate that the framing from the family TV STB remote control has pulses that are either 0.9mS or 1.8mS in duration, with a total frame length of 23.4mS and 26 arbitrary units long.

In my minds eye, although I have only checked the one command, this represents four bytes worth of data (32 units, with a few spares). In an ideal world I would point at the four bytes in memory and shift them left or right until I was done.

Reading in characters from memory, then masking, acting on the result and dividing eight times, rinsing and repeating is likely to put a few jitters in the data; first element adjustment for each byte would probably take care of that and while not elegant, would probably be more concise and allow more scope for extension than a linear, non-iterative solution.

0 1 0 1 00 11 00 11 00 11 00 1 0 1 0 1 0 1 0 in my example, the spaces representing transitions, with an idle high condition. I'm unsure if the 0 or 1 condition indicates a presence of PWM carrier, but don't see that as a significant problem.

My immediate thoughts are to use an 08M2+ for size and simplicity, but an 18M2+ will certainly allow me to use the internal modulator per Hippy's advice some time ago regarding tone mod or AFSK telegraph tones.

What am I making . . . I suspect that the truth is, a bit of a nuisance of myself with my nearest and dearest who might take delight at a random channel change of an afternoon when I'm not in. :)

I'm not soliciting code, as I believe that I can write that myself and then post it back here, but I would like to know if my chosen strategy is relatively sound.

Of course, once tested, the output stage might be made a bit more Universal, or is that slightly less than Global . . . ? :) I feel mischief coming on!
 

hippy

Technical Support
Staff member
All M2's have a DSM ( Digital Signal Modulator ) on-chip so no need to specifically use an 18M2. It's often just as easy to put the IR LED + R between an I/O pin (A) and PWM (K).

There should be no problem with storing the timing bits as a set of bytes. To overcome timing issues one technique is to extract the bits from the bytes and place them in RAM as a linear array of bits or bit timings which can then simply be churned through using '@bptr'. The bit stream output can then have consistent timing per bit and it doesn't matter how long it takes to build the bit stream or whether getting a new byte takes longer than getting a bit from an already chosen byte.
 

Buzby

Senior Member
.... What am I making . . . I suspect that the truth is, a bit of a nuisance of myself with my nearest and dearest who might take delight at a random channel change of an afternoon when I'm not in. .... I feel mischief coming on!
You could make quite a bit of mischief if you keep the receiver active, so you can detect the current channel.
Then you could do things like switching out of the shopping channels before any damage is done !.

Have a Happy New Year,

Buzby
 
Top