MRBus MRB-GIM Generic Indicator Module

MRBus MRB-GIM Generic Indicator Module
Generic Indicator Module

The Generic Indicator Module is exactly what it sounds like - it's a module for driving up to 64 discrete indicator LEDs off of selected bits in the incoming datastream. The initial purpose of this was to pick up occupancy bits from the intermediate blocks between CTC-controlled sidings, but in the future it will also be used to indicate tripped electronic circuit breakers, repeat signal indications for fascia lights, and show other layout diagnostic information. It's also a handy debugging tool. It truly is generic - a virtual input tied to one of the indicator LEDs can be programmed to track any bit in any packet from any device. The possibilities are limitless.

As has been mentioned elsewhere, the MRBus system has been developed in C using the BoostC compiler. It's not free, but it's quite reliable and very reasonably priced for what it does and there is a free trial version available. For those looking for a good quality PIC C compiler on an affordable budget, I recommend it. As a truly free, open-source PIC compiler becomes available and matures (come on, SDCC people, I'm counting on you...), I'll probably migrate over. For those without the compiler, I've included the compiled hex file for use with pretty much any standard PIC programmer.

Documentation and Source Code

Documentation

GIM Configuration Values and Wiring Matrix
A guide to the configuration values on the GIM and the wiring of indicator LEDs
[pdf]
Legacy - v1.0 only - GIM Configuration Values and Packet Summary
A guide to the configuration values on the GIM and the structure of the network packets it sends and accepts.
[pdf]
Legacy - v1.0 only - GIM LED Wiring Matrix
Since the LEDs are driven in a matrixed manner, you need to know where to connect each one. From the 8 common (negative) outputs and 8 segment (positive) outputs on the MAX7219, this chart shows you how to hook up every LED.
[pdf]

Packet Summary

S/R1
& Pkt Type
FormatDescription
R Lamp Test[SRC] [DST] 'L' [MASK]Sets/clears lamp test mode. The byte in [MASK] will be set for all segments in the matrix, turning on the lamps corresponding with the set bits. [MASK]=0x00 disables lamp test mode. Triggers Lamp Status response packet.
R Read EE Req[SRC] [DST] 'R' [EEADR]Request that the MRB-GIM read EEPROM address <EEADDR> and reply with a "Read EE Reply" packet
R Write EE Req[SRC] [DST] 'W' [EEADR] [VAL]Request that the MRB-GIM write value [VAL] to EEPROM address [EEADR] and reply with a "Write EE Reply" packet
R Read Memory[SRC] [DST] 'Z' [ADR]Read memory register [ADR] (must be between 0x00 and 0xFF), and reply with a "Read Mem Rply"
R <Pkt Filter>[SRC] [0xFF | DST] [TYP] [...]This device has a generic packet filter for setting indicators, and may accept any packets that have a destination of this device or broadcast (0xFF) and match the packet type filters.
S Read EE Rply[DST] [SRC] 'r' [VAL]Reply to Read EE Req packet, with [VAL] corresponding with the value at the requested EEPROM address.
S Write EE Rply[DST] [SRC] 'w' [VAL]Reply to Write EE Req packet, with [VAL] corresponding with the value at the requested EEPROM address upon write success.
S Read Mem Rply[DST] [SRC] 'z' [VAL]Reply to Read Memory packet, with [VAL] corresponding with the value at the requested memory address.
S Lamp Status[DST] [SRC] 'l' [MASK] [SEG0]..[SEG7] Response to "Lamp Test" request. [MASK] is the mask value sent in with the Lamp Test request, and [SEG0]..[SEG7] are eight bites showing the current status of all 64 indicators.

Note 1: S/R indicates Send/Receive, meaning packets the device sends or receives.

Schematics

Version 1.0/2.0
No change in connections - substitute a PIC16F628 for the PIC16F648A for the older v1.0 version
[jpg]

Firmware

Version 1.0 (PIC16F628)
Released 6-Apr-2003
[src] - [hex]
Version 2.0 (PIC16F648A)
Released 4-Oct-2008
[src] - [hex]

Photos

Installed MRB-GIM Module
20-Apr-2003 - A finished unit installed on the Wind River Railroad. This one board controls all the occupancy indicator lights on the board not run by the two MRB-PCIM units.
[600x400]
[2160x1440]
  Questions? Email Nathan Holmes
© NDHolmes, but freely usable under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License.
Last modified on October 07, 2008, at 11:23 PM
Edit Page | Page History