Based on work by i-Bot and others on the RoboSavvy Forum. Hitec MR-C3024 to PC Protocol for RoboNova Based on Robobasic Version 2.5e Serial Interface 9600 bps, 8 bit, no parity, 1 stop To set a different baud rate write to the BAUD rate register (&H99) using the F8 command. Value is 03 for 115K and 2F for 9600. Protocol The interface protocol is mastered by the PC, which sends bytes usually one at a time to the C3204 and expects valid responses in a given timeout. No response from the C3204 gives an error in Robobasic, a bad response gives a different error. The C3024 also invokes a timeout when it expects to see a byte from the PC. No response or a bad response returns the C3204 to look for a new command. Command bytes are usually swapped on a byte by byte basis, so the PC may send a null byte to allow the C3204 to send a response, or the C3024 may send an echo of the received byte to acknowledge. First byte of a command determines the type Bytes sent one at a time from PC, C3024 sends either echo or response byte The C3024 also has a timeout and waites for a new command RoboBasic has a timeout Bad response gives an error in RoboBasic Commands by Value ----------------- Commands available from PC to C3024. 0x80-0xFF all command/null bytes are echoed/responded to Command Function --------------------------------------------------------- 0x00-0x7F Write Byte to first defined RoboBasic Variable No Echo --------------------------------------------------------- 0x80-0x8F None 0x90-0x9F None 0xA0 Unknown 0xA1-0xAE None 0xAF Invoke bootloader $AF/$AF b/B o/O o/O t/T --------------------------------------------------------- 0xB0 PTP returns 0 or FF depending if the PTP move is complete 0xB1 PTP Write value to 0x4DA zero for PTP Off and non zero for PTP on 0xB2 Unknown Write value to 0x4D4 between 1 and 15 0xB3 Read on chip EEPROM 0xB4 Write on chip EEPROM 0xB5-0xBF None --------------------------------------------------------- 0xC0-0xCF None --------------------------------------------------------- 0xD0 Unknown Servo 0xD1 Unknown Servo 0xD2 Read Servo Position 0xD3 Read Group8 Group A 0xD4 Read Group8 Group B 0xD5 Read Group8 Group C 0xD6 Read Group8 Group D 0xD7 Read Group6 Group A --------------------------------------------------------- 0xD8 Read Group6 Group B 0xD9 Read Group6 Group C 0xDA Read Group6 Group D 0xDB Read Group6 Group E 0xDC-0xDF --------------------------------------------------------- 0xE0 Port Bit Read 0xE1 Port Byte Read 0xE2 ADC Read 0xE3 Port Bit Write 0xE4 Port Byte Write 0xE5 PWM Write 0xE6 Write Servo Position 0xE7 Turn On Servo --------------------------------------------------------- 0xE8 Turn Off Servo 0xE9 Servo Speed 0xEA Unknownsomething on AI Motor 0xEB Write Synchronous Servo Positions - see correction below 0xEC Download Robobasic Code 0xED-0xEF None --------------------------------------------------------- 0xF0 Get Controller Information 0xF1 Write IM EEPROM 0xF2 Read IM EEPROM 0xF3 Unknown Set bits 3 and 4 in 0x4D2 0xF4 Unknown Write/Read IMEEPROM 0xF5 Read AI Motor Settings 0xF6 Write AI Motor Settings 0xF7 Read Data Memory --------------------------------------------------------- 0xF8 Write Data Memory 0xF9 None 0xFA Controller Stop 0xFB Controller Start 0xFC Controller Reset 0xFD-0xFE None 0xFF Write value FF to first defined RoboBasic Variable --------------------------------------------------------- Posts summary ------------- Byte1 = EB Byte2 = first servo Byte3 = count of following servos Byte4.. = positions For command EB the PTP should work over the range of servos specified, so if you do, EB 00 18 xx .. .. .. this should make them work in PTP. Use a 00 for any servo you do not want to change, and it will not be included in the PTP. PEEK location 0x4E3, the bits show if a servo motion is done for the first 8 servos To set a different baud rate write to the BAUD rate register (&H99) using the F8 command. Value is 03 for 115K and 2F for 9600. The B0 command returns 0 or FF depending if the PTP move is complete. B1 is PTP Sadly, the HMI servo programmer will not write to the Robonova servos. i-Bot --------------------------------------------------------- --------------------------------------------------------- i-Bot PostPosted: Sat Mar 15, 2008 2:45 pm B1 should be zero for PTP Off and non zero for PTP on. For command EB the PTP should work over the range of servos specified, so if you do, EB 00 18 xx .. .. .. this should make them work in PTP. Use a 00 for any servo you do not want to change, and it will not be included in the PTP. Make sure you give time for the move to complete before the next move. There is no automatic wait, like in Robobasic. The B0 command returns 0 or FF depending if the PTP move is complete. ------------------------------ i-Bot PostPosted: Fri Mar 14, 2008 3:56 pm I took a quick look, and the B1 is PTP, not PTP ALL, but should work for you. The correct format of command EB is: Byte1 = EB Byte 2 = first servo Byte3 = count of following servos Byte4.. = positions ------------------------------ Fritzoid PostPosted: Tue Feb 12, 2008 4:28 pm Sadly, the HMI servo programmer will not write to the Robonova servos. i-Bot PostPosted: Tue Mar 18, 2008 8:11 am How big is the time difference in the at the start between the servos ? Do the lower numbered servos start first ? Maybe the time transfer 54 bytes plus turnaround time is too long. To set a different baud rate write to the BAUD rate register (&H99) using the F8 command. Value is 03 for 115K and 2F for 9600. ------------------------------ i-Bot PostPosted: Thu Nov 09, 2006 4:22 pm You might acheive the same by using a peek to location 0x4E3 which has the bits which show if a servo is motion is done for the first 8 servos. I haven't tried this though. ------------------------------ ---------------------------------------------------------