Motorola AT Commands G24-L Informazioni Techniche Pagina 257

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 522
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 256
Chapter 3: AT Commands Reference
January 31, 2007 AT Commands Reference Manual 3-181
Data sending (vectoe 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=000001111,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
Vedere la pagina 256
1 2 ... 252 253 254 255 256 257 258 259 260 261 262 ... 521 522

Commenti su questo manuale

Nessun commento