GenuineCopies.tv

Call us 10am - 4pm Weekdays

The Mechanics of a remote control - on or off blue square

Most manufacturers opt to use NEC type encodings. There are over a hundred others and a detailed list will interest very few people.

The NEC encoding incorporates an error checking system. Basically when the remote sends the number 100 it also sends 155 after. Likewise, 20 is follwed by 235. The two numbers will always add up to 255.

However, this system is not used by every remote with the NEC structure. Some will invert a bit

0101 in binary becomes 0100, where the last bit is changed from 0 to 1 or vice versa. Sometimes working out how this system is set out takes a little bit of time.


Interferance - use of the same header codes

Each manufacturer selects a pair of numbers to use as their header. Humax uses 00 80 for their TVs and 00 10 for their recording boxes.

What about those cases where a customer has 2 identical/same brand devices in the same room? Schools often have many projectors in close proximity.

Command modes were developed to counter this. In the case of Humax you can change a box and the remote from 00 80 to 01 80 or 02 80 etc. This enables a consumer to use many items in the same place.

The drawback? A big big one:

  • The command mode can get changed inadvertently.
  • When the batteries die, many remotes revert to the original command mode.
  • For the small number of people wanting this feature it is a lot of "faff".
  • Both the remote and the device have to be adjusted.

Sony and Panasonic have been a big adopters of this command mode feature, mainly for DVD recoders. We are plagued with the problems with replacement remotes that we sell for Sony and Panasonic machines due to having to set the right command mode. Hundreds of emails have been sent to first explain the feature and then rectify it.

In the case of Humax, we built a "macro" into the remote to send codes to the box which switches it to command mode 0. A macro is simply a sequence of key presses that match what the user would press in turn on the remote to get the same result. I.E. it sends 5 or so commands one after another with a short gap in between. (Fun to watch though; the menu appears on the TV, an item is selected and activated like an elf with magical hands)


Code length

Pioneer have long code lengths, 64 bits. (68 pulses)

Vestel/Philips products are often just 13 bits. (13 pulses)

ICan have sometimes used 128 bits, but it is a condensed format. (32 pulses)

More pulses does not mean more data.


Common codes

LG, Samsung, Sony, Panasonic, Philips and a few others use the same codes for all of their device types. One set of header and button codes for all TVs and another for DVD/Blu-ray players.

Universal remotes take advantage of this, however there can be a hundred or so button codes. Certain menus, setup options and functions cannot be included in a fifty button remote. Hence why a compatible remote i s so much more useful, it will have the a complete set of functions for your particular item.

A 'code' for a TV is not just a number. It is a carrier frequency, full set of button codes, a range of header values and a format for sending the data. Hundreds of lines of computer code to generate it.


Programming language

C can be used to some extent, but timing is a critical issue. If the compiled C is not optimised the remote will operate too slowly. The data pulses must be sent at precise intervals.

Assembly language is used to write the core functions of the remote control. Data is looked up and stored before any activation of the infra-red LED. Assembly language is eloquent, fast, predictable and tight.

Some remote control chips have a built in carrier generator. However, if the code doesn't keep up with the carrier it all falls apart. You have to supply the next pulse length before it completes the last burst. 1 instruction too many is a problem at times in this application.

A chip can generate a carrier at a desired frequency by internal clock divisions. A chip may run at 4mhz, 1 million instructions per second. Count to 25 and you have 40000hz.

Modern object orientated C is bulky and in my opinion a complete joke. The idea is to make code more reusable. However, it is like wanting to give someone a recipe to boil and egg and handing them 50 hefty books with a few words circled in some of them. If you want to reuse code, copy and paste it.

In assembly there is not one instruction that is not needed. 4 instructions can often be reduced to 3 with some thought. Standard C can be read and followed by all, much easier. Computers/phones are supposed to b e getting quicker after each new iteration, yet the software is causing the end product to be ever less efficient. There again, writing an operating system from scratch in assemby would be a stretch.