|Top Previous Next|
The DS1101 features a multi-channel RS232 port. Physically, the port is implemented as a single DB9M connector with three output lines, four input lines, power input/output, and the ground.
Internally, the DS1101 has four independent serial ports. These are controlled through the ser. object (see "TIDE and Tibbo BASIC Manual").
Each of the four ports has its own TX and RX lines. These lines are implemented in hardware and can't be "remapped". The following table shows how the RX and TX lines are connected to the DB9M:
Each logical serial port of the ser. object also support RTS/CTS flow control, which is implemented in firmware (TiOS). Ser.rtsmap and ser.ctsmap properties allow you to assign any GPIO line of the DS1101 to serve as the RTS or CTS line of any logical serial port. So, TX2 and RX2 lines (pins 7 and 8) can be assigned to work as RTS and CTS lines, as is traditionally the case for RS232 ports. At the same time, these lines can be set to function as an independent serial channel.
The same goes for the DTR and DSR lines, except they don't even "exist" from the ser. object's perspective. These lines are implemented on the application level. For example, our own "serial-over-IP" application supports these lines. Again, instead of using TX3 and RX3 (pins 4 and 6) as the lines of an independent serial channel, it is possible to use them as DTR and DSR lines, as is common.
To simplify the discussion, let's look at the RS232 port from the serial-over-IP application's point of view. This application defines 15 mapping options:
"Available signals" column shows a particular combination of I/O lines for each option. For example, option 0 defines the standard serial port arrangement with RX, TX, CTS, RTS, DSR, and DTR lines. Option 2 gives you one channel with RX, TX, CTS, and RTS lines, one more channel with just RX and TX lines, and yet another channel with a single RX line. The TX line is "missing" because, once again, there are only three outputs available. This is why this line is shown in gray (tx).