To control the servos and outputs we need to send commands to the PIC. Some of the commands are single byte commands; some however require two bytes. The first byte always contains the command and the channel to which the command applies. We will call this the 'Command' byte. The second byte (when needed) will contain data for the command; we will call this the 'Data' byte and is used when we need to set the servo offset or position for example, said Ashley Roll, the designer.
The command byte is split into two nibbles (4 bits), the upper one defines the command to execute and the lower defines the channel (which servo or digital output) is to be affected.
download : PIC program | Schematic