RN52 Bluetooth Audio Evaluation Kit User's Guide: 2014 Microchip Technology Inc. DS50002153A
RN52 Bluetooth Audio Evaluation Kit User's Guide: 2014 Microchip Technology Inc. DS50002153A
RN52 Bluetooth Audio Evaluation Kit User's Guide: 2014 Microchip Technology Inc. DS50002153A
• Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the
intended manner and under normal conditions.
• There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our
knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data
Sheets. Most likely, the person doing so is engaged in theft of intellectual property.
• Microchip is willing to work with the customer who is concerned about the integrity of their code.
• Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not
mean that we are guaranteeing the product as “unbreakable.”
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our
products. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts
allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.
QUALITY MANAGEMENT SYSTEM Microchip received ISO/TS-16949:2009 certification for its worldwide
CERTIFIED BY DNV headquarters, design and wafer fabrication facilities in Chandler and
Tempe, Arizona; Gresham, Oregon and design centers in California
and India. The Company’s quality system processes and procedures
== ISO/TS 16949 == are for its PIC® MCUs and dsPIC® DSCs, KEELOQ® code hopping
devices, Serial EEPROMs, microperipherals, nonvolatile memory and
analog products. In addition, Microchip’s quality system for the design
and manufacture of development systems is ISO 9001:2000 certified.
NOTES:
Table of Contents
Preface ........................................................................................................................... 7
Chapter 1. Overview
1.1 Introduction ................................................................................................... 13
1.2 RN52 Evaluation Kit Features ...................................................................... 13
1.3 RN52 Evaluation Kit Contents and Part Details ........................................... 14
1.4 RN-52-EK Evaluation Board ......................................................................... 15
1.5 RN52 Evaluation Kit Related Information Contents ..................................... 17
Chapter 2. Getting Started
2.1 Introduction ................................................................................................... 19
2.2 Hardware Requirements .............................................................................. 19
2.3 Power Up the Board ..................................................................................... 20
2.4 Using the Evaluation Kit ............................................................................... 20
Chapter 3. Application Demonstrations
3.1 Audio Demonstration .................................................................................... 27
3.2 HSP/HFP Demonstration ............................................................................. 28
Appendix A. RN52 Audio Evaluation Kits Schematics
A.1 Introduction .................................................................................................. 29
A.2 RN52 Evaluation Kits Schematic ................................................................. 29
A.3 RN52 Evaluation Kits PCB Layout and Assemble Drawings ....................... 31
A.4 RN52 Evaluation Kits Bill of Materials .......................................................... 34
A.5 RN52 Evaluation Kits Physical Dimensions ................................................. 35
Worldwide Sales and Service .................................................................................... 37
Preface
NOTICE TO CUSTOMERS
All documentation becomes dated, and this manual is no exception. Microchip tools and
documentation are constantly evolving to meet customer needs, so some actual dialogs and/
or tool descriptions may differ from those in this document. Please refer to our web site
(www.microchip.com) to obtain the latest documentation available.
Documents are identified with a “DS” number. This number is located on the bottom of each
page, in front of the page number. The numbering convention for the DS number is
“DSXXXXXA”, where “XXXXX” is the document number and “A” is the revision level of the
document.
For the most up-to-date information on development tools, see the MPLAB® IDE on-line help.
Select the Help menu, and then Topics to open a list of available on-line help files.
INTRODUCTION
This chapter contains general information that will be useful to know before using the
Product Name. Items discussed in this chapter include:
• Document Layout
• Conventions Used in this Guide
• Warranty Registration
• Recommended Reading
• The Microchip Web Site
• Development Systems Customer Change Notification Service
• Customer Support
• Document Revision History
DOCUMENT LAYOUT
This user’s guide describes how to use the RN52 Bluetooth Audio Evaluation Kit. The
document is organized as follows:
• Chapter 1. “Overview” – This chapter introduces the RN52 Bluetooth Audio
Evaluation Kit and provides an overview of various features.
• Chapter 2. “Getting Started” – This chapter describes the hardware
components and setup of the RN52 Bluetooth Audio Evaluation Kit.
• Chapter 3. “Application Demonstrations” – This chapter describes the
application demonstrations of the RN52 Bluetooth Audio Evaluation Kit.
• Appendix A. “RN52 Audio Evaluation Kits Schematics” – This appendix
includes a schematic of the RN-52-EK Evaluation Board, and the Bill of Materials.
DOCUMENTATION CONVENTIONS
Description Represents Examples
Arial font:
Italic characters Referenced books MPLAB® IDE User’s Guide
Emphasized text ...is the only compiler...
Initial caps A window the Output window
A dialog the Settings dialog
A menu selection select Enable Programmer
Quotes A field name in a window or “Save project before build”
dialog
Underlined, italic text with A menu path File>Save
right angle bracket
Bold characters A dialog button Click OK
A tab Click the Power tab
N‘Rnnnn A number in verilog format, 4‘b0010, 2‘hF1
where N is the total number of
digits, R is the radix and n is a
digit
Text in angle brackets < > A key on the keyboard Press <Enter>, <F1>
Courier New font:
Plain Courier New Sample source code #define START
Filenames autoexec.bat
File paths c:\mcc18\h
Keywords _asm, _endasm, static
Command-line options -Opa+, -Opa-
Bit values 0, 1
Constants 0xFF, ‘A’
Italic Courier New A variable argument file.o, where file can be
any valid filename
Square brackets [ ] Optional arguments mcc18 [options] file
[options]
Curly brackets and pipe Choice of mutually exclusive errorlevel {0|1}
character: { | } arguments; an OR selection
Ellipses... Replaces repeated text var_name [,
var_name...]
Represents code supplied by void main (void)
user { ...
}
WARRANTY REGISTRATION
Please complete the enclosed Warranty Registration Card and mail it promptly.
Sending in the Warranty Registration Card entitles users to receive new product
updates. Interim software releases are available at the Microchip web site.
RECOMMENDED READING
This user’s guide describes how to use the RN-52-EK Evaluation Board. Other useful doc-
uments are listed below. The following Microchip documents are available and recom-
mended as supplemental reference resources:
RN52 Bluetooth Audio Module Data Sheet (DS70005120)
PICDEM™ PIC18 Explorer Demonstration Board User’s Guide (DS51721)
Explorer 16 Development Board User’s Guide (DS51589)
Bluetooth Audio Module Command Reference User’s Guide (DS50002154)
CUSTOMER SUPPORT
Users of Microchip products can receive assistance through several channels:
• Distributor or Representative
• Local Sales Office
• Field Application Engineer (FAE)
• Technical Support
Customers should contact their distributor, representative or Field Application Engineer
(FAE) for support. Local sales offices are also available to help customers. A listing of
sales offices and locations is included in the back of this document.
Technical support is available through the web site at: http://support.microchip.com
Chapter 1. Overview
1.1 INTRODUCTION
This user’s guide describes the hardware and software setup for the RN52 Bluetooth®
Audio Evaluation Kit. This kit contains the hardware needed to evaluate the RN52
Bluetooth audio module. The RN52 module is mounted to an evaluation board that
demonstrates the module’s key features. The evaluation board contains:
• Dual-channel audio output and input
• Easy access to GPIO pins
• Built-in amplifier for stereo audio output
• 6 push buttons to control audio playback
• Status LEDs
• Connections for the programmer and UART interfaces
The RN52 supports the following Bluetooth profiles:
• A2DP stereo audio (Sink mode with support for Sub-Band Coding (SBC),
Advanced Audio Coding (AAC) and aptX® codecs
• AVRCP media player remote control
• HFP/HSP for accepting a phone call with 3-way calling and caller-ID support
• Support for Clear Voice Capture® (cVc) voice enhancement through HFP/HSP
• SPP (allows the module to receive serial data over the UART)
• iAP profile discovery for iOS devices
The evaluation kit can be used to configure and program the Bluetooth module using
the command interface, create connections, and transfer data. The command interface
is made up of simple ASCII commands. For more details, refer to the “RN52 Bluetooth
Audio Module Data Sheet”, “Bluetooth Audio Module Command Reference User’s
Guide”, and “Bluetooth Command Reference and Advanced Information User’s
Guide”.
For data sheet and other details related to RN52 module, refer to the Microchip web
site at http://www.microchip.com.
This chapter discusses the following topics:
• RN52 Evaluation Kit Features
• RN52 Evaluation Kit Contents and Part Details
• RN-52-EK Evaluation Board
• RN52 Evaluation Kit Related Information Contents
Note: Prior to the evaluation, install the FTDI driver for the USB cable. If the driv-
ers are not automatically installed, download and install the FTDI drivers
from the Microchip web site at http://ww1.microchip.com/down-
loads/en/DeviceDoc/FTDI-Drivers.zip for FTDI Chipset Drivers.
Depending on the development kit ordered, the package contains the following:
• RN-52-EK Board - Contains the Bluetooth module and connectors. Supports
Standard application firmware (A2DP/AVRCP/SPP) master and slave
• Mini-USB cable - Links user’s computer to the evaluation board
• Stereo mini-speakers - Rechargeable battery-powered speakers
Table 1-1 lists the part number of RN-52-EK Evaluation Kit.
RN-52-EK
RN52 Evaluation board
USB cable
Stereo mini-speakers
Status Previous
LEDs Track Pause/Play
USB to UART
(SPP & Command Mode) Volume
Down
Dual Channel
Audio Inputs
Audio Out
3.5 mm Stereo Jack
1 2 3 4 5 6 7 8 9 10 11 12
1 3 5 7 9 11 13 15 1 3 5 7 9
15 GND 1 MIC_R
16 3.3 V 2 GND Pin Description
1 MIC_L
2 GND
Note: All the factory-shipped RN modules are available with firmware version and
profile details. For more information on RN module links, refer to “Bluetooth
Audio Module Command Reference User’s Guide and Bluetooth Com-
mand Reference and Advanced Information User’s Guide” from the Micro-
chip web site http://www.microchip.com.
Note: If the drivers are not automatically installed, download and install the FTDI
drivers from the Microchip web site at http://ww1.microchip.com/down-
loads/en/DeviceDoc/FTDI-Drivers.zip for FTDI Chipset Drivers.
3. Note down the assigned computer COM port to which the RN-52-EK is attached
through the cable connected.
4. Connect the portable mini-speaker 3.5 mm to the stereo audio out connector
(J9).
Figure 2-1 shows the completed hardware setup for the evaluation board.
Note: For detailed information on the ASCII comands used to configure the Blue-
tooth module, refer to the “Bluetooth Command Reference and Advanced
Information User’s Guide”.
Note: User can only configure the Bluetooth audio module locally using host com-
puter’s serial port. The module cannot be configured remotely over the
Bluetooth link.
Note: Depending on the operating system, the users can opt to use either the
TeraTerm (Windows OS) or CoolTerm (Mac OS-X) terminal emulator pro-
grams.
Note: Local configuration can be used at any time when the device does NOT
have a Bluetooth connection, as well as under certain conditions. If the
device is in Configuration mode and a connection occurs, the device exits
Configuration mode and data passes back and forth from the remote
device.
To place the module on the RN-52-EK evaluation board into Command mode, connect
a jumper to header pins 5 (GPIO9) and 6 (GND) on J3. Refer to Figure 2-4 and its Con-
nector-Pin details. After entering Command mode, the module sends CMD to the UART
as acknowledgement.
GPIO9
2.4.4.1 DISCOVERY
When the RN-52-EK is turned on, the Blue and Red LED should blink and the adapter
should be discoverable. Open the host PC’s Bluetooth device manager and choose to
add a new device. The Bluetooth device manager’s icon is located at the bottom right
corner on the host’s computer screen in the taskbar for Windows; and at the upper right
corner for Mac OS-X. The Bluetooth device manager displays a list of discoverable
Bluetooth devices. The board displays as RN52-XXXX, where XXXX is the last 4-digits
of the module’s MAC address.
2.4.4.2 PAIRING
The module supports the following pairing methods:
• Legacy Pairing using PIN code
• Secure Simple Pairing (SSP)
- Just Works
- Numeric Comparison using Yes/No Keyboard IO
The RN-52 module can be configured through command console to use either of the
above pairing methods.
To pair with the module, double click its name in the Bluetooth device scan list. The
default authentication mode is Just Works which requires no user interaction. The link
key is generated, stored and a connection gets established. For subsequent connec-
tions, the stored link keys are compared and the connection is established. The mod-
ule’s firmware automatically stores up to 8 pairings from remote hosts in a first in, first
out fashion.
If the remote Bluetooth device does not require authentication, a connection can occur
without the pairing process. However, the Bluetooth specification requires that if either
device involved in the pairing process requires authentication, the other device must
participate to ensure a secure link. Microchip modules default to Just Works mode and
do not require authentication.
In numeric comparison using yes/no keyboard IO mode, the user is shown a 6-digit
number on both the module console and the pairing device display. The user has to ver-
ify that the numbers match or do not match on both devices by entering yes or no. A
command is provided to enter yes or no on the module command console.
In legacy pairing mode, the pairing device requests a 4-digit fixed PIN for authentica-
tion. In this case, use the module’s default PIN code, 1234, as the pass key. After enter-
ing the PIN code, the Bluetooth devices are compared. If a match is found, a link key
is generated and stored. Usually, but not always, the remote device stores the link key.
For subsequent connections, the devices compare link keys. If correct, there is no need
to re-enter the PIN code. The PIN code can be set as desired using command console.
To remove the stored link key on the remote device, you typically “unpair” or remove
the device from the Bluetooth manager. The pairing information can be reset by exe-
cuting the reset Paired Device List (PDL) on the command console. You can change
the PIN code to remove the link key on the Bluetooth adapter, forcing a new pin code
exchange to occur upon subsequent connection attempts.
Note: For detailed information on the pairing mode commands, refer to the “Blue-
tooth Command Reference and Advanced Information User’s Guide”.
2.4.4.3 CONNECTING
If the pairing with the device is successful, the module can connect to the device. Click
connect using the pair/connect interface to establish a connection.
Once connected, the module enables Advanced Audio Distribution Profile (A2DP) for
audio playback and Audio Video Remote Control Profile (AVRCP) for player control.
Additionally, a Serial Port Profile (SPP) link can be established by opening the virtual
COM port available on the RN52 module from a PC over its Bluetooth device.
When connecting to a PC using SPP, after the Bluetooth device manager completes
pairing/connecting, it issues a message that the Bluetooth device is installed on COM
port X where the specific COM port is unique to the user’s computer. After connecting
successfully, the data can be transmitted and received on the Bluetooth COM port link
in Data mode.
In some cases, the Bluetooth device manager creates two COM ports. In this situation,
use the incoming port to wait for the module to initiate a connection. Open the outgoing
port to establish a connection to the module.
Previous
Pause/Play
Track
Next
Track
Volume
Down
The RN-52 module supports SBC codec, AAC and aptX optional codecs for audio play-
back using A2DP profile. The optional codec is negotiated during connection if sup-
ported on the connecting device. If optional codecs are not supported, the RN-52
A.1 INTRODUCTION
This appendix provides the RN52 Evaluation Boards schematic, PCB layout and Bill of
Materials (BOM).
• RN52 Evaluation Kits Schematic
• RN52 Evaluation Kits PCB Layout and Assemble Drawings
• RN52 Evaluation Kits Bill of Materials
• RN52 Evaluation Kits Physical Dimensions
C4
3.3V D1 VBUS
VBUS J11
RN52 EVALUATION BOARD SCHEMATIC
10nF
R1 1 R14
PI O3 MBR120 2
22k J2 47k
1 Battery
R8 R9 VBUS
USBD- 2 VBUS
47R 470 D-
USBD+ 3 6
D+ MTAB
5 C21 C15 C16
R2 GND R15 10uF 100nF
SPKR_L - C20
47k 22k
D3 D2 1uF
10
USB Mini B / RSVD USB C22
L ED0 SPKR_L + R17 100uF
V DD
Blue LED Red LED SPKR_R- MI C_L + 22k 2 C23
1 2 1uF IN1-
L ED1 SPKR_L - MI C_R+ 1
3 4 R16 Vo1
SPKR_R+ MI C_L - 3
5 6 IN1+ 100uF
Wake SPKR_L + MI C_R- 47k
7 8
3.3V MI C_BI AS C18 1J9
9 10
4 6 2
BYPASS SHUTDOWN
PCM_IN S5 J7 5
1uF 3
PCM_OUT VBUS R11 7 C17 4
IN2+
PWREN UART_TX 47k 9
1 2 Vo2
PCM_SYNC UART_RX AI O0 C14 8 Headphones
3 4 R13 IN2-
GND
100uF
PA D
PI O6 PI O9 SPKR_R+
5 6
PCM_CL K PCM_I N 22k C19
7 8
11
PI O7 PCM_OUT 1uF C13
9 10 R12
3.3V PCM_SYNC SPKR_R- U4
11 12 100uF
PCM_CL K 22k TPA6112
13 14 1uF
M1
15 16 3.3V
RN52 Module
27
26
25
24
23
22
21
20
19
18
J3
1
EXT Connector PI O2
GND
V DD
GPIO6
GPIO7
GND
PWR E N
PCM_IN
PCM_SY NC
PCM_OUT
PCM_CL K
2 R10
PI O4
3
SPI _SS 28 17 UART_RX BTN_VOLUP 47k
SPI _SS UART_RX 4
BTN_NEXT C3
5
SPI _MI SO 29 16 UART_TX BTN_PLAY
SPI_MISO UART_TX 6
MI CL BTN_PREVI OUS
7 100nF
SPI _SCK 30 15 UART_CTS MI C_L BTN_VOLDOWN VBUS
SPI_SCK UART_CTS 1 8
PI O7 C2 C1
2 9
SPI _MOSI 31 14 UART_RTS PI O6
SPI_MOSI UART_RTS 10
J8 PWREN
11 100nF 100nF
L ED1 32 13 USBD+ MI CR
L ED1 USBD+ 3.3V 12
MI C_R
1
19
16
L ED0 33 12 USBD- J10 VBUS
1
L ED0 USBD- 2
MI C_BI AS U1
V CCIO
V CC
3V 3OUT
MI C_BI AS 34 11 PI O9 J6 4J5 UART_RX R70 2k2 30 FT232RQ
MIC_BIAS GPIO9 C8 C9 C12 R6 R7 TXD
3 UART_TX 2
47nF 47nF 1uF 2k2 2k2 RXD
MI C_L + 35 10 BTN_VOL DOWN MI C_L + 5 UART_CTS 32 J1
MIC_L+ GPIO10 RTS
MI C_R+ 2 UART_RTS 8 15 1
CTS USBDM VBUS
MI C_R+ 36 9 BTN_PREVI OUS 1 31 2
MIC_R+ GPIO11 DTR D-
C10 Mic 6 3 6
DSR D+ MTAB
MI C_L - 37 8 BTN_PLAY MI C_L - MI C_L 7 14
MIC_L- GPIO13 DCD USBDP
C11 3 5
47nF RI GND
MI C_R- 38 7 BTN_NEXT MI C_R- MI C_R
MIC_R- GPIO12
18 USB Mini B / CSR UART
47nF RESET
39 6 BTN_VOL UP TC1262- 3.3V U2 22
AGND GPIO5 CBUS0
VBUS 3.3V 21
CBUS1
SPKR_R- 40 5 PI O4 Vol Up 1 3 10 27
SPKR_R- GPIO4 Vin Vout CBUS2 OSCI
11
CBUS3
FIGURE A-1:
GND
SPKR_L - 41 4 AI O0 BTN_VOL UP 9
T ab
SPKR_L- AIO0 CBUS4
T HPA D
Vol Down C6 C7 28
A GND
S4 OSCO
T E ST
GND
GND
GND
2
4
SPKR_R+ 42 3 PI O2 1uF 1uF
SPKR_R+ GPIO2
BTN_VOL DOWN
20
17
4
24
33
26
SPKR_L + 43 2 PI O3 Play / Pause S2
SPKR_L + GPIO3
BTN_PL AY
S3 Next J4
44 1 SPI _MI SO
GND GND 1
BTN_NEXT SPI _MOSI
2
GND
GND
GND
GND
GND
GND
Prev S6 SPI _SCK
3
SPI _SS
4
BTN_PREVI OUS
45
46
47
48
49
50
3.3V 5
S1 6
SPI MASTER
DS50002153A-page 30
RN52 Audio Evaluation Kits Schematics