The One Byte Protocol

David Thomson, Original Code Consulting, October, 2019

When interfacing to a commercial laser, I found one of the most concise (and perhaps one of the most odd) communication protocols I've ever run across. Each command to the laser consisted of one byte, and any parameter for that command, if there is one, is another single byte. The return data from the laser was, you guessed it, a single byte! This is not inherently awful, but it had some interesting consequences. For instance, the laser requires 8 minutes to warm up, or roughly 480 seconds. One can query the warm-up timer value to see how far along the warm-up is, but of course, for the first 225 or so seconds, it repeatedly reports "255", after which it finally begins to count down to 0. Also, the high voltage, which is in the 7000 V range, is scaled into an integer from 1 to 255, so it has a resolution of about one part in 60. (Go figure, since a simple scaling of 7000 into 255 actually implies a resolution of one part in 27. But they did something different.) And of course, all the other "health" parameters that it reported had similar resolution limits. One has to wonder what the limitation in the electronics was that prompted such frugality...

David Thomson