Enum pl_io_num

Enum pl_io_num contains the list of constants that refer to available general-purpose I/O (GPIO) lines. Use these constants when selecting the line with the io. object (see the io.num property).

Note that GPIO lines are of the unidirectional type and require explicit configuration as outputs or inputs. Some lines are configured as inputs or outputs automatically — see the notes at the bottom of the page.

A warning note icon.The DS1102 has the RS232 transceiver IC onboard. This IC "dictates" the GPIO line direction for certain lines. Do not try to use GPIO lines 0, 2, 4, and 6 as outputs — this can permanently damage the hardware.


Enum pl_io_num includes the following constants:

0 — PL_IO_NUM_0_RX0_INT0(1):

General-purpose I/O line 0 (P0.0). This line is also the RX/W1in/din input of serial port(3) 0 and interrupt line 0.

1 — PL_IO_NUM_1_TX0_INT1(2):

General-purpose I/O line 1 (P0.1). This line is also the TX/W1out/dout output of serial port(3) 0 and interrupt line 1.

2 — PL_IO_NUM_2_RX1_INT2(1):

General-purpose I/O line 2 (P0.2). This line is also the RX/W0&1in/din input of serial port(3) 1 and interrupt line 2.

3 — PL_IO_NUM_3_TX1_INT3(2):

General-purpose I/O line 3 (P0.3). This line is also the TX/W1out/dout output of serial port(3) 1 and interrupt line 3.

4 — PL_IO_NUM_4_RX2_INT4(1):

General-purpose I/O line 4 (P0.4). This line is also the RX/W0&1in/din input of serial port(3) 2 and interrupt line 4.

5 — PL_IO_NUM_5_TX2_INT5(2):

General-purpose I/O line 5 (P0.5). This line is also the TX/W1out/dout output of serial port(3) 2 and interrupt line 5.

6 — PL_IO_NUM_6_RX3_INT6(1):

Not implemented.

7 — PL_IO_NUM_7_EMPTY:

Not implemented.

8 — PL_IO_NUM_8_PWROUT:

Not implemented.

9 — PL_IO_NUM_9:

Pin 8 on the wireless interface connector.

10 — PL_IO_NUM_10:

Pin 6 on the wireless interface connector.

11 — PL_IO_NUM_11:

The RST line of the wireless interface.

12 — PL_IO_NUM_12:

The DI line of the wireless interface.

13 — PL_IO_NUM_13:

The DO line of the wireless interface.

14 — PL_IO_NUM_14:

The CLK line of the wireless interface.

15 — PL_IO_NUM_15:

The CS line of the wireless interface.

16 — PL_IO_NUM_16:

Pin 9 on the wireless interface connector.

17 — PL_IO_NUM_17_RSMD:

Serial port mode: HIGH for RS422/485, LOW for RS232.

18 — PL_IO_NUM_18_HDFD:

Serial port mode: HIGH for full-duplex, LOW for half-duplex.

19 — PL_IO_NUM_19_SB1:

LED bar, LED#1 (the "weakest signal" LED).

20 — PL_IO_NUM_20_SB2:

LED bar, LED#2.

21 — PL_IO_NUM_21_SB3:

LED bar, LED#3.

22 — PL_IO_NUM_22_SB4:

LED bar, LED#4.

23 — PL_IO_NUM_23_SB5:

LED bar, LED#5 (the "strongest signal" LED).

24 — PL_IO_NUM_24_OLED_D0:

OLED dispay data bus, line 0 (P0.0).

25 — PL_IO_NUM_25_OLED_D1:

OLED dispay data bus, line 1 (P0.1).

26 — PL_IO_NUM_26_OLED_D2:

OLED dispay data bus, line 2 (P0.2).

27 — PL_IO_NUM_27_OLED_D3:

OLED dispay data bus, line 3 (P0.3).

28 — PL_IO_NUM_28_OLED_D4:

OLED dispay data bus, line 4 (P0.4).

29 — PL_IO_NUM_29_OLED_D5:

OLED dispay data bus, line 5 (P0.5).

30 — PL_IO_NUM_30_OLED_D6:

OLED dispay data bus, line 6 (P0.6).

31 — PL_IO_NUM_31_OLED_D7:

OLED dispay data bus, line 7 (P0.7).

32 — PL_IO_NUM_32_OLED_CS:

OLED display, CS control line.

33 — PL_IO_NUM_33_OLED_RD:

OLED display, RD control line.

34 — PL_IO_NUM_34_OLED_WR:

OLED display, WR control line.

35 — PL_IO_NUM_35_OLED_DC:

OLED display, DC control line.

36 — PL_IO_NUM_36_OLED_RST:

OLED display, RST control line.

37 — PL_IO_NUM_37_CO:

General-purpose I/O line 37 (does not belong to any 8-bit port), also a square wave output controlled by the beep. object. This output drives a buzzer.

38 — PL_IO_NULL:

This is a NULL line that does not physically exist. The state of this line is always detected as LOW. Setting this line has no effect.

  1. When a serial port is in the UART mode (ser.mode = 0 — PL_SER_MODE_UART), this line is automatically configured to be an input when this serial port is enabled (ser.enabled = 1 — YES) and returns to the previous input/output and HIGH/LOW state when this serial port is closed (ser.enabled = 0 — NO).
  2. When a serial port is in the UART mode (ser.mode = 0 — PL_SER_MODE_UART), this line is automatically configured to be an output when the serial port is enabled (ser.enabled = 1 — YES) and returns to the previous input/output and HIGH/LOW state when the serial port is closed (ser.enabled = 0 — NO).
  3. In this list, the term "serial port" actually refers to "serial channel."