PICtail falls under the control of a USB-endowed
PIC18LF25K50. The PIC18LF25K50 is shown in Photo 2,
which is a shot of the other side of the RN4020 PICtail
printed circuit board (PCB).
Schematic 1 tells us that the PIC18LF25K50 is acting
as a USB CDC interface that logically links its USB portal
with its UART component. The PIC’s USB portal is
intended to connect to a PC host USB port, while the
PIC’s UART is aimed at the RN4020’s UART interface.
This arrangement allows us to communicate with the
RN4020 via a simple terminal emulator like Tera Term Pro.
In addition to the CDC code, the PIC18LF25K50 is loaded
with microcode that exposes an optional PIC18 command
shell that allows us to use a terminal emulator to
manipulate the PIC’s I/O pins.
What's Better than an RN4020
PICtail Plus Board?
Two RN4020 PICtail Plus boards! Now that we have a
basic knowledge of BLE and the RN4020, let’s put those
back-side USB portals to work and check out what it takes
to build an RN4020 BLE link.
The RN4020 PICtail comes ready to rock at 115200
bps. A proper USB cable is also packed with your new
RN4020 PICtail. Upon plugging in a brand new RN4020
PICtail and kicking off a Tera Term Pro terminal session, I
was facing a blank terminal emulator window. So, just to
see if the RN4020 was really there, I issued a Reboot
command (R,1 – Enter). The results are shown in
Screenshot 1. The next thing we should do here is make it
a bit easier to see what we’re doing. We can do this by
60 April 2015
Post comments on this article and find any associated files and/or downloads at www.nutsvolts.com/
■ Schematic 1. No rocket science here. This is a
standard PIC18LF25K50 USB implementation.
Note that the PIC has feelers out to all of the
RN4020's control pins.
■ Screenshot 1.
Rebooting the RN4020 is
one way to get the
coveted "CMD" message.
■ Screenshot 2. By simply
entering "+" we can see
the commands as they are