This paper describes a model-based design approach for deterministic, event-driven real-time controllers. The model, called Ptides, allows for explicit, platform independent specification of functionality and timing. From this specification, code is generated for given target platforms. The generated code includes a lightweight operating system which performs I/O handling and scheduling as well as application specific tasks. Currently, code can be generated for 3 different platforms: a Luminary Micro board, a Renesas board and an XMOS board.