Mioc parameters -145 – PIONEERPOS AT Commands G24-LC User Manual
Page 209

Chapter 3: AT Commands Reference
April 15, 2008
G24-L AT Commands Reference Manual
3-145
The following table shows the +MIOC parameters.
Example
AT+MIOC=?
+MIOC: (00000000-11111111),(00000000-11111111)
OK
Light control example:
Client has an electronic controlled light switch. The intent is to connect this switch to the G24-L (IO pin 5 -
for example) and control the light by setting the logical values of pin 5.
Example of code is as follows:
AT+MIOD=00010000,0
// Set IO pin #5 to be output.
OK
AT+MIOD?
// (Optional) Read the IO pin definitions to confirm correct settings.
+MIOD: 11101111
// Pins 1-4 and 6-8 are input pins. Pin 5 is output.
OK
// At this point the module is configured to control the logic values of
pin 5.
AT+MIOC=00010000, 00010000
// Turn on the light by setting pin 5 to high.
AT+MIOC?
// (Optional) read the pins status.
+MIOC: 00010000
// Pin 5 is set to high.
OK
AT+MIOD=00010000,0, 00010000
// All previous defined in one command.
OK
AT+MIOC=00010000,00000000
// Turn off the light by setting pin 5 to low.
OK
AT+MIOC?
// (Optional) read the pins status.
+MIOC: 00000000
// Pin 5 is set to low.
OK
Table 3-95: +MIOC Parameters
Description
Selected pins for the action invoked. This is a binary vector in which each bit points to
pin number. Vector size is 8.
0
Not selected
1
Selected pin (default)
This is a binary vector in which each bit show the physical value of pin. Data vector
size is 8.
0
Physical low signal.
1
Physical high signal (default).
The default value:
On Power Up - as previously saved in FLEX bytes.
Before set command first used with and
without and before +MIOC command used - 1.