embeddedmultidrop-bus

Any Multi-drop bus development help available?


Not that I can find any by googling, but ... does anyone know of any open source code/development frameworks/test software/etc for the Multidrop Bus commonly used in vending machines?


Solution

  • In my opinion there isn't a free framework for the MDB, as this bus is only used by profit oriented companies and nobody would make his own code open source (me too).

    But the MDB protocol itself isn't very complex, it's the error handling for the several devices that is a bit complicated, as it should be 100% safe.

    And today it can be tricky to implement the 9bit serial layer, as this isn't standard, even many MCUs didn't support it any more.

    Edit: How I would implement it today

    Regard all specification, especially the timings/timeout (ex. NAK-Timeout of 5ms).

    I would use state machines to collect the configuration data, setting the normal mode of operation, set settings and all other things.

    In the first step(not later) plan to build at any state an error handling, what should happen if the communication get lost, or you got an unexpected answer?

    I would also implement logging much as possible, as sometimes there will money get lost and you have to explain why.