AT commands I/O sampling commands
Digi XBee3 Cellular LTE-M Global Smart Modem User Guide
124
M0 (PWM0 Duty Cycle)
Sets the duty cycle of PWM0 (pin 6) for P0 = 2, where a value of 0x200 is a 50% duty cycle.
Before setting the line as an output:
1. Enable PWM0 output (P0 (DIO10/PWM0 Configuration) = 2).
2. Apply the settings (use CN (Exit Command mode) or AC (Apply Changes)).
The PWM period is 42.62 µs and there are 0x03FF (1023 decimal) steps within this period. When M0 = 0
(0% PWM), 0x01FF (50% PWM), 0x03FF (100% PWM), and so forth.
Parameter range
0 - 0x3FF
Default
0
I/O sampling commands
The following AT commands configure I/O sampling parameters.
TP (Temperature)
Displays the temperature of the XBee Smart Modem in degrees Celsius. The temperature value is
displayed in 8-bit two’s complement format. For example, 0x1A = 26 °C, and 0xF6 = -10 °C.
Parameter range
0 - 0xFF which indicates degrees Celsius displayed in 8-bit two's complement format.
Default
N/A
IS (Force Sample)
When run, IS reports the values of all of the enabled digital and analog input lines. If no lines are
enabled for digital or analog input, the command returns an error.
Command mode
In Command mode, the response value is a multi-line format, individual lines are delimited with
carriage returns, and the entire response terminates with two carriage returns. Each line is a series of
ASCII characters representing a single number in hexadecimal notation. The interpretation of the lines
is:
n Number of samples. For legacy reasons this field always returns 1.
n Digital channel mask. A bit-mask of all I/O capable pins in the system. The bits set to 1 are
configured for digital I/O and are included in the digital data value below. Pins D0 - D9 are bits 0
- 9, and P0 - P2 are bits 10 - 12.
n Analog channel mask. The bits set to 1 are configured for analog I/O and have individual
readings following the digital data field.