µCon bus
Documentation

Device API

µCon bus

General

The µCon bus is built as a current loop. Every device on it sends and receives on the same line. Transmission is half duplex, so only one transmitter may ever be active.

Transmission uses UART at a baud rate of 65200 baud, 8n1.

The checksum (CRC) is the XOR of every preceding byte.

Bus timing

The bus timing is set by the LoDi-Rektor. It also sends every command. A µCon device may only transmit once it has been addressed, and the answer has to come within 600 µs.

Commands that need no answer are sent twice, with a gap of 600 µs between the two packets.

If a slave does not know a command, or was not addressed, it has to ignore every byte that follows until a pause of 300 µs is detected in the data stream.

Packet needing no answer

Rektor write  
Rektor dataHeaderAddr0..n x dataCRCHeaderAddr0..n x dataCRC
Time600µs26µs160µs160µs0..n x 160µs160µs600µs160µs160µs0..n x 160µs160µs

Packet needing an answer

Rektor write        
Rektor dataHeaderAddrn x dataCRC
Slave write
Slave dataHeaderAddrn x dataCRC
Time600µs26µs160µs160µsn x 160µs160µs<600µs26µs160µs160µsn x 160µs160µs

General commands

General commands have to be understood and answered by every µCon device, although the answer may differ from device to device.

µCon Read Version

This command is sent by the LoDi-Rektor to identify a device newly detected on the bus.

The LoDi-Rektor sends:

HeaderAddrCRC
0xB01..630x00 .. 0xFF

An addressed device answers:

HeaderAddrDevice typeMajorMinorCRC
0xB11..630x00 .. 0xFF0 .. 2550 .. 2550x00 .. 0xFF

Device type:

  • 0x01: µCon-Booster
  • 0x02: µCon-Railspeed
  • 0x03: LoDi-Booster
  • 0x04: LoDi-CDE
  • 0x05: LoDi-TrainSpeed
  • 0x06: LoDi-Booster 10A
  • 0x07: LoDi-Booster 20A
  • 0x08: LoDi-DC-Car-Booster

µCon Device-Poll

This command is sent onto the bus by the LoDi-Rektor at regular intervals for every device address. An addressed µCon device has to answer it. That is how changes on the bus are detected.

The LoDi-Rektor sends:

HeaderAddrCRC
0xE11..630x00 .. 0xFF

An addressed booster answers:

HeaderAddrStatusCurrent 1Current 2CRC
0xF21..630x00 .. 0xFF0 .. 2550 .. 2550x00 .. 0xFF

The status is bit-coded.