The PIC-BLE Development Board is a small and easily expandable demonstration and development platform for
Bluetooth® Low Energy (BLE) solutions based on the PIC® microcontroller architecture. It is designed to demonstrate
that the design of a typical BLE application can be simplified by partitioning the task into three blocks:
• Smart – represented by the PIC16LF18456 microcontroller
• Secure – represented by the ATECC608A secure element
• Connected – represented by the RN4870 BLE module
In addition, the PIC-BLE Development Board features the following elements:
• The on-board debugger (PKoB nano) supplies full programming and debugging support through Microchip
MPLAB® X IDE. It also provides access to a serial port interface (serial to USB bridge) and one logic analyzer
channel (debug GPIO).
• A mikroBUS™ socket enables the ability to expand the board capabilities with the selection from 450+ sensors
and actuators options offered by MikroElektronika (www.mikroe.com) via a growing portfolio of Click board™.
The Microchip Website.................................................................................................................................28
Out of the box, the PIC-BLE board comes programmed with the pic-lightblue-explorer-demo. This application can be
used to demonstrate a number of the board features using the LightBlue® app by Punch Through.
1.Download the LightBlue® app for iOS or Android.
2.Power the board through a Micro-USB cable or CR2032 battery.
3.Open the LightBlue® app and select the PIC-BLE peripheral.
4.Use the custom interface to explore the board.
Info: The PIC-BLE will show up in the LightBlue® app as PIC-BLE_xxxx, where xxxx are the last two
bytes of the RN4870 BLE module’s Bluetooth MAC address. This makes it possible to distinguish between
multiple PIC-BLE boards.
Communication between the demo application and the LightBlue® app is done by using a protocol based on ASCII
packets. Refer to the protocol chapter on the pic-lightblue-explorer-demo page for a list of commands with examples,
as well as the full source code for the project.
Development Requirements
MPLAB® X IDE:
• MPLAB X IDE v5.30 or later
• XC8 Compiler v2.10 or later
For help with installation, view the MPLAB X installation guide.
Build an Application
View the default source code that is pre-loaded onto the development board. Explore, modify, and build off this
source code to create a custom application.
1.View the source code at the pic-lightblue-explorer-demo GitHub page.
2.Read through the README.md to get more information on how to expand the solution.
3.Download the project from GitHub and open it in the latest version of MPLAB® X IDE.
4.Connect a USB cable (Standard-A to Micro-B or Micro-AB) between the Windows, Mac or Linux device, and
the debug USB port on the PIC-BLE. The board will be identified in the kit window in MPLAB® X IDE.
5.Explore, modify, and build off the source code.
6.Make and program the device. Select the PKoB nano serial number as the debug tool when prompted.
Driver Installation
When the board is connected to the computer for the first time, the operating system will perform a driver software
installation. The driver file supports both 32- and 64-bit versions of Microsoft® Windows® XP, Windows Vista®,
Windows 7, Windows 8, and Windows 10. The drivers for the board are included with Microchip MPLAB® X IDE.
Kit Window
Once the board is powered, the green status LED will be lit and Microchip MPLAB® X IDE will auto-detect which
boards are connected. Microchip MPLAB® X IDE will present relevant information like data sheets and board
documentation. The PIC16LF18456 device on the PIC-BLE board is programmed and debugged by the on-board
debugger, and therefore, no external programmer or debugger tool is required.
Tip: The Kit Window can be opened in MPLAB® X IDE through the menu bar Window > Kit Window
2.2 Design Documentation and Relevant Links
The following list contains links to the most relevant documents and software for the PIC-BLE Board:
• MPLAB® X IDE - MPLAB X IDE is a software program that runs on a PC (Windows®, Mac OS®, Linux®) to
develop applications for Microchip microcontrollers and digital signal controllers. It is called an Integrated
Development Environment (IDE) because it provides a single integrated “environment” to develop code for
embedded microcontrollers.
• MPLAB® Xpress Cloud-based IDE - MPLAB Xpress Cloud-Based IDE is an online development environment
that contains the most popular features of our award-winning MPLAB X IDE. This simplified and distilled
application is a faithful reproduction of our desktop-based program, which allows users to easily transition
between the two environments.
• MPLAB® Code Configurator - MPLAB Code Configurator (MCC) is a free software plug-in that provides a
graphical interface to configure peripherals and functions specific to your application.
• Microchip Sample Store - Microchip sample store where you can order samples of devices.
• MPLAB Data Visualizer - MPLAB Data Visualizer is a program used for processing and visualizing data. The
Data Visualizer can receive data from various sources such as serial ports and on-board debugger’s Data
Gateway Interface, as found on Curiosity Nano and Xplained Pro boards.
• Microchip PIC and AVR Examples - Microchip PIC and AVR Device Examples is a collection of examples and
labs that use Microchip development boards to showcase the use of PIC and AVR device peripherals.
• Microchip PIC and AVR Solutions - Microchip PIC and AVR Device Solutions contains complete applications
for use with Microchip development boards, ready to be adapted and extended.
• PIC-BLE website - Kit information, latest user guide and design documentation.
• PIC-BLE on Microchip Direct - Purchase this kit on Microchip Direct.
PIC-BLE contains an on-board debugger for programming and debugging. The on-board debugger is a composite
USB device consisting of several interfaces:
• A debugger that can program and debug the PIC16LF18456 in Microchip MPLAB® X IDE
• A mass storage device that allows drag-and-drop programming of the PIC16LF18456
• A virtual serial port (CDC) that is connected to a Universal Asynchronous Receiver/Transmitter (UART) on the
PIC16LF18456, and provides an easy way to communicate with the target application through terminal software
• A Data Gateway Interface (DGI) for code instrumentation with logic analyzer channels (debug GPIO) to visualize
program flow
The on-board debugger controls a Power and Status LED (marked PS) on the PIC-BLE Board. The table below
shows how the LED is controlled in different operation modes.
Table 3-1. On-Board Debugger LED Control
Operation ModePower and Status LED
Hardware User Guide
Boot Loader modeThe LED blinks slowly during power-up.
Power-upThe LED is ON.
Normal operationThe LED is ON.
ProgrammingActivity indicator: The LED blinks slowly during programming/debugging.
Drag-and-drop
programming
FaultThe LED blinks rapidly if a power Fault is detected.
Sleep/OffThe LED is OFF. The on-board debugger is either in a sleep mode or powered down.
3.1.1 Debugger
The on-board debugger on the PIC-BLE Board appears as a Human Interface Device (HID) on the host computer’s
USB subsystem. The debugger supports full-featured programming and debugging of the PIC16LF18456 using
Microchip MPLAB® X IDE.
Success:The LED blinks slowly for 2 sec.
Failure:The LED blinks rapidly for 2 sec.
This can occur if the board is externally powered.
Info: Slow blinking is approximately 1 Hz, and rapid blinking is approximately 5 Hz.
Remember: Keep the debugger’s firmware up-to-date. Firmware upgrades are done automatically when
using Microchip MPLAB® X IDE.
3.1.2 Virtual Serial Port (CDC)
The virtual serial port (CDC) is a general purpose serial bridge between a host PC and a target device.
The on-board debugger implements a composite USB device that includes a standard Communications Device Class
(CDC) interface, which appears on the host as a virtual serial port. The CDC can be used to stream arbitrary data in
both directions between the host computer and the target: All characters sent through the virtual serial port on the
host computer will be transmitted as UART on the debugger’s CDC TX pin, and UART characters captured on the
debugger’s CDC RX pin will be returned to the host computer through the virtual serial port.
Figure 3-1. CDC Connection
Hardware User Guide
Info: As shown in Figure 3-1, the debugger’s CDC TX pin is connected to a UART RX pin on the target
for receiving characters from the host computer. Similarly, the debugger’s CDC RX pin is connected to a
UART TX pin on the target for transmitting characters to the host computer.
3.1.2.2 Operating System Support
On Windows machines, the CDC will enumerate as Curiosity Virtual COM Port and appear in the Ports section of the
Windows Device Manager. The COM port number can also be found there.
Info: On older Windows systems, a USB driver is required for CDC. This driver is included in installations
of Microchip MPLAB® X IDE.
On Linux machines, the CDC will enumerate and appear as /dev/ttyACM#.
Info: tty* devices belong to the “dialout” group in Linux, so it may be necessary to become a member of
that group to have permissions to access the CDC.
On MAC machines, the CDC will enumerate and appear as /dev/tty.usbmodem#. Depending on which terminal
program is used, it will appear in the available list of modems as usbmodem#.
Info: For all operating systems: Be sure to use a terminal emulator that supports DTR signaling. See
Section 3.1.2.4 “Signaling”.
3.1.2.3 Limitations
Not all UART features are implemented in the on-board debugger CDC. The constraints are outlined here:
• Baud rate: Must be in the range of 1200 bps to 500 kbps. Any baud rate outside this range will be set to the
closest limit, without warning. Baud rate can be changed on-the-fly.
• Character format: Only 8-bit characters are supported.
During USB enumeration, the host OS will start both communication and data pipes of the CDC interface. At this
point, it is possible to set and read back the baud rate and other UART parameters of the CDC, but data sending and
receiving will not be enabled.
When a terminal connects on the host, it must assert the DTR signal. As this is a virtual control signal implemented
on the USB interface, it is not physically present on the board. Asserting the DTR signal from the host will indicate to
the on-board debugger that a CDC session is active. The debugger will then enable its level shifters (if available), and
start the CDC data send and receive mechanisms.
Deasserting the DTR signal will not disable the level shifters but will disable the receiver so no further data will be
streamed to the host. Data packets that are already queued up for sending to the target will continue to be sent out,
but no further data will be accepted.
Hardware User Guide
Remember: Set up the terminal emulator to assert the DTR signal. Without the signal, the on-board
debugger will not send or receive any data through its UART.
Tip: The on-board debugger’s CDC TX pin will not be driven until the CDC interface is enabled by the
host computer. Also, there are no external pull-up resistors on the CDC lines connecting the debugger and
the target, which means that during power-up, these lines are floating. To avoid any glitches resulting in
unpredictable behavior like framing errors, the target device should enable the internal pull-up resistor on
the pin connected to the debugger’s CDC TX pin.
3.1.2.5 Advanced Use
CDC Override Mode
In normal operation, the on-board debugger is a true UART bridge between the host and the device. However, in
certain use cases, the on-board debugger can override the basic operating mode and use the CDC TX and RX pins
for other purposes.
Dropping a text file into the on-board debugger’s mass storage drive can be used to send characters out of the
debugger’s CDC TX pin. The filename and extension are trivial, but the text file must start with the characters:
CMD:SEND_UART=
The maximum message length is 50 characters – all remaining data in the frame are ignored.
The default baud rate used in this mode is 9600 bps, but if the CDC is already active or has been configured, the
previously used baud rate still applies.
USB-Level Framing Considerations
Sending data from the host to the CDC can be done byte-wise or in blocks, which will be chunked into 64-byte USB
frames. Each such frame will be queued up for sending to the debugger’s CDC TX pin. Transferring a small amount
of data per frame can be inefficient, particularly at low baud rates, because the on-board debugger buffers frames
and not bytes. A maximum of four 64-byte frames can be active at any time. The on-board debugger will throttle the
incoming frames accordingly. Sending full 64-byte frames containing data is the most efficient method.
When receiving data on the debugger’s CDC RX pin, the on-board debugger will queue up the incoming bytes into
64-byte frames, which are sent to the USB queue for transmission to the host when they are full. Incomplete frames
are also pushed to the USB queue at approximately 100 ms intervals, triggered by USB start-of-frame tokens. Up to
eight 64-byte frames can be active at any time.
If the host (or the software running on it) fails to receive data fast enough, an overrun will occur. When this happens,
the last-filled buffer frame will be recycled instead of being sent to the USB queue, and a full frame of data will be
lost. To prevent this occurrence, the user must ensure that the CDC data pipe is being read continuously, or the
incoming data rate must be reduced.
3.1.3 Mass Storage Device
The on-board debugger includes a simple Mass Storage Device implementation, which is accessible for read/write
operations via the host operating system to which it is connected.
It provides:
• Read access to basic text and HTML files for detailed kit information and support
• Write access for programming Intel® HEX formatted files into the target device’s memory
• Write access for simple text files for utility purposes
3.1.3.1 Mass Storage Device Implementation
The on-board debugger implements a highly optimized variant of the FAT12 file system that has several limitations,
partly due to the nature of FAT12 itself and optimizations made to fulfill its purpose for its embedded application.
The Curiosity Nano USB Device is USB Chapter 9-compliant as a mass storage device but does not, in any way,
fulfill the expectations of a general purpose mass storage device. This behavior is intentional.
When using the Windows operating system, the on-board debugger enumerates as a Curiosity Nano USB Device
that can be found in the disk drives section of the device manager. The CURIOSITY drive appears in the file manager
and claims the next available drive letter in the system.
The CURIOSITY drive contains approximately one MB of free space. This does not reflect the size of the target
device’s Flash in any way. When programming an Intel® HEX file, the binary data are encoded in ASCII with
metadata providing a large overhead, so one MB is a trivially chosen value for disk size.
It is not possible to format the CURIOSITY drive. When programming a file to the target, the filename may appear in
the disk directory listing. This is merely the operating system’s view of the directory, which, in reality, has not been
updated. It is not possible to read out the file contents. Removing and replugging the board will return the file system
to its original state, but the target will still contain the application that has been previously programmed.
To erase the target device, copy a text file starting with “CMD:ERASE” onto the disk.
Hardware User Guide
By default, the CURIOSITY drive contains several read-only files for generating icons as well as reporting status and
linking to further information:
• AUTORUN.ICO – icon file for the Microchip logo
• AUTORUN.INF – system file required for Windows Explorer to show the icon file
• CLICK-ME.HTM – redirect to the PIC-BLE web demo application
• KIT-INFO.HTM – redirect to the development board website
• KIT-INFO.TXT – a text file containing details about the board’s debugger firmware version, board name, USB
serial number, device, and drag-and-drop support
• STATUS.TXT – a text file containing the programming status of the board
Info: STATUS.TXT is dynamically updated by the on-board debugger. The contents may be cached by
the OS and, therefore, do not reflect the correct status.
3.1.3.2 Configuration Words
Configuration Words (PIC® MCU Targets)
Configuration Word settings included in the project being programmed after program Flash is programmed. The
debugger will not mask out any bits in the Configuration Words when writing them, but since it uses Low-Voltage
Programming mode, it is unable to clear the LVP Configuration bit. If the incorrect clock source is selected, for
example, and the board does not boot, it is always possible to perform a bulk erase (always done before
programming) and restore the device to its default settings.
3.1.3.3 Special Commands
Several utility commands are supported by copying text files to the mass storage disk. The filename or extension is
irrelevant – the command handler reacts to content only.
Table 3-2. Special File Commands
Command ContentDescription
CMD:ERASE
CMD:SEND_UART=
CMD:RESET
Info: The commands listed here are triggered by the content being sent to the mass storage emulated
disk, and no feedback is provided in the case of either success or failure.
Hardware User Guide
Executes a chip erase of the target
Sends a string of characters to the CDC UART. See “CDC Override Mode”.
Resets the target device by entering Programming mode and then exiting
Programming mode immediately thereafter. Exact timing can vary according to
the programming interface of the target device. (Debugger firmware v1.16 or
newer.)
3.1.4 Data Gateway Interface (DGI)
Data Gateway Interface (DGI) is a USB interface for transporting raw and time-stamped data between on-board
debuggers and host computer-based visualization tools. MPLAB Data Visualizer is used on the host computer to
display debug GPIO data. It is available as a plug-in for MPLAB® X IDE or a stand-alone application that can be used
in parallel with Microchip MPLAB® X IDE.
Although DGI encompasses several physical data interfaces, the PIC-BLE implementation includes logic analyzer
channels:
• One debug GPIO channel (also known as DGI GPIO)
3.1.4.1 Debug GPIO
Debug GPIO channels are timestamped digital signal lines connecting the target application to a host computer
visualization application. They are typically used to plot the occurrence of low-frequency events on a time-axis – for
example, when certain application state transitions occur.
The figure below shows the monitoring of the digital state of a mechanical switch connected to a debug GPIO in
MPLAB Data Visualizer.
Figure 3-2. Monitoring Debug GPIO with MPLAB Data Visualizer
Debug GPIO channels are timestamped, so the resolution of DGI GPIO events is determined by the resolution of the
DGI timestamp module.
Important: Although bursts of higher-frequency signals can be captured, the useful frequency range of
signals for which debug GPIO can be used is up to about 2 kHz. Attempting to capture signals above this
frequency will result in data saturation and overflow, which may cause the DGI session to be aborted.
3.1.4.2 Timestamping
DGI sources are timestamped as they are captured by the debugger. The timestamp counter implemented in the
Curiosity Nano debugger increments at 2 MHz frequency, providing a timestamp resolution of a half microsecond.
3.2 Power Supply
The board can be powered through the USB port or by a CR2032 battery. It will automatically switch to the battery if
USB power is not available. While powered through USB, the board generates 3.3V for the debugger,
PIC16LF18456, and peripherals. During battery operation, the PIC16LF18456 and peripherals run directly on the
battery voltage, while the debugger is not powered.
Current drawn from the USB port is limited to 500 mA by a PTC resettable fuse.
Important: When powering the PIC-BLE board with a CR2032 battery, it is important to leave the
PIC16LF18456 pins that connect to the CDC UART in Tri-State (Input) mode. This is to prevent the
debugger from getting powered through its GPIO.
Info: On the mikroBUS socket, the +5V rail is powered from the USB port. Consequently, +5V will not be
available when the board is powered from a battery.
Hardware User Guide
3.3 Low-Power Operation
To achieve the lowest power consumption of the board the following considerations must be taken:
• Set the MCP9844 in Shutdown mode
– Set bit 8 (SHDN) in the 16-bit CONFIG register (address 0x01)
• Set the BMA253 in Deep Suspend mode
– Set bit 5 (deep suspend) in the 8-bit PMU_LPW register (address 0x11)
• Set the RN4870 in Sleep mode
– Set the RX_IND pin high (RC6 on the PIC16LF18456)
– Send the "O,0\r" command to the RN4870
• Set unused PIC16LF18456 I/O pins as input and disable the digital input buffer
Important: EUSART pins RB4 and RB5 are connected directly to the on-board debugger. It is important
to tri-state the EUSART pins when the board is powered from a CR2032 battery to prevent powering the
debugger through its I/O pins. Doing so will increase the power consumption and cause undefined
behavior from the on-board debugger.
Info: The load switch U300 in the power MUX can leak up to 1 μA when the board is powered from a
battery. By modifying the board and removing resistor R303 (0Ω), U300 can be disconnected. Be warned
that a board modified this way can no longer be powered from USB, and consequently neither
programmed nor debugged using the on-board debugger until the 0Ω resistor is reconnected.
Power to the PIC16LF18456 and its peripherals is connected from the on-board power supply through a 0Ω resistor
(R301) in parallel with a 100-mil Current sense pin header footprint marked with “ISNS” in silkscreen (J301). To
User Guide
DS50002963A-page 14
0Ω resistor
(R301)
Current sense footprint
(J301)
Hardware User Guide
measure the power consumption of the PIC16LF18456 and other peripherals on the board, de-solder the 0Ω resistor
and connect an ammeter over the Current sense footprint.
Figure 3-4. Current sense footprint
3.5 Peripherals
3.5.1 PIC16LF18456
Tip: A 100-mil pin header can be soldered into the Current sense (J301) footprint for easy connection of
an ammeter. Once the ammeter is not needed anymore, place a jumper cap on the pin header.
Microchip PIC16LF18456 is a microcontroller featuring Intelligent Analog, Core Independent Peripherals (CIPs), and
communication peripherals combined with eXtreme Low Power (XLP) for a wide range of general purpose and lowpower applications. Features such as a 12-bit Analog-to-Digital Converter with Computation (ADC2 ), Memory
Access Partitioning (MAP), the Device Information Area (DIA), Power-Saving Operating modes, and Peripheral Pin
Select (PPS) offer flexible solutions for a wide variety of custom applications.
The PIC-BLE board features a mikroBUS socket for expanding the functionality of the development board using
MikroElektronika Click board and other mikroBUS add-on boards. The socket is populated with two 1x8 2.54 mm
pitch female headers and is ready to mount add-on boards.
Info: VBUS is powered from USB. Consequently, +5V will not be available while the board is powered
from a battery.
Info: VCC_TARGET will have the battery voltage when the board is powered from a battery, which can
be less than +3.3V.
3.5.3 RN4870 BLE Module
The RN4870 is a Bluetooth® Low Energy (BLE) module that integrates a Bluetooth® 5.0 baseband controller, onboard Bluetooth stack, digital and analog I/O, and RF power amplifier into one solution.
Additional Features:
• Range up to 50m
• Operating Voltage Range: 1.9V to 3.6V
• TX / RX mode Peak Current: 10 mA (typical)
• Low-Power Mode Current: 60 μA (typical)
• Shutdown Current: 2.9 μA (max)
The RN4870 BLE module is connected to the PIC16LF18456 through UART as well as three GPIOs for control and
configuration of the module. The RST signals resets the module, while the RX_IND signal is used to wake the
module from Low-Power mode. The MODE signal, available from the PIC16LF18456, the debugger as well as by a
physical switch, allows the module to be put in a “Test Mode” where the RN4870 firmware can be updated.
The module has two of its GPIO pins connected to LEDs. By default the BLE LED will indicate connection status,
while ERR LED must be controlled by the user. Both LEDs can be configured for a number of other functions. Many
of the other RN4870 GPIO pins are available as pads around the label on the back side of the PIC-BLE board, as can
be seen in Figure 1-2.
Hardware User Guide
Info: Some RN4870 settings have been changed during manufacturing of PIC-BLE. Using the S-
command, the device name has been changed to “PIC-BLE”. In addition, the communication settings have
been configured for PIC16LF18456 EUSART settings of 9600,8,N,1.
Info: The RST and MODE signals are pulled up by external resistors.
3.5.4 ATECC608A Secure Element
The ATECC608A is a secure element from the Microchip CryptoAuthentication portfolio with advanced Elliptic Curve
Cryptography (ECC) capabilities. With ECDH and ECDSA being built right in, this device is ideal for the rapidly
growing Internet of Things (IoT) market by easily supplying the full range of security, such as confidentiality, data
integrity, and authentication to systems with MCU or MPUs running encryption/decryption algorithms. Similar to all
Microchip CryptoAuthentication products, the ATECC608A employs ultra-secure, hardware-based cryptographic key
storage and cryptographic countermeasures that eliminate any potential backdoors linked to software weaknesses.
The ATECC608A CryptoAuthentication device on the PIC-BLE board can be used to authenticate the board with
other hardware for secure IoT communication.
Info: 7-bit I2C address: 0x58.
Hardware User Guide
Table 3-5. ATECC608A Connections
ATECC608A Pin PIC16LF18456
Pin
SDARB2MSSP I2C SDAMCP9844, BMA253 and mikroBUS
SCLRB1MSSP I2C SCLMCP9844, BMA253 and mikroBUS
3.5.5 SST25PF040CT Serial Flash
The SST25PF040CT is a 4 Mbit Serial Flash with extended operating voltage range and low-power consumption.
Additional Features:
• Operating Voltage Range: 2.3V to 3.6V
• Active Read Current: 5 mA (typical)
• Power Down Standby Current: 3 μA (typical)
The SST25PF040CT Serial Flash is connected to the PIC16LF18456 through SPI.
Info: The Flash is SPI Mode 0 and Mode 3 compatible, and supports clock speeds up to 40 MHz
The MCP9844 digital temperature sensor converts circuit board temperatures between -40°C and +125°C to a digital
word with ±1°C/±3°C (typical/maximum) accuracy.
Additional features:
• Accuracy:
– ±0.2°C/±1°C (typical/maximum) from +75°C to +95°C
– ±0.5°C/±2°C (typical/maximum) from +40°C to +125°C
– ±1°C/±3°C (typical/maximum) from -40°C to +125°C
• User Selectable Measurement Resolution:
– 0.5°C, 0.25°C, 0.125°C, 0.0625°C
• User Programmable Temperature Limits:
– Temperature Window Limit
– Critical Temperature Limit
• User Programmable Temperature Alert Output
• Operating Voltage Range:
– 1.7V to 3.6V
• Operating Current:
– 100 μA (typical)
• Shutdown Current:
– 0.2 μA (typical)
The MCP9844 temperature sensor is connected to the PIC16LF18456 through I2C.
Hardware User Guide
FunctionShared Functionality
Info: 7-bit I2C address: 0x18.
Table 3-7. MCP9844 Connections
MCP9844 PinPIC16LF18456
Pin
SDARB2MSSP I2C SDAATECC608A, BMA253 and
SCLRB1MSSP I2C SCLATECC608A, BMA253 and
3.5.7 BMA253 Acceleration Sensor
The Bosch BMA253 is a low-g acceleration sensor with digital output for measurements of acceleration in three
perpendicular axes.
Additional Features:
• 12-Bit Sensitivity
• User Selectable Acceleration Ranges: ±2g, ±4g, ±8g, ±16g
– New Data
– Any Motion Detection
– Single/Double Tap Sensing
– Orientation Recognition
– Flat Detection
– Low/High-g Detection
– Inactivity Detection
• Operating Voltage Range: 1.62V to 3.6V
• Operating Current (Normal mode): 130 μA (typical)
• Shutdown Current (Deep Suspend mode): 1 μA (typical)
The BMA253 acceleration sensor is connected to the PIC16LF18456 through I2C and a GPIO for the user
configurable interrupt outputs.
Info: 7-bit I2C address: 0x19
Table 3-8. BMA253 Connections
BMA253 PinPIC16LF18456
SDARB2MSSP I2C SDAMCP9844, ATECC608A and
SCLRB1MSSP I2C SCLMCP9844, ATECC608A and
INT1RA6GPIO / EXT_INT—
3.5.8 LEDs
There is one user LED available on the PIC-BLE board that can be controlled by either GPIO or PWM. In addition,
there are two LEDs connected directly to the BLE module. The LEDs can be activated by driving their connected I/O
lines to GND.
Table 3-9. LED Connections
LEDPIC16LF18456 PinFunctionShared Functionality
Green Data LEDRA5GPIO / CCP5On-board debugger
Red Error LED—Connected to BLE moduleRN4870
Blue BLE LED—Connected to BLE moduleRN4870
3.5.9 Mechanical Switch
The PIC-BLE board has one mechanical switch. This is a generic user-configurable switch that will drive the
connected I/O line to ground (GND) when it is pressed. An external resistor pulls the signal high when the switch is
not pressed.
Holding the switch during power-up can be used to put the Bluetooth module in Configuration mode. See 3.5.3
Info: The SW0 signal is pulled up by an external resistor.
3.5.10 On-Board Debugger Implementation
PIC-BLE features an on-board debugger that can be used to program and debug the PIC16LF18456 using In-Circuit
Serial Programming (ICSP). The on-board debugger also includes a virtual serial port (CDC) interface over UART
and debug GPIO. Microchip MPLAB® X IDE can be used as a front-end for the on-board debugger for programming
and debugging. MPLAB Data Visualizer can be used as a front-end for the CDC and debug GPIO.
3.5.10.1 On-Board Debugger Connections
The table below shows the connections between the target and the debugger section. All connections between the
target and the debugger are tri-stated as long as the debugger is not actively using the interface. Hence, since there
are little contaminations of the signals, the pins can be configured to anything the user wants.
For further information on how to use the capabilities of the on-board debugger, see 3.1 On-Board Debugger
This user guide is written to provide information about the latest available revision of the board. The following
sections contain information about known issues, a revision history of older revisions, and how older revisions differ
from the latest revision.
4.1 Identifying Product ID and Revision
The revision and product identifier of the PIC-BLE Board can be found in two ways: Either by utilizing the Microchip
MPLAB® X IDE Kit Window or by looking at the sticker on the bottom side of the PCB.
By connecting a PIC-BLE to a computer with Microchip MPLAB® X IDE running, the Kit Window will pop up. The first
six digits of the serial number, which is listed under kit information, contain the product identifier and revision.
Tip: The Kit Window can be opened in MPLAB® X IDE through the menu bar Window > Kit Window.
The same information can be found on the sticker on the bottom side of the PCB. Most boards will have the identifier
and revision printed in plain text as A09-nnnn\rr, where “nnnn” is the identifier, and “rr” is the revision. Boards with
limited space have a sticker with only a data matrix code, containing the product identifier, revision, and serial
number.
The serial number string has the following format:
"nnnnrrssssssssss"
n = product identifier
r = revision
s = serial number
The product identifier for PIC-BLE is A09-3283.
4.2 Revision 4
Revision 4 is functionally the same as revision 3, but features a RN4870 BLE module with firmware version 1.40 (part
number RN4870-V/RM140).
In the silkscreen, the part number of the serial flash chip is wrong. It should be SST25PF040C, but shows
SST25P040C.
4.3 Revision 3
Revision 3 is the initial released revision of the board. It features a RN4870 BLE module with firmware version 1.30
(part number RN4870-I/RM130).
Microchip provides online support via our website at http://www.microchip.com/. This website is used to make files
and information easily available to customers. Some of the content available includes:
• Product Support – Data sheets and errata, application notes and sample programs, design resources, user’s
guides and hardware support documents, latest software releases and archived software
• General Technical Support – Frequently Asked Questions (FAQs), technical support requests, online
discussion groups, Microchip design partner program member listing
• Business of Microchip – Product selector and ordering guides, latest Microchip press releases, listing of
seminars and events, listings of Microchip sales offices, distributors and factory representatives
Product Change Notification Service
Microchip’s product change notification service helps keep customers current on Microchip products. Subscribers will
receive email notification whenever there are changes, updates, revisions or errata related to a specified product
family or development tool of interest.
To register, go to http://www.microchip.com/pcn and follow the registration instructions.
Customer Support
Users of Microchip products can receive assistance through several channels:
• Distributor or Representative
• Local Sales Office
• Embedded Solutions Engineer (ESE)
• Technical Support
Customers should contact their distributor, representative or ESE for support. Local sales offices are also available to
help customers. A listing of sales offices and locations is included in this document.
Technical support is available through the website at: http://www.microchip.com/support
Microchip Devices Code Protection Feature
Note the following details of the code protection feature on Microchip devices:
• Microchip products meet the specification contained in their particular Microchip Data Sheet.
• 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.
Legal Notice
Information contained in this publication regarding device applications and the like is provided only for your
convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with
your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER
EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION,
INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR
FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip
devices in life support and/or safety applications is entirely at the buyer’s risk, and the buyer agrees to defend,
indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such
use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights unless
otherwise stated.
Trademarks
The Microchip name and logo, the Microchip logo, Adaptec, AnyRate, AVR, AVR logo, AVR Freaks, BesTime,
BitCloud, chipKIT, chipKIT logo, CryptoMemory, CryptoRF, dsPIC, FlashFlex, flexPWR, HELDO, IGLOO, JukeBlox,
KeeLoq, Kleer, LANCheck, LinkMD, maXStylus, maXTouch, MediaLB, megaAVR, Microsemi, Microsemi logo, MOST,
MOST logo, MPLAB, OptoLyzer, PackeTime, PIC, picoPower, PICSTART, PIC32 logo, PolarFire, Prochip Designer,
QTouch, SAM-BA, SenGenuity, SpyNIC, SST, SST Logo, SuperFlash, Symmetricom, SyncServer, Tachyon,
TempTrackr, TimeSource, tinyAVR, UNI/O, Vectron, and XMEGA are registered trademarks of Microchip Technology
Incorporated in the U.S.A. and other countries.
APT, ClockWorks, The Embedded Control Solutions Company, EtherSynch, FlashTec, Hyper Speed Control,
HyperLight Load, IntelliMOS, Libero, motorBench, mTouch, Powermite 3, Precision Edge, ProASIC, ProASIC Plus,
ProASIC Plus logo, Quiet-Wire, SmartFusion, SyncWorld, Temux, TimeCesium, TimeHub, TimePictra, TimeProvider,
Vite, WinPath, and ZL are registered trademarks of Microchip Technology Incorporated in the U.S.A.
Adjacent Key Suppression, AKS, Analog-for-the-Digital Age, Any Capacitor, AnyIn, AnyOut, BlueSky, BodyCom,
CodeGuard, CryptoAuthentication, CryptoAutomotive, CryptoCompanion, CryptoController, dsPICDEM,
dsPICDEM.net, Dynamic Average Matching, DAM, ECAN, EtherGREEN, In-Circuit Serial Programming, ICSP,
INICnet, Inter-Chip Connectivity, JitterBlocker, KleerNet, KleerNet logo, memBrain, Mindi, MiWi, MPASM, MPF,
MPLAB Certified logo, MPLIB, MPLINK, MultiTRAK, NetDetach, Omniscient Code Generation, PICDEM,
PICDEM.net, PICkit, PICtail, PowerSmart, PureSilicon, QMatrix, REAL ICE, Ripple Blocker, SAM-ICE, Serial Quad
I/O, SMART-I.S., SQI, SuperSwitcher, SuperSwitcher II, Total Endurance, TSHARC, USBCheck, VariSense,
ViewSpan, WiperLock, Wireless DNA, and ZENA are trademarks of Microchip Technology Incorporated in the U.S.A.
and other countries.
SQTP is a service mark of Microchip Technology Incorporated in the U.S.A.
The Adaptec logo, Frequency on Demand, Silicon Storage Technology, and Symmcom are registered trademarks of
Microchip Technology Inc. in other countries.
GestIC is a registered trademark of Microchip Technology Germany II GmbH & Co. KG, a subsidiary of Microchip
Technology Inc., in other countries.
All other trademarks mentioned herein are property of their respective companies.