The main difference between single byte (SB) and MIP is as follows:
- All MIP commands and data have a header and checksum. SB only has a header (the echo of the command byte) and a checksum on the replies. This means that the programmer has to create a header and calculate the checksum for a command before s/he sends the command. This was not necessary with SB.
- MIP setup and control commands (like start and stop continuous mode) send an ACK/NACK field with a reply. SB does not. The ACK/NACK field has an error code that can be used to confirm that a command was accepted.
- MIP packets can contain multiple command and data fields. SB commands and data only have one fixed field.
The reason we created MIP was the higher reliability for communications and control, plus the ability to have custom data messages. SB was prone to phantom commands in a noisy environment. In addition, SB had a limited number of data combinations available.
To move code from Single Byte to MIP with simple applications is fairly painless if you follow some guidelines.
- You can “prebuild” all your setup and control commands and make them constants in your code. You can plug the prebuilt packet constants into the same part of the code that you previously used to send a single byte command (In essence, you are sending a “multi-byte” command instead of a single byte command). We have a “packet builder” tool in the MIP Monitor that will build the packet for you. You can try out the command and then copy the packet and paste it directly into your code as a string constant.
- When you design the MIP data message, make sure all the “data rate decimation” values are the same. This will make all the data packets identical, which makes finding data in the packet similar to finding data in a SB data message (by using fixed offsets).
Direct link: view