CAN-GC1 Firmware

ContentHardwareMERG CBUS


:!: The PC interface is not CBUS compatible and works with Rocrail only.

Copyrights

© MERG

HEX

This firmware needs a Rocrail CBUS Setup for serial and 230400 bps. (-0,79% tolerance: 228571 bps)
Resonator: 8MHz, Rocrail 2931+.

Note

Most RS232 legacy ports cannot handle baud rates above 115200.
To use the needed 230400 baud rate an USB-232 converter is the best solution.
The CAN-GC1 can be equipped with an USB Sub-D type connector.

Sources

Compile with the “Case sensitive” option!


Binary Response

The official CBUS protocol is in ASCII which doubles the number of bytes.
To prevent frame loss the response from the CAN-GC1 to Rocrail has been made binary.
An ASCII response starts with “:S” and a binary with “:s”.

Frame ASCII format

:ShhhhNd0d1d2d3d4d5d6d7d; :XhhhhhhhhNd0d1d2d3d4d5d6d7d; :ShhhhR; :SB020N;
:S    -> S=Standard X=extended start CAN Frame
hhhh  -> SIDH<bit7,6,5,4=Prio bit3,2,1,0=high 4 part of ID> SIDL<bit7,6,5=low 3 part of ID>
Nd    -> N=normal R=RTR
0d    -> OPC 2 byte HEXA
1d-7d -> data 2 byte HEXA
;     -> end of frame

Frame Binary format

:shhNd0d1d2d3d4d5d6d7d;
:s    -> s=Standard start CAN Frame
hh    -> SIDH<bit7,6,5,4=Prio bit3,2,1,0=high 4 part of ID> SIDL<bit7,6,5=low 3 part of ID> 2 bytes
Nd    -> N=normal R=RTR 1 byte
0d    -> OPC 1 byte
1d-7d -> data 1 byte
;     -> end of frame (should be a checksum in future versions)

Applications should read up to the OPC to determine the data length.

Development Tools


Personal Tools