User guide

18 HDMI5 Component Video Switch
keep the size of the IR response small, this command sends the 72 bit IR code as an 18 digit
hexadecimal value.
IR ? Query for the IR code of the last IR command received.
IR Query for the IR code of the last IR command received.
Response String:
=IR ircode
Where:
ircode = 18 hex digits (0-9, A-F), representing the most recent IR code received.
This command returns a single digit ‘0’ if there are no IR codes waiting to be read.
Set Learnable IR Command Codes
This command is used to set, or retrieve, the current IR codes associated with the learnable IR
commands. This is useful for “cloning” the IR codes learned in one HDMI5 into another HDMI5.
IRC ircmd,ircode Set the ‘ircmd’ to use the IR code ‘ircode’.
IRC ircmd,? Query for the ‘ircode’ for IR command ‘ircmd’.
IRC ? Query for all ‘ircmd’ settings.
Response String:
=IRC ircmd,ircode
Where:
ircmd = IR command number being set / retrieved (See Table).
ircode = 72 bit IR code (See: “IR” command).
HDMI5 Command Ref. (Contd)
11HDMI5 Component Video Switch
For comparison, here are the same examples and their associated CRC-8 checkcodes:
LI 2,3:16
LI 3,2:114
IL 2,3:22
KJ 2,3:145
The CRC-8 checkcode easily catches these errors.
Source Code Example of Calculating a Checksum
The following is a simple “C” program that calculates the checksum of the string “TestString” and
then prints the initial string with the calculated checksum appended to it.
#include "stdio.h"
int main( void)
{
char TestString[] = "LI 2,3";
unsigned char cksum;
int index;
char token = ';';
cksum = 0; // initialize checksum
// Checksum all of 'TestString[]'
index = 0;
while (TestString[index] != '\0')
cksum += TestString[index++];
// Add the checksum token character ';' to checksum
cksum += token;
// Print the results
printf( "%s%c%u", TestString, token, (unsigned char)cksum);
return (0);
}
Checksums and CRC-8’s (Contd)