FREMO Interlocking
Development & Test systems -> Bus Monitoring Computer
19.08.2005

BMC: Software First Step

In a first step, we will implement only pure raw read from LN with direct sending to PC on a PROTO_128 board with the Atmel AVR mega128..

Please feel free to comment these ideas! [BA050819]

Used hardware of mega128

  • USART0: Serial port for data stream to PC with 115kBaud.
  • USART1: Serial port for LN-data stream.
  • TIMER0: Timer for use with Stefan's software timer.
  • TIMER1: Timer for generating the time tag.
  • 256*4 bytes of RAM as buffer for the LN data packed into PC-telegrams

PC Telegram

Some ideas are present, but a lot of items are missing up to now.

Structure of PC telegram

Every telegram to the PC shall consist of 4 bytes of information.

  • Byte0: Status
  • Byte1: Data from LN
  • Byte2: Time tag high
  • Byte3: Time tag low

Status byte Bit7=0

If the most significant bit of the status byte is equal to 0, on the PC we receive a "normal" data byte from the LN with a time tag and the status and error bits.

  • Bit6: reserved for future use
  • Bit5: reserved for future use
  • Bit4: reserved for future use
  • Bit3: reserved for future use
  • Bit2: reserved for future use
  • Bit1: reserved for future use
  • Bit0: reserved for future use

Status byte Bit7=1

With the MSB=1 we receive a command or an extra information.

Bit6=0

Here we'll find all commands.

  • 4 Bytes of 10101010: Synchronization at every time tag timer rollover
  • 10101011: Timer rollover information with 2 or 3 bytes of timer high information

Bit6=1

Here we'll find all extra information.