Roving Networks RN-374 Bedienungsanleitung Seite 15

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 32
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 14
Advanced User Manual
www.rovingnetworks.com
rn-bluetooth-um Version 4.77 11/21/2009
809 University Avenue Los Gatos, CA 95032 Tel (408) 395-6539 info@RovingNetworks.com
~ 15 ~
Z Enters low power deep sleep mode (<2ma) when NOT connected. Can only be
exited by power cycling the device or toggling the RESET pin on the module
(causing a HARD reset). For more on managing power see section 5.
& Returns the value of the DIP switches on Serial adapters and USB-X dongle, or value
of GPIO 3,4,6,7 on other modules.
+ Local echo ON/OFF, when turned on in command mode all characters typed will be
echoed to the output. Typing + a second time will turn OFF local echo.
4.4
GPIO Commands
Each GPIO command takes 16 bit parameter made up of 2 bytes, a mask to specify the GPIO number and value for each
command. The first byte, the mask, determines which GPIO is affected by the command, and the second byte is the
value to set.
PARAMETER[15:0] = MASK[7...0]<<8 || VALUE[7..0]
CMD VALUE DESCRIPTION
@ <hexword> Set direction bits for GPIO
& <hexword> Set values for GPIO
% <hexword> Store powerup direction bits for GPIO
^ <hexword> Store powerup values for GPIO
* <hexword> Set values for PIO8,9,10,11
There are two registers used to control the GPIO, the first is a direction register. This controls whether the GPIO is an
input or an output. The second register is the value to apply to the GPIO if set to an output, or is the value of the built-in
weak pull-up resistor if the GPIO is set to an input. These settings are immediate, and do not survive a power cycle.
Examples: S@,8080 sets GPIO-7 to an output
S&,8080 drives GPIO-7 high
S&,8000 drives GPIO-7 low
Power-up values: These 2 registers will apply the direction and values upon each subsequent power-up:
Examples: S%,0101 sets GPIO-0 to an output on power-up
S^,0303 drives GPIO-0 high, and pulls up GPIO-1.
Multiple bits can be set with a single command, any bits with a mask of 0 are left unaffected.
Some GPIO are read at power-up time to perform certain functions, so care must be taken when manipulating them.
GPIO3 and GPIO6 are used to automatically set master mode, and auto discovery. If it is desired to use these GPIO for
other purposes at power-up, a special command must be used to disable their being sensed at power-up time. This
command is “SQ,4<cr>” this will set a flag in a stored register that is read at power-up. The Power-up settings for the
GPIO can also be viewed using the “O” (other settings) command.
WARNING: GPIO-4 is used by the system to reset stored parameters to factory defaults. If GPIO4 is pulled high on
power-up, and then toggled 3 times, all user settings will return to default values. Therefore this pin should not be used
as an output, and should not be driven high at power-up time (first 1 second of operation).
Seitenansicht 14
1 2 ... 10 11 12 13 14 15 16 17 18 19 20 ... 31 32

Kommentare zu diesen Handbüchern

Keine Kommentare