User Tools

Site Tools


cbus:can-gca2-firmware

CAN-GC2 Universal 16 bits I/O node for Cbus

ContentHardwareMERG CBUS


This page documents the HEAD revision of the firmware.


Firmware

Copyrights

IDs

NMRA Manufacturer ID 70
Product ID 2

HEX

Sources

Node Variables

# Description
1 node configuration
2-17 Port 1-16 configuration
18 state of port 1-8 (read only)
19 state of port 9-16 (read only)
20 CAN-ID


Node configuration byte

Bit Function
0 save output states at power off command
1 use short events
2, 3 pulse time: 0x00=250ms, 0x04=500ms, 0x08=1000ms, 0x0C=2000ms


Port configuration byte

Bit Function
0 1=Input 0=Output
1 0=direct reporting
1=delayed reporting for occupancy detection.
0=pulse
1=continuous
2 1=inverted


Node Events

  • Inputs will generate OPC_ACON/OPC_ACOF events.
  • IR-Inputs will generate OPC_ACON3 events with loco address in extra byte 5-6 and the train category in 7.
  • A "Start of Day" event will trigger all inputs to report their status.
  • Outputs will change status on OPC_ACON/OPC_ACOF.
Event# Description Variable
0-15 port 1…16 not used
16 SoD (start of day) not used


I/O Mapping

Poort PICbit Connector
CAN RB2/RB3 -
FLiM switch RA2 -
LED1 RB6 -
LED2 RB7 -
LED3 RB5 -
1 RA0 J4
2 RA1 J4
3 RA3 J4
4 RA4 J4
5 RA5 J4
6 RB0 J4
7 RB1 J4
8 RB4 J4
9 RC0 J3
10 RC1 J3
11 RC2 J3
12 RC3 J3
13 RC7 J3
14 RC6 J3
15 RC5 J3
16 RC4 J3


Supported Opcodes

Request Response Remark
OPC_ASRQ OPC_ARON,OPC_AROF
OPC_ACON -
OPC_ASON -
OPC_ACOF -
OPC_ASOF -
OPC_RQNPN OPC_PARAN
OPC_SNN -
OPC_RQNP OPC_PARAMS
OPC_RTOF -
OPC_NVRD OPC_NVANS
OPC_NVSET -
OPC_NNLRN -
OPC_NNULN -
OPC_EVLRN -
OPC_NERD OPC_ENRSP
OPC_NNCLR - Reset EEPROM
OPC_QNN OPC_PNN Query


Unsolicited
OPC_ASON,OPC_ASOF


LEDs

LED# Color Information Remark
1 green CBUS activity. With an off delay of 50ms which does not show the actual traffic on the CAN bus; Its just a human friendly indicator.
2 yellow Event learning mode. Blinking at a rate of 1Hz, otherwise this LED is off. Triggered by the FLiM switch.
3 red Firmware started running the main loop. There is a hardware/firmware problem if this LED does not illuminate.
It is normal that this LED flickers at CBUS activity; The main loop is interrupted.


Development Tools

cbus/can-gca2-firmware.txt · Last modified: 2024/08/11 17:57 by rjversluis