Hello Rastan,
One other thing...(explaining the code word);
IN these pic chips, you pass a number (my last example uses the value 1).
Sometimes you may want to pass a code word.
What you can do, is a kind of CRC on that word, and pass THAT number.
Example:
CodeWord ="SecretWord"
PassingValue var byte;
PassingValue=0;
For counter=1 to CodeWordLength
PassingValue=PassingValue+CodeWord[counter]
Next counter
What this does, is add up each individual character in CodeWord.
if it goes above 255, it automatically rolls over to zero and starts over
again. When you get done adding up your characters out of your SecretWord, you will have a number (CRC) between 0 and 255.
Another (more complicated to some degree, but just as easy), is to
switch the hex numbers around...
$48 = $84
$12 = $21
....
...
But passing a number insures 254 different possible codes.
Dwayne
Ability to Fly:
Hurling yourself towards the ground, and missing.
Engineers that Contribute to flying:
Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute
Pilots that are Flying:
Those who know their limitations, and respect the green side of the grass...
Bookmarks