User Tools

Site Tools


cangc1-firmware-en

Differences

This shows you the differences between two versions of the page.


cangc1-firmware-en [2023/12/20 21:58] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +====== CAN-GC1 Firmware ======
 +[[english|{{  rocrail-logo-35.png}}]]
 +[[english|Content]] -> [[english#hardware|Hardware]] -> [[english#merg_cbus|MERG CBUS]]
 +  * [[:cbus:overview-en|CAN-GC Overview]]
 +  * **[[:can-gca1-en|CAN-GC1]]** | [[:can-gca1e-en|CAN-GC1e]] | [[:can-gca2-en|CAN-GC2]] | [[:can-gc3-en|CAN-GC3]] | [[:can-gc4-en|CAN-GC4]] | [[:can-gca5-en|CAN-GC5]] | [[:can-gc6-en|CAN-GC6]] | [[:can-gc7-en|CAN-GC7]]
 +    * **[[:cangc1-firmware-en|Firmware]]**
 +
 +
 + \\
 +| :!: The PC interface is __not CBUS compatible__ and works with Rocrail only. | \\
 +
 +===== Copyrights =====
 +(c) [[http://www.merg.org.uk/|MERG]]\\
 +
 +===== HEX =====
 +This firmware needs a Rocrail [[:cbus-en#setup|CBUS Setup]] for serial and 230400 bps. (-0,79% tolerance: 228571 bps)\\
 +Resonator: **8MHz**, Rocrail 2931+.
 +  * https://wiki.rocrail.net/lib/exe/fetch.php?media=cbus:can-gc1.zip
 +
 +====Note====
 +Most RS232 legacy ports cannot handle baud rates above 115200.\\
 +To use the needed 230400 baud rate an **[[:usb-rs232-en|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!
 +  * https://gitlab.com/rocrail/GCA/-/tree/master/cbus
 + \\
 +
 +=====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====
 +<code>
 +: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
 +</code>
 +
 +====Frame Binary format====
 +<code>
 +: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)
 +</code>
 +Applications should read up to the OPC to determine the data length.\\
 +
 +
 +===== Development Tools =====
 +  * MPLAB X v1.00
 +  * mpasm v5.43
 +  * PICKit 3
 +  * **[[:pic-adap-en|PICKit3 Adapter]]**