Motorola AT Commands G24-L Technické informace Strana 311

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 680
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 310
Chapter 3: AT Commands Reference
August 5, 2008 AT Commands Reference Manual 3-223
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
Zobrazit stránku 310
1 2 ... 306 307 308 309 310 311 312 313 314 315 316 ... 679 680

Komentáře k této Příručce

Žádné komentáře