to the PIC32MX575F512H.
Our initial design will include an 8 MHz clock crystal
that via the PIC32MX575F512H’s internal PLL will enable
80 MHz operation of its CPU. We will also design in a
32.768 kHz clock crystal to drive the
PIC32MX575F512H’s internal RTCC module.
The RTCC provides “human time” clocking for timing
of events that occur in time-of-day intervals (
hours-minutes-seconds). Who knows. That might come in handy. I often
use the one second alarm capability of the RTCC to blink
an “I’m alive” LED in addition to providing timing intervals
based on seconds.
Yep. Mass storage. It would be nice to be able to
store whatever we find necessary and keep it stored until
we need it. The PIC32MX575F512H is a very powerful
computing device. However, when the lights go out, so
does everything else in the “house.” We’re not designing
a battery-operated device. So, we’ll have to call upon a
storage device that has become very popular with
embedded designers: the microSD card.
Instead of attaching our microSD card to one of the
PIC’s SPI portals and coding a driver, we’ll take a different
road. We’re going to relieve the PIC32MX575F512H of
the burden of executing the low level code that drives a
typical microSD card. We’re also going to give ourselves
a break by not having to adapt and integrate the base
Microchip FAT drivers.
You may find this amusing. We’re giving control of
the microSD card to an Atmel microcontroller.
Our microSD subsystem is based on an open source
project called OpenLog. You can buy an OpenLog from
SparkFun. Or, as long as you acknowledge the open
source folks behind it, you can also lay one down on a
PCB of your choice. OpenLog was originally intended as
an “instant gratification” data logger.
The idea behind OpenLog is to power-up and just log
data. You can get all of the OpenLog scoop you need
from the SparkFun site and GitHub.
The OpenLog circuitry attaches to our
PIC32MX575F512H via its UART ports. Instead of just
logging data, we’re going to configure our instance of
OpenLog to act as an on-demand microSD storage
By simply exchanging microSD cards, we can create
a mass storage device that can store from 1 GB to 64 GB.
On our command, every bit that the OpenLog processes
and stores will flow through one of the
The advantage of using a microSD card instead of a
nonvolatile device such as an EEPROM is that we can
easily pass the data to another embedded device or a PC
by simply plugging and unplugging the microSD card.
We’ve already poo-pooed the PIC32MX575F512H’s
on-chip USB module. Our device is not designed to be a
dedicated USB device or USB host. So, to utilize our
communications node as an adhoc USB portal, we must
“install” our own USB hardware.
Our design will use the USB portal just like it was an
RS-232 port. To keep it as simple and as robust as
possible, we’ll go with a proven method based on the
FTDI FT232RL. Again, we’re saving finger time as there is
no special driver code we have to write to utilize the
Despite the movement towards killing good old RS-
232, it’s still standing. This design wouldn’t be complete
without a regulation RS-232 interface. With that, we’ll
design in a three-wire RS-232 serial port with an optional
RTS signal. Our RS-232 portal will be based on an ST3232
RS-232 interface IC.
We want to get as much functionality out of our
design as possible. The popularity of the XBee 802.15.4
radio module helps us in this respect. We can design in a
ADVANCED TECHNIQUES FOR DESIGN ENGINEERS
July 2015 69
Printed Circuit Boards
Printed Circuit Board Design Tools
PIC C Compiler