Additional Information on Serial Port Lines
This topic contains information related to programming of the EM1202EV. It assumes that you are familiar with Tibbo BASIC/C and the concept of "platforms". Everything you need to know regarding this can be found in TIDE, TiOS, Tibbo BASIC, and Tibbo C Manual.
You can create Tibbo BASIC/C applications for the EM1202EV using two different platforms — the "DS1202" platform and "EM1202" platform. The DS1202 platform can be used because the EM1202EV is, essentially, a DS1202 device without the plastic housing. The EM1202 platform can be used because the board is based on the EM1202 module.
Generally speaking, the EM1202 platform offers "more". It addresses every hardware faculty of the EM1202. The DS1202 platform is much more limited and only includes features that can be used when the EM1202 module is mounted on the EM1202EV board (inside the DS1202 device).
The biggest difference between the two platforms is in how the I/O lines are wired. The EM1202 platform defines 32 I/O lines. Half of these are not used on the EM1202EV, and the remaining lines are interconnected. Each line of the serial port (save for the "spare" line discussed previously) is connected to two GPIO lines of the EM1202. This was done to ensure more flexible mapping (see Multi-Channel Serial Port). Care should be taken to avoid enabling both outputs of the same serial port line simultaneously! This can permanently damage the EM1202. We suggest that you use GPIO8/P1.0/RX0 - GPIO14/P1.6/RX3 for actual input/output and use GPIO16/P2.0/INT0 - GPIO19/P2.3/INT3 as interrupt inputs only.
The DS1202 platform "looks" at the same hardware differently and defines fewer I/O lines. Each of the physical line pair is represented by a single GPIO line. GPIO lines of the EM1202 that are unused are not defined at all.
GPIO lines of the EM1202 platform — two lines are connected to each serial port line, except in the case of the "spare" input |
GPIO lines of the DS1202 platform |
DB9M pin and its conventional function ("-RS") |
TTL connector pin ("-TS", "-TM") |
|
GPIO8/P1.0/RX0 |
GPIO16/P2.0/INT0 |
PL_IO_NUM_0_RX0_INT0 |
#2 (RX input) |
#6 |
GPIO9/P1.1/TX0 |
GPIO20/P2.4/INT4 |
PL_IO_NUM_1_TX0_INT4 |
#3 (TX output) |
#5 |
GPIO10/P1.2/RX1 |
GPIO17/P2.1/INT1 |
PL_IO_NUM_2_RX1_INT1 |
#8 (CTS input) |
#4 |
GPIO11/P1.3/TX1 |
GPIO21/P2.5/INT5 |
PL_IO_NUM_3_TX1_INT5 |
#7 (RTS output) |
#3 |
GPIO12/P1.4/RX2 |
GPIO18/P2.2/INT2 |
PL_IO_NUM_4_RX2_INT2 |
#6 (DSR input) |
#7 |
GPIO13/P1.5/TX2 |
GPIO22/P2.6/INT6 |
PL_IO_NUM_5_TX2_INT6 |
#4 (DTR output) |
#8 |
GPIO14/P1.6/RX3 |
GPIO19/P2.3/INT3 |
PL_IO_NUM_6_RX3_INT3 |
#9 (RI input) |
#2 |
--- |
GPIO23/P2.7/INT7* |
PL_IO_NUM_7_INT7 |
#1 (CD input)* |
#1* |
* Spare input (see above).