62b) Physikal layer - timing 16600 Baud, 60µs bit time8N1600µs.60µs1StartD0D1D2D3D4D5D6D7Stop1
73a) Packet layer bytes are transmitted back-to-back OpcodeDataCheck...bytes are transmitted back-to-backpackets consist of 2, 4, 6 or N bytesfirst byte is „opcode“last byte is checksum (xor of all other bytes).
83b) Opcode D7 D6 D5 D4 D3 D2 D1 D0 5 bits to encode 32 possible opcodes.always 1 (all other bytes have D7=0)6 bytes14 bytesN bytes2 bytespacket length(including opcode and checksum)
93c) Packet timing, net access CD20bit timesMD6PD0..20.CD: carrier detect (defines end of packet)MD: master delay (only master may transmit)PD: priority delay (high prio. = small PD)
103d) Packet timing, collisions Collisions are avoided, by shortening the time between still observing the net is idle until the first bit is transmitted onto the net.Collision is detected, when a 0 is seen on the net, while a 1 is being transmittedOn detection of a collision, a break (15 bit times 0) is transmitted.
114. Application layer -- an overview turnoutssignalsmessage exchangedecoder programmingfast clockloco operationstation localnot usedcontrol locallywell, interesting...YESOnly limited mission for layout-wide LocoNet.
125a) Loco operation Table with loco data in command station Slot # = Index in table = HandleSlot # is a 7 bit number128 Slots:are loco slots0 dispatch slot>120 are special slots (fast clock, programming)loco slots have fields:
135b) Fields of a slot loco address (14 bits) state of slot (free/common/idle/IN_USE)protocol selection (# of speed steps, ...)state of locospeed (7 bit)functions (9 bits, F0, F1, ..., F8)consist treeID (14 bits, can be a device ID of controller)
145c) Operations on slots (requests) requests to master:OPC_LOCO_ADR: get slot by addressOPC_RQ_SL_DATA: get slot by slot #OPC_WR_SL_DATA: write slot by slot #OPC_MOVE_SLOTS: move slot from # to #dispatch put (destination=0)dispatch get (source=0)NULL move (source=destination!=0)OPC_SLOT_STAT1: modify slot status
155d) Operations on slots (responses, operation) responses from master:OPC_LONG_ACK: simple acknowledgeOPC_SL_RD_DATA: slot datarealtime operationOPC_LOCO_SPD: 7 bits of speedOPC_LOCO_DIRF: direction and F0, ..., F4OPC_LOCO_SND: F5, ..., F8
166a) FRED FRemos Einfacher Drehregler Simple to use Can only control one enginespeed,direction,F0, F1, F2.
176b) FRED: Example for protocol (acquire loco) masterFREDmasterFREDDispatch GetDispatch GetSlot ReadNACK.Write SlotACK
186c) FRED: Example of protocol (reconnect) masterFREDmasterFREDif slot data changedGet SlotBy AddressNull MoveSlot ReadSlot ReadWrite SlotACK.
197. References This clinic: Digitrax homepage: stefan.bormann/dcc/dcc_e.htmlDigitrax homepage:LocoNet-Hackers mailing list: