This binary file contains all the TMCL commands of your program in binary format. Each command saved is eight bytes: It is the command without the module address.
Once you have this file with the commands needed for your application, proceed as following:
- Send command 132 (enter download mode), with type, motor/bank and value set to 0.
- Open the binary file.
- Read 8 bytes from the file.
- Add the module address of your module (in most cases 1) to the 8 bytes (so that the check sum is correct).
- Send the module address (in most cases 1) and the 8 bytes to the module.
- You will get a reply (9 bytes) with the status set to 101 (which means that the command has been stored in the EEPROM).
- If you are not at the end of the file, go to step (3).
- Send a command opcode 0 to the module (with module address 1 this would be 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01). This is just an end marker for the disassembler in the TMCL-IDE.
- Send command 133 (exit download mode), with type, motor/bank and value set to 0.