User Tools

Site Tools


cbus:cangcln-firmware-en
no way to compare when less than two revisions

Differences

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


cbus:cangcln-firmware-en [2018/11/12 08:56] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +====== CAN-GCLN Firmware ======
 +[[:english|{{  rocrail-logo-35.png}}]]
 +[[:english|Content]] -> [[:english#hardware|Hardware]] -> [[:english#merg_cbus|mergCBUS]]
 +  * [[:cbus:overview-en|CAN-GC Overview]]
 +  * [[:can-gca1-en|CAN-GC1]] | [[:can-gca1e-en|CAN-GC1e]] | **[[:can-gcln-en|CAN-GCLN]]** | [[: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]] | [[:can-gc8-en|CAN-GC8]]
 +    * **[[:cbus:cangcln-firmware-en|Firmware]]**
 +
 + \\
 +{{:cbus:cangcln-sch.jpg?200}}{{:cbus:can-gcln.png}}
 + \\
 +===== Copyrights =====
 +  * (c) [[http://www.rocrail.net|Rob Versluis, rocrail.net]]
 +  * (c) [[http://www.merg.org.uk/|MERG]]
 +
 + \\
 +===== I/O =====
 +^ Port ^ I/O ^ Description ^
 +| RA0 |  I  | FLiM Button |
 +| RA1 |  O  | Debug LN scan freq. |
 +| RA6,7 |  R  | Resonator |
 +| RB2 |  O  | CAN Tx |
 +| RB3 |  I  | CAN Rx |
 +| RB4 |  O  | LED1 CBUS transmit |
 +| RB5 |  O  | LED2 CBUS receive |
 +| RC2 |  O  | LED5 LocoNet transmit|
 +| RC3 |  O  | LED6 LocoNet receive|
 +| RC4 |  O  | LED3 Running |
 +| RC5 |  O  | LED4 FLiM mode |
 +| RC6 |  O  | LocoNet Tx |
 +| RC7 |  I  | LocoNet Rx |
 +
 + \\
 +
 +===== IDs =====
 +| NMRA Manufacturer ID |  70 |
 +| Product ID |  56 |
 +| Default node number |  56 |
 +| Default CanID |  56 |\\
 +
 +
 +===== Node Variables =====
 +^ # ^ Description ^
 +|  1 | node configuration |
 +|  2 | CAN-ID |
 +
 + \\
 +
 +==== Node configuration byte ====
 +//Revision 425+//
 +^ Bit ^ Default ^ Function ^ Remark ^
 +| 0x01 | off | Read only | One way traffic from LocoNet to CBUS |
 +| 0x02 | off | Send CBUS sensor events |  |
 +| 0x04 | off | SoD | Translate SoD event to LocoNet |
 +
 + \\
 +
 +===== Node Events =====
 +//Revision 435+//
 +^ Event# ^ Description ^ Variable ^
 +|  0 | SOD | not used |
 +|  1 | Switch start event number | not used |
 +|  2 | Switch end event number | not used |
 +|  3 | Sensor start event number | not used |
 +|  4 | Sensor end event number | not used |
 +
 +
 +
 + \\
 +
 +===== Supported OPCs 1a =====
 +^ CBUS ^ Direction ^ LocoNet ^ Remark ^
 +| OPC_RTON |  <->  | OPC_GPON | Track power |
 +| OPC_RTOF |  <->  | OPC_GPOFF | Track power |
 +| OPC_RESTP | ->  | OPC_IDLE | Emergency break |
 +| OPC_ASON, OPC_ASOF |  <- | OPC_INPUT_REP | Sensor/Input report |
 +| OPC_ASON, OPC_ASOF |  <- | OPC_SW_REQ, OPC_SW_STATE | Switch request |
 +| OPC_ACON3 |  <- | OPC_LISSY_REP | Uhlenbrock IR-Reader |
 +| OPC_ACON3, OPC_ACOF3 |  <- | OPC_MULTI_SENSE | Digitrax Transponding |
 +| OPC_ASRQ (4711) | ->  | OPC_SW_REQ (1017) | Start of Day |
 +| OPC_ACON, OPC_ACOF, OPC_ASON, OPC_ASOF | ->  | OPC_SW_REQ | See filter range for switch requests. |
 +| OPC_ACON, OPC_ACOF, OPC_ASON, OPC_ASOF | ->  | OPC_INPUT_REP | See filter range for sensor/input reports. |
 +| OPC_FCLK | ->  | OPC_WR_SL_DATA | Fast clock in slot 123 |
 +| 0xEA |  <- | LocoNet read error | Debugging |
 +
 + \\
 +Lissy example trace:
 +<code>
 +20120608.154904.282 r9999c lnreader lnmon    1486 Lissy 6: Loco 2418 moving north
 +20120608.154904.283 r9999I lnreader OLocoNet 0513 lissy=6 ident=2418 dir=0
 +20120608.154904.288 r9999I cbreader OCBUS    0179 [056] evaluate OPC=0xF0
 +20120608.154904.288 r9999c cbreader OCBUS    0926 IR short event 6 loco=2418 dir=rev (node=0)
 +</code>
 + \\
 +
 +=====Address mapping=====
 +Read the **[[:addressing-en|Addressing]]** page for more information about addressing schemes.\\
 +^ CBUS (FADA) -> LocoNet (MADA) ^ Remark ^
 +| address (divided by) 2 -> port | |
 +| address (modulo) 2 -> gate | In the **[[:loconet-easy-en|GCA50 setup]]** the gate is referred by the **[[:loconet-easy-en#two_coil_switchc2|C2]]** option. |
 + \\
 +^ LocoNet (PADA) -> CBUS (FADA) ^
 +| (port-1) (multiplied by) 2 + gate | \\
 + \\
 +^ gate ^ value ^
 +| red | 0 |
 +| green | 1 |\\
 +
 + \\
 +  * **[[:addressing-en#flat_accessory_decoder_address_fada|FADA]]** = Flat Accessory Decoder Address
 +  * **[[:addressing-en#port_accessory_decoder_address_pada|PADA]]** = Port Accessory Decoder Address
 +====Example====
 +^ CAN-GC2 ^^
 +| CBUS | LocoNet |
 +| Address= 8, Port=0| Address=0, Port=5, Gate=red |
 +
 + \\
 +
 +===== Files =====
 +====Sources====
 +  * http://bazaar.launchpad.net/~rocrail-project/rocrail/hardware/files/head:/cbus/cangcln/
 +====HEX====
 +  * https://launchpad.net/rocrail/sunrise/2.0/+download/cangcln-1h-507-hw1.3.hex.zip 
 +  * https://launchpad.net/rocrail/sunrise/2.0/+download/cangcln-1h-507.hex.zip **Prototype**
 +
 + \\
 +
 +=====TODO=====
 +  * BREAK line of 15 bits on collision. (LNPE page 4)
  
cbus/cangcln-firmware-en.txt · Last modified: 2018/11/12 08:56 by 127.0.0.1