Anatomy of a Serial Port

A serial port is composed of actual hardware that controls serial port lines and of buffers that store incoming data (which is to be processed by your application) and outgoing data (which has not yet left the port).

The ser. object contains properties, methods, and events that relate both to the buffers and the UART itself (see Serial Settings).

The buffers available are:


The logical lines available are:

The TX/W1out/dout and RX/W1in/din lines always have a fixed "position" in the device (i.e., they cannot be remapped to a different I/O pin). The RTS/W0out/cout and CTS/W0&1in/cin lines can be remapped on select devices. Also, depending on the device and the serial port mode, you may or may not require to explicitly configure the lines of the serial port as inputs or outputs. Sometimes this will happen automatically and sometimes you need to take care of this in your application through the io. object. You will find this information in your platform specifications.

Details of I/O line usage in each of the three operating modes of the port can be found here.