Motorola G24 Guide Developer's Manual page 300

At commands
Hide thumbs Also See for G24 Guide:
Table of Contents

Advertisement

Hardware Information
Data sending (vector example):
Client has a data bus with 8 bits and plans to implement some protocol over it. In this example 4 pins (pins
1-4) are used as an output and 4 pins (5-8) are used as input.
Example of code is as follows:
AT+MIOD=00001111,0// Set IO pins 1-4 to be output level mode.
OK
AT+MIOD=11110000,1// Set IO pins 5-8 to be input level mode.
OK // Unnecessary, because by default all pins are input.
AT+MIOD?// (Optional) Read the IO pin definitions to confirm correct settings.
+MIOD: 11110000// Pins 1-4 output pins 5-8 input.
OK // At this point the module is configured to control the logic values of
all pins.
AT+MIOC=00001111,00000011// Write vector, 0x3 on pins 1-4.
OK // (pins 1,2 high, pins 3,4 low).
AT+MIOC?// Read the pins status.
+MIOC: 01000011// Pins 1,2,7 show the logical value high.
OK
AT+MIOC=00001111,00000000// Write vector 0x0 on pins 1-4.
OK
AT+MIOC?// (Optional) read the pins status.
+MIOC: 01110000// Pin 1-4 low, pins 5,6,7 show logical high.
OK
3-216
AT Commands Reference Manual
December 31, 2007

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents