While computers process data digitally, the environment in which they exist, not to mention the humans who use them, are inherently analog. Designing high-speed analog interfaces is a notoriously challenging process, second only to debugging them. Since industrial, medical, and consumer electronics are becoming increasingly complex, quickly solving analog/mixed-signal design problems is increasingly critical.
A major challenge in mixed-signal design is debugging the noise sources that reduce analog signal integrity; in complex mixed-signal designs, where numerous sensors and I/O channels may compete for access to the MCU, resolving the communications bottleneck can be equally challenging. Microchip’s PIC24F GC family of 16-bit MCUs addresses both problems by integrating numerous analog peripherals onto the MCU, an approach Microchip calls Intelligent Analog. The noise sources that reduce analog signal integrity have already been debugged; and since the analog is on the chip, the bottleneck of communicating with the MCU is eliminated.
The Microchip DM240015 MPLAB Starter Kit for PIC24F (Figure 1) is a comprehensive development kit based on the PIC24FJ128GC010 MCU. Microchip claims the kit includes “95% of what the customer needs to develop a handheld analog application prototype.” Considering the wide range of analog peripherals integrated onto the chip and accessible from the board, that is entirely possible.
Figure 1: Microchip DM240015 MPLAB Starter Kit for PIC24F MCU.
An overview of the chips
PIC24F GC MCUs include a full signal chain, consisting of a 16-bit ΣΔ ADC and a 12-bit 10 Msample/s pipeline ADC, both firsts for a PIC MCU, as well as a 10-bit 1 Msample/s DAC; dual op amps; three comparators; and three programmable voltage references. All analog functions are controlled by an interconnect switch matrix, which enables connecting analog blocks within the chip, reducing the number of connections to I/O pins, reducing noise, and increasing throughput.
PIC24 GC MCUs are built around a 16-MIPS 32 MHz CPU core with 64 to 128 Kbytes of Flash memory, 8 Kbytes of RAM, and 6 DMA channels. The block diagram in Figure 2 shows modules included in the Intelligent Analog Block. The Peripheral Pin Select block includes a variety of timers and communications peripherals that can be mapped onto alternative pins without affecting access to analog functions.
Figure 2: PIC24F GC block diagram (Courtesy of Microchip).
XLP or eXtreme Low Power technology enables the chip to consume 180 μA/MHz while running and only 18 nA while asleep. There are a variety of ways to wake from the sleep state, including low-power timers, real-time clocks, and interrupts. There are a variety of peripherals to support display, serial communications, and user inputs. DMA enables multitasking by the CPU and peripherals.
The PIC24 GC family is the newest PIC MCU to take the Intelligent Analog approach; parts can be applied to digital power, motor control, and LED lighting. PIC24 GC MCUs leverage their higher degree of analog integration and lower power to target portable medical and industrial products, including blood pressure meters, glucose meters, pulse oximeters, wearable sensors, lab instruments, handheld light meters, portable gas sensors, and high-speed sensor arrays.
Microchip has designed a glucose meter around the PIC24 GC. There are various chemistries for test strips, so designers can use either 16-bit precision or high-speed sampling with digital filtering to capture the highly-varying signal. However, because the “GC” family has both a fast ADC and a high-precision ADC, a wide variety of strips can be measured. The LCD controller can handle a 472-segment display, making nested menus possible on even the smallest displays. Finally, assuming that the user measures his or her blood glucose five times per day, that there is an alarm on the meter to notify the user when to test, and, finally, that the data is uploaded via USB each time, a single CR2032 (225 mAh) coin cell battery should last an estimated 10 years, 141 days with an average current of 2.2 μA (Figure 3). The peak current of 5.8 mA is less than the maximum rated capacity of the battery, which is 12 mA.
Figure 3: Glucose meter from Batter Life Estimator (Courtesy of Microchip).
The demo programs
The starter kit is intended to introduce the PIC24FJ128GC010 family of analog microcontrollers and demonstrate a wide range of on-chip analog features. Indeed, it shows off the board’s analog capabilities in considerable detail. The demo program starts up as soon as you power-up the board. The multisection program demonstrates:
- Analog 16-bit ADC — Perform precision data logging, display the results on the LCD screen and a PC via USB
- Analog 12-bit ADC — Measure sensor data from the light sensor, potentiometer, and port pin, streaming this data to a PC via USB
- Analog 10-bit DAC — Generate audio tones to the headphone jack
- LCD Text — Left/right scrolling and menuing via mTouch button control
- LCD Graphics — Show bar graphs and sine waves on the LCK
- LCD Clock — Set time and time functions
- LCD Test — Cycle through icons and display associated text
- Microphone — Perform 12-bit ADC measurement, display with bar graph on LCD
- Temperature — Display current temperature in °C or °F
- Sleep — Power down and display time
A large (4 in. diagonal) 472-segment LCD screen displays the results of each demo program; the screen comes populated with numerous icons that you can incorporate into your own programs.
The board includes an analog connector designed to insert into a breadboard for easy access to analog peripherals, and an expansion area for adding RF connectivity. Three touch-sensitive keypads are under the control of the MCU’s Charge Time Measurement Unit (CTMU), which uses a constant-current source to detect changes in the pads’ capacitance.
The kit comes with the source code for the example programs for use with Microchip’s free MPLAB X IDE, which you will need to program the board. Microchip includes its PICKit On-Board (PKOB) debugger, through which you can power, as well as reprogram the board. The “MPLAB Starter Kit for Intelligent Integrated Analog” includes the compiler, linker, and associated tools, as well as a user’s guide that explains how it all works.
The low operating current (7 mA) of the PIC24FJ128GC010 microcontroller means the entire board can be powered from a USB connection or, as an option, by battery. The entire Starter Kit itself draws approximately 25 mA from the USB host when running the demo application.
Once you install the latest version of MPLAB, the XC 16 compiler, and the drivers for the kit, MPLAB recognizes the board when you connect it to J6, the PICKit On-Board USB connector. If you are familiar with MPLAB, whether the current MPLAB X or MPLAB 8, it is straightforward to compile, link, and Flash programs to the board.
The PIC24FJ128GC010 makes a compelling case for analog integration in terms of reduced design and debug time, not to mention faster throughput and reduced board space. The DM240015 MPLAB Starter Kit makes it possible to quickly prototype and test numerous medical and industrial applications.
For more information on the parts discussed in this article, use the links provided to access product information pages on the Hotenda website.