Loading [MathJax]/extensions/tex2jax.js

You are here: Start » Program Examples » IO Serial Port Communicator

IO Serial Port Communicator

Aim:

The task is to create a demonstrative version of a program, that is responsible for connecting to the serial port with provided parameters, send new data (binary or text), have the option to see the last message and have the ability to safely disconnect.

Data required for connection:

  • Port Name
  • Baud Rate
  • Parity
  • Data Bits
  • Flow Control
  • Stop Bits

Hints:

You can use the help of this article:Programming Finite State Machines, when it comes to deciding on the structure of the program. You can also read more on Macrofilters

Macrofilter Main

Macrofilter StateMachine(CONNECTED)

Macrofilter StateMachine(DISCONNECT)

Macrofilter StateMachine(SEND_BYTES)

Macrofilter StateMachine(SEND_TEXT)

Macrofilter StateMachine(SETUP_CONNECTION)

Macrofilter StateMachine(WAIT_FOR_KEY)

Macrofilter CreateTextForConsole

Used Filters

►Click here to show the filters list.

Further Readings

  • Array Transforms - List of filters performing operations on arrays.
  • Serial Port - List of filters performing operations on Serial Ports.