RN-21-U Roving Networks Inc, RN-21-U Datasheet - Page 15
![no-image](/images/no-image-200.jpg)
RN-21-U
Manufacturer Part Number
RN-21-U
Description
MODULE BLUETOOTH 2.0/EDR CLASS1
Manufacturer
Roving Networks Inc
Specifications of RN-21-U
Frequency
2.4GHz Center
Data Rate - Maximum
921kBaud
Modulation Or Protocol
FHSS
Applications
Bluetooth v2.0
Power - Output
16dBm
Sensitivity
-86dBm
Voltage - Supply
3 V ~ 3.6 V
Current - Receiving
60mA
Current - Transmitting
100mA
Data Interface
PCB, Surface Mount
Memory Size
8MByte Flash
Antenna Connector
PCB, Surface Mount
Operating Temperature
-40°C ~ 85°C
Package / Case
Module
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
4.4
www.rovingnetworks.com
Z
&
+
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.
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
Power-up values: These 2 registers will apply the direction and values upon each subsequent power-up:
Examples: S%,0101
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.
809 University Avenue
S&,8080
S&,8000
S^,0303
PARAMETER[15:0] = MASK[7...0]<<8 || VALUE[7..0]
CMD
@
%
&
^
*
drives GPIO-0 high, and pulls up GPIO-1.
sets GPIO-0 to an output on power-up
drives GPIO-7 high
drives GPIO-7 low
sets GPIO-7 to an output
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.
•
Los Gatos, CA 95032
<hexword>
<hexword>
<hexword>
<hexword>
<hexword>
VALUE
Store powerup direction bits for GPIO
Store powerup values for GPIO
~ 15 ~
Set values for PIO8,9,10,11
•
Set direction bits for GPIO
Tel (408) 395-6539
Set values for GPIO
DESCRIPTION
rn-bluetooth-um Version 4.77 1/24/2011
Advanced User Manual
• info@RovingNetworks.com