Documente Academic
Documente Profesional
Documente Cultură
USB3
POWER
LIGHTING
MEDICAL
PERIPHERALS
Sept/Oct 2013
Contents
SHOWCASE DESIGN ARTICLES
21 More Room to Operate 22 Compiler Solutions for Any PIC MCU and Any Project 24 Three-Terminal Gas Sensors and Potentiostatic Circuits 26 Take a Load Off
NEW PRODUCTS
7 Precision and Performance
PIC24FJ128GC010 provides Intelligent Analog and eXtreme Low Power for portable medical and industrial applications
FEATURES
18 Get Great Deals on Development Tools 29 Have You Seen the New microchipDIRECT? 30 Training Your Way
NEW TOOLS
13 Let the LED Light Shine 14 Simplify the Internet of Things 16 chipKIT for Raspberry Pi
The Microchip name and logo, the Microchip logo, dsPIC, FlashFlex, KEELOQ, KEELOQ logo, MPLAB, PIC, PICmicro, PICSTART, PIC32 logo, rfPIC, SST, SST Logo, SuperFlash and UNI/O are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. FilterLab, Hampshire, HI-TECH C, Linear Active Thermistor, MTP, SEEVAL and The Embedded Control Solutions Company are registered trademarks of Microchip Technology Incorporated in the U.S.A. Silicon Storage Technology is a registered trademark of Microchip Technology Inc. in other countries. Analog-for-the-Digital Age, Application Maestro, BodyCom, chipKIT, chipKIT logo, CodeGuard, dsPICDEM, dsPICDEM.net, dsPICworks, dsSPEAK, ECAN, ECONOMONITOR, FanSense, HI-TIDE, In Circuit Serial Programming, ICSP, Mindi, MiWi, MPASM, MPF, MPLAB Certified logo, MPLIB, MPLINK, mTouch, Omniscient Code Generation, PICC, PICC-18, PICDEM, PICDEM.net, PICkit, PICtail, REAL ICE, rfLAB, Select Mode, SQI, Serial Quad I/O, Total Endurance, TSHARC, UniWinDriver, WiperLock, ZENA and Z-Scale 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. GestIC and ULPP are registered trademarks 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. 2013, Microchip Technology Incorporated, All Rights Reserved.
EDITORS NOTE
fairly recent phenomenon, the maker movement really taps into the creative genius that humankind naturally has employed throughout history to design and build a myriad of things that make life easier, more enjoyable, or just plain
fun. This movement is celebrated at the various community-based and independently produced Maker Faire events which are popping up in locations around the world. At the recent New York Maker Faire, almost 70,000 attendees wandered through the
vast array of exhibits, did hands-on projects, and interacted with the maker community. The assortment of things to see and do was overwhelming, engaging all five senses in this unique venue. Youll find more information about the event on the Maker Faire website and in this article published by The Verge. Microchip was at Maker Faire to promote the chipKIT development platform and demonstrate the new chipKIT Pi development board, which is featured in this issue of MicroSolutions. The steady flow of visitors to our booth ranged from adults who were hobbyists and/or engineers, to teachers looking for classroom resources, to young people in college or high school who already had a passion for electronics, to families with little children who were fascinated by our talking skull and robotic car demos. Our participation at Maker Faire is just one aspect of our ongoing commitment to education. We offer unique benefits and resources for educators, researchers and students worldwide including free access to labs, curriculum and course materials and discounts on many tools. Visit the Academic Corner on our website if you would
To get the latest news about Microchip and its products via social media, be sure to Like Us on Facebook and Follow Us on Twitter:
like to learn more about how integrating Microchip products and technologies into the classroom can help transform the makers of today into the engineers of tomorrow. As always, we would be happy to get your feedback on MicroSolutions. Feel free to email us at MSFeedback@microchip.com.
SPOTLIGHT
application of digital intelligence to traditional analog systems has enriched our lives in ways we dont often think about. Many of us cant imagine what life would be like without anti-lock braking systems, digital audio or fully automatic
he things we see, the sounds we hear, and the items we touch are not composed of zeros and ones. However, the
Pure analog design can be extremely difficult and inflexible and is often time consuming. It requires a different skillset and even a different mindset from those of a digital designer. Analog designers deal with highly variable signals and care about things like signal integrity, sensitivity, precision and noise. Theyre often not as comfortable dealing with the off/on nature of processors and controllers. Digital designers, on the other hand, are all about zeros and ones. Machine logic is second nature to them and programming languages are their strength. Analog component selection and circuit design, however, can be intimidating.
Target Applications
Portable medical equipment Glucose meter Portable ECG Pulse oximeter Blood pressure meter Industrial equipment Portable gas sensors Handheld multi-meter Lab instrumentation Environmental quality sensors Sensor arrays Power Power conversion Efficient motor control Power measurement and monitoring Lighting Battery charging
coffee makers. Designers of embedded systems face the perennial problem of discovering the most efficient way to enable digital intelligence to monitor, communicate with and control systems in the real world. Ideally, all system designers would have the time and resources necessary to master both analog and digital design techniques. Unfortunately, that rarely is the case. The real world is downsizing. Electronics continue to get smaller and smaller, forcing tighter integration of control circuitry. Engineering budgets are also getting smaller, requiring designers to do more with fewer resources. To be successful in todays world, analog engineers must be competent in digital design and digital engineers need to understand analog theory.
Pure analog design can be extremely difficult and inflexible and is often time consuming.
If you find yourself facing this type of design challenge, we make it easy to wear both engineering hats. Our Intelligent Analog microcontrollers (MCUs) and digital signal controllers (DSCs) seamlessly combine analog finesse with digital control. Weve integrated commonly used analog components directly into the PIC MCUs and provided a powerful network of internal interconnects to enable both digital and analog engineers to easily design microcontroller-based closed-loop control systems. With an abundance of example code to borrow, you can easily get started by
(continued on page 5)
downloading the free version of our MPLAB Integrated Development Environment (IDE) and ordering free samples. As part of our Intelligent Analog integration, we have already completed the complicated task of debugging the noise sources that reduce analog signal integrity. Also, by placing the analog functionality on the chip, weve eliminated the communications bottleneck between the microcontroller and analog components. This leads to consistent analog performance that can be leveraged from design to design, eliminating analog design rework. The analog is fully controlled by software using intelligent connections made inside the chip. The end result is a simplified design cycle, board space savings, faster throughput and better signal integrity. You now have a powerful solution which allows you to focus on fine-tuning your systems to produce lower-cost designs with a faster time to market.
has been increased to allow for shielding of the analog signals. When devices which support features like USB are placed adjacent to analog devices, noise can be coupled. This will reduce the signal integrity. Extra shielding is needed, which makes the layout more complex. The board may require extra layers to allow for the routing, thereby increasing cost. Finally, more power planes may need to be added to ensure that signal integrity is maintained between and on the board layers, which further increases the complexity and cost. This complexity can often lead to multiple revisions of the board, wasting time and money and delaying the product launch. Using a solution from our Intelligent Analog portfolio, the design is drastically simplified as shown in Figure 2. With the analog is integrated inside the PIC MCU, the PCB layout is simplified, requiring fewer traces and lower noise coupling. Shorter and more direct traces help increase noise robustness. This integration and simplification in routing leads to a much smaller board size and a lower system cost. Since the PCB is simpler, the prototyping process is faster, with fewer board revisions required. Intelligent Analog reduces the system cost, saves board space and improves the performance of the design.
Development Tools
These development tools will help you get started with your Intelligent Analog projects: PIC24F Starter Kit for Intelligent Analog (DM240015) Supporting designs using the PIC24GC family of devices, this kit includes an analog header for clean analog signals and plugs into breadboards. The board includes connections for microphone, headphones as well as on-board light and temperature sensors. The segmented display showcases custom icons and a scrolling banner. The board also includes cap touch buttons, USB connection and easy connection for RF modules. PIC24F K-Series 3V or 5V Microsticks (DM240013-1 or DM240013-2) For developing projects using the PIC24KM family, these USB-powered boards are highly flexible and low-cost starter kits with integrated programmer/debugger. They easily plug into a breadboard for additional functionality. MPLAB Starter Kit for Digital Power (DM330017) If your design uses a dsPIC33GS device, this board implements a buck and boost DC/ DC converter with a single dsPIC DSC and includes an onboard display, potentiometer and temperature sensor and debugging/ programming via USB. F1 PSMC Evaluation Platform (DM164130-10) This board is a development tool for the PIC16F178X Intelligent Analog family of microcontrollers. Visit the Intelligent Analog page on the Microchip website for additional details and resources to add Intelligent Analog to your next design.
100
Analog Interconnect
64-128 KB Flash
8 KB RAM
6 Channel DMA
16-bit Timers - 5 IC / OC / PWM - 5 UART - 2 SPI - 2 I2C - 2 USB - OTG LCD Driver / 472 Segments CTMU for Touch Parallel Master Port CRC DS Brown-out Reset DS Watchdog Timer Interrupt 0 Real-Time Clock Calendar
XLP
Additional Resources:
Intelligent Analog Brochure PIC24F GC Based Blood Pressure Meter Demonstration (Video)
NEW PRODUCT
family of microcontrollers is an analog system on a chip that integrates a full analog signal chain, including Microchips first ever on-chip precision 16-bit analog-to-digital converter
PIC24FJ128GC010 family integrates a full analog signal chain
esigning precision analog circuits is a challenge. To make this design task easier, the new PIC24FJ128GC010
medical equipment and can act as a service/ data port for industrial equipment. Capacitive touch sensing is supported with an on-chip mTouch sensing solution peripheral. The integration of a 16-bit ADC, USB and LCD into a single low-power MCU allows for very small form factor, battery-powered applications. The PIC24FJ128GC010 family represents a significant cost reduction over a multi-chip implementation, enabling lower noise, faster throughput, smaller PCB size and faster time to market.
(ADC) and 10 Msps 12-bit ADC, plus a digital-to-analog converter (DAC) and dual operational amplifiers (op amps), along with eXtreme Low Power (XLP) technology for extended battery life in portable medical and industrial applications. It reduces system cost and noise and improves signal throughput. This combination of analog integration and low power consumption reduces system cost and noise, and improves the signal throughput in applications such as portable medical monitoring devices, (e.g., blood-glucose meters and blood-pressure monitor), as well as industrial applications such as portable monitoring devices (e.g., voltage and current monitors, gas sensors and high-speed sensor arrays), among others. The PIC24FJ128GC010 family includes an integrated LCD display driver that provides the ability to drive up to 472 segments with information-rich user displays that include scrolling alphanumeric banners. Integrated USB supports the uploading of clinical data for
Development Support
A comprehensive starter kit is available to help you build your software, hardware and sensorsdrastically improving your development time by eliminating the need to design a board. The PIC24FJ128GC010 family is supported by Microchips MPLAB Starter Kit for PIC24F Intelligent Integrated Analog (DM240015), which is being offered for a special introductory price of $89.99 for a limited time. This kit is focused on the familys integrated analog to preserve signal integrity. It provides 95% of what you need to develop a handheld analog prototypeall you need to do is add sensors. For additional information on the
PIC24FJ128GC010 family of microcontrollers, contact any Microchip sales representative or authorized worldwide distributor.
Add next-generation capabilities such as touch-screen capacitive sensing, wireless connectivity and longer battery life, while lowering your overall system cost and time to market. Our combination of innovative products, dependable delivery and years of experience in enabling embedded medical solutions for customers around the world makes Microchip Technology your partner of choice for medical designs.
Extend Battery Life with XLP Technology PIC MCUs with nanoWatt eXtreme Low-Power (XLP) Technology Lowest-power consumption with sleep currents down to 9 nA Add Touch-Sensing with PIC MCUs mTouch capacitive touch-sensing for glass and plastic Waterproof Metal Over Cap touch technology for stainless steel and aluminium Add Connectivity Agency-certified Wi-Fi and Bluetooth modules PIC MCUs with on-board USB and enhanced CAN Proprietary low-cost wireless protocols (MiWi) Free ready-to-use ZigBee stack Embedded Ethernet controllers Increase Accuracy and Reliability Precision op amps Battery-management ICs Temperature sensor ICs Mixed-signal and interface ICs UNI/O Serial EEPROM World-Class Support for Medical Designs Microchips dedicated Medical Design Center helps you to simplify analog design, software development, in-circuit emulation and system level evaluation. Low-cost development tools and evaluation boards Online reference designs and application notes for medical products Third-party Medical Design Partner Specialists
1. Get started with online medical reference designs: www.microchip.com/medical 2. Add capacitive touch-sensing with mTouch technology: www.microchip.com/mTouch 3. Extend battery life with XLP technology: www.microchip.com/XLP
NEW PRODUCT
take advantage of its increased bandwidth of 5 Gbps and higher-power charging ports. This trend is driving a need for USB3 controller hubs with a high degree of flexibility and integration
USB553XB-5000 family provides the flexibility to create applications with both USB3 and USB2 ports
he USB3 standard is being rapidly adopted by designers of computing and peripheral platforms who want to
This new UCH3 family lowers system costs and speeds development by integrating programmable memory that allows you to quickly customize your products and ensure operating system compatibility, without the added cost, complexity and board space of off-chip memory. Additionally, the hybrid controller provides the flexibility to create applications with both USB3 and USB2 ports, such as mobile and PC docking stations, monitors and other peripherals. The availability of two-, three- and four-port USB3 family members enables you to easily migrate to the best UCH3 for each design within your platform. The two-, three- and four-port USB5532B-5000, USB5533B-5000 and USB5534B-5000 are available in 64-pin QFN packages. The sevenport hybrid USB5537B-5000 is available in a 72-pin QFN package.
to address the pressures of market pricing, delivery and differentiation. To meet this demand, our third-generation USB3 Controller Hubs (UCH3s) incorporate the four-member USB553XB-5000 family, which is SuperSpeed Logo Certified by the USB Implementers Forum and is the worlds first to integrate OTP Flash configuration memory. This UCH3 family also is the Programmable memory allows you to quickly customize your products.
i n d u s t r y s most flexi-
ble, as it includes a seven-port hybrid version with a certified four-port USB3 hub and three additional USB2 lanes. The remaining three family members feature two-, three- and fourport USB3 hubs, respectively, providing a broad migration path for designers of PCs, peripherals, computing platforms, storage solutions, networking and consumer devices, set-top boxes, docking stations and monitors.
Development Support
This programmable USB3 controller hub family is the latest to be supported by Microchips ProTouch hub configuration software tool, which is available today for free download from Microchips E-Services website*. ProTouch software makes it easy to generate configuration settings and program the UCH3s internal OTP Flash or any external SPI Flash.
(continued on page 10)
On the hardware side, two evaluation boards are available to support this family. The EVB-USB5537B supports the seven-port USB5537B-5000 hybrid controller hub with four USB3 connectors and three additional USB2 connectors. The EVB-USB5534BC supports the development of four-port USB3 applications along with battery charging.
With this latest family of programmable, certified USB3 controller hubs, we are continuing our legacy of leadership in the USB market. Discover how our USB3 connectivity solutions can help you achieve your own market leadership. *Note: An E-Services account is required. If you do not yet have an E-Services account, use the New User Registration link to complete a request form.
NEW PRODUCT
PIC24 Lite
Cost-Sensitive Consumer, Medical and Industrial Applications
NEW PRODUCT
ur thermal-management portfolio is one of the most extensive in the industry, offering devices that monitor
the first temp sensors to use an advanced sample-frequency-hopping filter, which avoids the injection of coherent noise and enables traces of up to 8 inches while maintaining accurate temperature readings. The EMC118X family serves a broad range of applications in the mobile, commercial and embedded computing markets by combining the above features with options for dual, triple and quad temperature monitoring, along with hardwired system-shutdown settings that cant be overridden by software. The EMC1182 is offered in 8-pin DFN and TDFN packages. The EMC1183, EMC1184, EMC1187 and EMC1188 are all available in a 10-pin DFN package. The EMC1186 is offered in an 8-pin TDFN package. As 1.8V communication compatibility has become important for all leading system chipsetsfrom tablets to PCs to smartphones the new EMC118x temp sensor family is ready to meet this requirement while also delivering a number of other advanced features.
system voltages and temperatures and also provide the capability to automatically control cooling fans to protect todays high-heat small form factor designs. The latest generation of smartphone, tablet and PC chipsets utilize advanced process geometries which have a 1.8V upper voltage limit for I/O signals, requiring that temperature sensor ICs support 1.8V SMBus and I C communications
2
The EMC118X family serves a broad range of applications in the mobile, commercial and embedded computing markets
This integrated low-voltage I/O support reduces cost and board space.
to interface to these chipsets. There are few temperature sensors with 1.8V I2C/SMBus interfaces. The new six-member EMC118X family is the worlds first family of temperature sensor ICs to provide this capability, along with a flexible set of integrated feature options. This integrated low-voltage I/O support reduces cost and board space because it is accomplished without an external voltage level shifter. It is also difficult to extend analog traces near noisy components, such as DC/DC converters and backlight inverters. The EMC118X are also
11
NEW PRODUCT
E
Programmable USB port power controllers can be updated for future charging profiles
xpanding on our popular UCS1001 and UCS1002 series of USB port power controllers, three new devices in the
products are introduced to the market, while providing compatibility with a wider range of existing products.
UCS100X family provide advanced USB-based charging capabilities for designing host devices, such as laptops, tablets, monitors, docking stations and printers; as well as dedicated AC-DC power-supply and charging products, such as wall adapters. The UCS1001-3, UCS1001-4 and UCS1002-2, which all come in a 20-pin QFN package, offer higher current and priority charging for smartphones and tablets. The UCS100X also have added support for active cables, such as the Apple Lightning connector, along with 12W
Development Support
To assist you with your designs, the UCS100X family is supported by the UCS1001-3/4 Evaluation Board (ADM00540) and the UCS1002-2 Evaluation Board (ADM00497) . With this expansion of our programmable USB port power controller portfolio, we continue to charge portable systems better than anybody else. The UCS1002 continues to be the only series of programmable USB port power controllers on the market that can be updated for future charging profiles. This flexibility is vital to preventing the obsolescence of a USB charging port.
USB 2.0 HS Switch & Charger Emulator
charging. The UCS1002-2 features a built-in current sensor that can report on the amount of charging current. This allows a system to optimize its charging
DPIN DMIN VDD VS GND UVLO, OVLO
VDD
UCS100X
DPOUT DMOUT
support future USB product designs via a flexible method for detecting and creating charging emulation profiles. This allows designers to update their systems as new
Temp
Interface, Logic
12
NEW TOOL
place. If you are looking for ways to help you develop innovative yet cost-effective lighting solutions, our new Lighting Communications
DALI Starter Kit
ntelligent control provides lighting engineers with the ability to offer improved user interfaces and value to the lighting market-
The Starter Kit includes two main boards, two communications-interface adapters (DALI or DMX512A), one prototype board and the required cables/power supplies. If you are new to lighting communications, you can quickly and easily start creating connected lighting applications via a simple board-to-board network. This platform utilizes a single, low-cost 8-bit PIC MCU for the user interface, LED control and communications. Additionally, the kit features the Cree XLamp MC-E Color LED, enabling high-lumen output in a small form factor, along with a LEDnLIGHT collimator LLC19N optic and holder by Gaggione for high-quality color mixing and tight beam control. Industry-standard lighting communication connectors and isolation devices are also included. The Lighting Communications Development Platforms are available now, including the DALI Starter Kit (DV160214-1) and DMX512A Starter Kit (DV160214-2) options. In collaborating with industry leaders in LED lighting, Microchip has developed a greater understanding of what is required to accelerate the market transition to solid-state lighting. Our focus on providing solutions for Intelligent Lighting and Control will help enable a smart lighting infrastructure, which will allow solid-state lighting to realize its full potential.
Development Platform makes the job easier. Offering you a complete out-of-the-box experience, this full-featured, universal lighting development platform provides all of the components required to create a DMX512A or DALI lighting network. This enables you to design intelligent lighting and control systems with a large array of our 8-, 16- and 32-bit PIC
microcontrollers as well as our analog, wireless, and human-interface solutions. With the ability to create fully customized lighting solutions, this new platform greatly reduces costs and provides quicker time to market via our free DMX512A and DALI software libraries, which are written in C and can be ported to any PIC microcontroller. Using a PIC MCU, you can add numerous feature enhancements into your smart lighting infrastructure designs, including increased efficiencies, reduced costs and an improved user experience. Additionally, the platform enables easy integration into an existing lighting communication network for the development of advanced network applications.
13
Simplify the Internet of Things with PIC32 M2M Development Platform for CDMA
Eases the Development of Solutions with Cloud Connectivity; Pre-Certified on the Verizon Wireless Network
NEW TOOL
E
M2M Development Platform for CDMA
nabling the Internet of Things (IoT), Machine-to-Machine (M2M) connectivity brings remote control and monitoring
serial communication interface for simple wired connectivity, microSD card support for code, event or image storage, and an on-board 3-axis accelerometer to monitor motion. The platform also includes temperature and light sensors and two expansion ports for custom sensing or connectivity development. The Verizon Advanced M2M client is included as a binary library in the platforms source code. Verizons framework allows you to push the system intelligence out to the edge the network, The platform is pre-certified on the Verizon Wireless network. enabling design to your work
to a broad spectrum of applications, improving efficiency and convenience for users. However, the cost of entry and complexity of development make it challenging to design M2M platforms. To help you add remote-management capability to your designs at a low cost of entry, our new Verizon Wireless Certified Machine-to-Machine (M2M) Development Platform for CDMA offers a fully featured hardware platform which includes the most common communication peripherals along with application processing capability. The M2M Development Platform for CDMA
(DM320017) was developed by Twisthink, LLC, a Microchip Authorized Design Partner. It enables custom embedded firmware application development on PIC32 microcontrollers with local area and remote cellular connectivity. The platform is pre-certified on the Verizon Wireless network with two-way communication capability. It enables you to develop on a standard 32-bit platform to collect data, share locally over 10/100 Ethernet and ZigBee and communicate to a cloud application. The M2M Development Platform for CDMA, which is FCC Part 15 certified, includes GPS for location-aware applications, a
needed. The kit also makes use of Verizons Application Enablement Services (AES), which allows you to dynamically change the configuration, monitoring, and thresholds of sensors without re-flashing the devices application. Solutions that are able to communicate status, alarms and even location can be developed with this new platform, making it useful for applications in the consumer, industrial and telematic markets. Some sample applications which require remote monitoring include
(continued on page 15)
14
alarm systems, home automation, remote pipeline equipment, vending machines and fleet management. You can integrate your code with pre-validated communication blocks for a remotely monitored and controlled application. Visit Twisthinks website at twistm2m.com to sign up for an M2M account for your purchased platform. This will allow you to monitor its various parameters on the twistm2m portal or develop and link to a portal hosted by
Exosite, a very flexible and intuitive online development environment. This combination of hardware and an enabling ecosystem eliminates the need for you to become a cloud or cellular technology expert. The M2M Development Platform costs $379.99 and is available for purchase today. For additional information, contact your local Microchip Sales Office.
NEW TOOL
PIC32MX3/MX4 Series
Solutions in
15
NEW TOOL
to its popularity, recently more than one million units were shipped in less than a year on the market. To help simplify Arduino-based application development for the Raspberry Pi, Microchip has partnered with element14, expanding its chipKIT platform ecosystem to produce a new Raspberry Pi tool, the chipKIT Pi Expansion Board. The Raspberry Pis processor is a 3.3V chip so its digital I/O and communications (I C, UART,
2
he Raspberry Pi is widely viewed as one of the easiest and most affordable computers on which to program. Testifying
In addition to being 3.3V-compatible, the chipKIT Pi is also the only Arduino-compatible board that brings a 32-bit MCU in a prototyping-friendly package to Raspberry Pi users. Previously, hobbyists, academics, makers and professionals who wanted to develop Arduino applications for the Raspberry Pi using prototyping-friendly, through-hole packages were forced to use boards based on 8-bit MCUs. The chipKIT Pis 32-bit PIC32 MCU is in an SPDIP package, so even non-experienced users can easily swap out the pre-populated PIC32 with a new one without having to replace the entire board. This enables all users to benefit from the PIC32s high performance, memory and integrated peripherals while using the basic hobbyist prototyping equipment that is found in most home workshops On the software side, volunteers from the chipKIT and Arduino communities collaborated with Microchips engineers to expand the free chipKIT Multi-Platform IDE (MPIDE) to allow users to create, compile and program Arduino sketch-based chipKIT applications within the Raspberry Pi operating system. The chipKIT
(continued on page 17)
the worlds first to enable the development of 3.3V Arduino-compatible applications for the Raspberry Pi using a 32-bit, high-performance MCU in a prototyping-friendly package. Existing prototyping-friendly Arduino boards, which are all based on 5V 8-bit MCUs, require users to create or purchase additional components to translate the voltages. The chipKIT Pi can interface directly to the Raspberry Pi I/O Expansion header without any additional components, reducing both cost and design complexity.
16
MPIDE is open source and compatible with the Arduino programming language and development environment. The PIC32s high level of performance, memory and integrated peripherals allows users to create applications with greater functionality, including touch sensing, audio processing and advanced control. Additionally, users can take advantage of the PIC32s Peripheral Pin Select feature, which provides the flexibility to re-map certain peripheral I/O pins to suit their applications. The chipKIT Pi board and the Raspberry Pi compatible version of the MPIDE software
further enable users to tap into the large repository of available Arduino tutorials, reference materials, curriculum and more, to create a diverse array of designs. The chipKIT Pi Expansion Board (chipKIT Pi) is priced at $28 and can be ordered from element14 or microchipDIRECT. The Raspberry Pi-compatible version of the chipKIT MPIDE can be downloaded for free from the chipKIT.net Community website. Youll also find more information and additional chipKIT resources there to help you get started today with your chipKIT design.
NEW TOOL
DEVELOPMENT TOOLS
Every month of the year, Microchip gives you great new deals on a select development tools with a savings of up to 50% off regular prices. These are limited time offers so take advantage while the deals are available and supplies last. Dont forget to check our Development Tool Deals page
18
DEVELOPMENT TOOLS
19
eeping up with the rapid pace of innovation in portable and wearable medical device designs can be challenging. Form factors are limited and, therefore, component sizes are critical. Medical devices are also becoming more sophisticated, requiring more memory for
storing calibration data and test results. Therefore, designers are constantly looking for solutions that offer high density non-volatile memory in the smallest possible packages. To help solve these challenges, Microchip offers a wide array of EEPROM and Flash memory products in wafer, die and Chip Scale Package (CSP) options. Buying whole wafers enables a lot of options for customization, such as custom wafer thicknesses down to 5 mils for ultra-thin designs. However, buying whole wafers presents challenges when it comes to handling, storage, and assembly, which are beyond the capabilities of some manufacturers. In addition, most wafers contain tens of thousands of die per wafer, making it unsuitable for low volume applications. For these designs, CSP is an excellent solution. It provides the small size of bare die while solving most of the challenges of handling and working with bare die. The CSP eliminates the need for bond wires and can be assembled using the same methods as traditional surface mount devices. In an article entitled, Miniaturized Packaging of Memory Products for Wearable Medical Applications which was recently published in EE Catalog, you can learn more about how the
CSP helps overcome the technical challenges of working with bare die.
The Chip Scale Package (CSP) is a die sized package which uses a redistribution layer to connect solder balls directly to the bond pads of the die.
Typical applications for our memory devices include digital thermometers, blood pressure monitors, glucometers and pulse oximeters. To find out more about the benefits of designing with Microchips memory products in medical applications, visit our new Medical Memory design center on the Microchip website or contact your local Microchip Sales Office.
DESIGN ARTICLE
21
Windows , Linux and Mac OS X platforms. Offered in PRO, Standard and Free editions to suit
solution for your projects development software needs. They integrate with the MPLAB X Integrated Development Environment to provide a full graphical front end which runs on
your specific needs, they are updated periodically to support new PIC devices and deliver new features and functionality.
Latest Updates
MPLAB XC8 supports PIC10, 12, 16 and 18 devices. It was recently updated to version 1.20 to add support for new PIC MCU devices, fix some reported issues and incorporate some additional capabilities. Support for the ELF/DWARF debugging file format was added to allow for a better debugging experience from the IDE. Only MPLAB X IDE will support this format, and you must ensure that you are using a version of this IDE that has support for XC8 ELF/DWARF files. Be sure that this new format is selected if you want to try it out. If you use the Free edition of this compiler, youll find that the assemblers jump-to-jump optimizations can now be enabled in this version. This option is disabled by default, but you can now turn it on to further reduce code size. Version 1.20 of the MPLAB XC16 compiler, which supports PIC24 MCUs and dsPIC DSCs, is scheduled for release soon and may even be available by the time you are reading this article. In addition to adding support for new parts and fixing some issues, this new version introduces fixed-point support. This will allow you to quickly and easily define fixed-point types and values and then perform C-arithmetic computations with them. The compiler will support saturating and non-saturating fixed-point types, accumulating and non-accumulating types, and it will offer a number of different rounding and truncation methods. The compiler will take advantage of some DSP instructions, if available, but fixed-point can be used with all 16-bit devices. Another enhancement allows the compiler to access extended RAM more efficiently on certain EP devices when the -mconst-in-data memory model is used. This might be significant if you need to access large amounts of data RAM in this model.
(continued on page 23)
DESIGN ARTICLE
22
DESIGN ARTICLE
The MPLAB XC32 compiler for PIC32 devices has been updated to version 1.21 to just incorporate support for new devices.
clearly indicate that this is the case. If you are installing a compiler which has not yet been activated, the installer will direct you to a website where you can purchase a license, use the 60-day evaluation license, or activate your license purchase. This new procedure and the updated installer application are included in the MPLAB XC8 1.20 and MPLAB XC16 1.20 compilers, and will be rolled out to MPLAB XC32 in a future release. Additional details on updates to these compilers can be found in the latest release notes. You can also find additional information on the MPLAB XC Compilers page on the Microchip website.
Now accepting
23
ardous environments where toxic gases may be present. Industries in which toxic gas sensing is used include oil and gas exploration, chemical processing plants, hospitals, semiconductor manufacturing facilities, sewage treatment plants and enclosed areas such as parking garages and tunnels. Both two- and three-terminal electrochemical gas sensors are in use today. Most of the more recent sensors employ three terminals: a sensing electrode, a reference electrode and a counter electrode (see Figure 1). A two-terminal sensor does not have a reference electrode. As the target gas passes through the membrane, it reacts with the surface of the sensing (or working) electrode, causing either an oxidation or a reduction. If the sensing and counter electrode are connected on the outside of the cell, a current will flow that is proportional to the amount of gas concentration. The reference electrode is used to provide a stable voltage potential for the sensing electrode. The working electrode will produce a varying amount of current depending on the applied potential, hence a reference electrode is used to keep the working electrode in its linear region (called the diffusion limited plateau). Small changes in potential do not affect the accuracy of the sensor. This maintains a constant sensitivity, good linearity and minimizes sensitivity to interfering gases.
(continued on page 25)
oxic gases can be grouped into three main types of hazards: combustion, long-term exposure at low concentrations and asphyxiants. The demand for reliable gas monitoring systems is growing to help ensure the safety of employees who work in potentially haz-
Capillary Diffusion Barrier Hydrophobic Membrane Sensing Electrode Reference Electrode Counter Electrode Electrolyte
DESIGN ARTICLE
24
Since the electrochemical sensor produces a current that is proportional to the gas concentration, it is considered to be an amperometric sensor. External circuitry is required to properly measure this current and to provide control for the sensor. This circuitry is called a potentiostatic circuit and serves three main functions: control, current measurement and biasing. A typical potentiostatic circuit is shown in Figure 2.
immediately once power is re-applied. If the sensor is left open circuit when powered off, it could take a few hours for the sensor to stabilize once power is applied. The control amplifier should not draw any current from the reference electrode, so a low bias current is required. Any offset on this amplifier will cause a shift in the working electrodes potential when the circuit is switched on. Since these sensors are highly capacitive, a small shift in potential can create
_ + Voltage Output
large
current
flows.
This means a low offset is important. The output of the control amplifier drives the counter electrode and needs sufficient voltage swing to drive the counter to the required potential (and with sufficient current). For the measurement
_ +
The first function is control, in which the circuitry maintains the proper voltage between the reference and the working electrode. The control circuitry provides current to the counter electrode in order to balance the ionic current that is flowing from the counter to the working electrode. The second function is to accurately measure the current that results from the presence of the target gas. This is accomplished via a transimpedance amplifier circuit, which converts the current to an equivalent voltage, along with some gain and filtering. Finally, it is common to implement a field-effect transistor (FET) that shorts the reference and working electrodes when power is removed. This ensures that the sensor will be ready
amplifier, low offset is again important as any offset error will contribute to the measured current. Since the source is low impedance, low current noise is more important than low voltage noise to optimize performance. Finally, the generated current can be bi-directional depending on if the reaction is an oxidation or a reductionso the measurement amplifier must be able to handle sinking sufficient current. Microchip offers a wide variety of amplifiers that are suitable for use in three-terminal gas detection systems. Zero drift amplifiers such as the MCP6V11 offer exceptional performance and low power, while the MCP6421 offers a more cost-effective alternative while still providing low offset and current noise. Contact your local Microchip Sales Office for more information on these products.
25
Core Independent Peripherals take 8-bit MCU performance to a new level. They incorporate a number of on-board modules designed to increase capability in any control system and offer you the best value for your embedded designs. Core Independent Peripherals are designed to handle their tasks with no code or supervision from the CPU to maintain operation. As a result, they simplify the implementation of complex control systems, which gives you the flexibility to innovate. They offer the following key attributes: Self-Sustaining Once initialized in a system, Core Independent Peripherals can provide steady-state closed loop embedded control with zero intervention from the MCUs core. The CPU can then be idled or put into Sleep mode to save system power. CPU Free Core Independent Peripherals are smartly interconnected to allow near zero latency sharing of data, logic inputs or analog signals without additional code or interruption of the CPU. This frees the CPU to perform other system tasks and reduces Flash memory consumption. Significant Savings By taking the load off the CPU, Core Independent Peripherals allow smaller, lower-power PIC MCUs to perform extremely complex tasks, such as high-power lighting control and communication. In addition, significant BOM cost savings can be realized by replacing off-board discrete components with these integrated peripherals.
(continued on page 27)
very day, our 8-bit PIC microcontrollers are finding their way into new applications like smart
phones, audio accessories, video gaming peripherals and advanced medical devices. If you are looking for a creative solution for your new design, our PIC microcontrollers with
DESIGN ARTICLE
26
DESIGN ARTICLE
The CWG also incorporates auto shutdown and auto restart and can interface directly with other peripherals/external inputs. The COG improves upon the functionality of the CWG with the addition of blanking and phase control. The CWG and COG are available on the PIC10F32X, PIC1XF150X, PIC16F145X, and PIC1XF75X families of devices. Features Provides non-overlapping complementary waveform Various input sources inclusive of comparators, PWM, CLC, NCO Blanking control for transient filtering (COG only) Phase control for output delay (COG only) Auto shutdown/restart Independent rise and fall Dead band control Polarity control High Resolution PWM (HRPWM): Available in the PIC10F32X and PIC1xF150X families, this is a patented solution using the CLC and NCO to provide High (Effective) Resolution Pulse Width Modulation at much higher switching frequencies than achievable with standard PWMs. This feature allows the use of smaller inductors and capacitors and has the ability to induce jitter, lower cost and improve EMC performance. Features Up to 17 effective bits PWM capability at high frequency 15 ps Pulse Widths at 500 KHz switching Induced jitter with improved EMC performance Programmable Switch Mode Controller (PSMC): If you are using the PIC16F178X family of MCUs, the PSMC is a high performance 16-bit PWM with six configurable outputs that can operate in multiple modes. With a dedicated 64 MHz clock and the flexibility
(continued on page 28)
27
DESIGN ARTICLE
to interface to external inputs as well as integrated peripherals/clock sources, the PSMC offers the highest level of advanced PWM control and accuracy in an 8-bit MCU. The PSMC can simplify the implementation of a wide array of applications such as motor control, lighting and power supplies. Features 16-bit PWM with up to six configurable outputs Various clock sources: external, system clock, independent 64 MHz oscillator Various input sources: comparators, external pins, other peripherals Blanking control for transient filtering Independent rising/falling edge control Dead band with independent rise and fall control
Polarity control/auto shutdown and restart Output Gating externally control activate/ deactivate Flexible PWM output modes To learn more, visit the new Core Independent Peripherals area on the Microchip website. There you will find links to a number of documents including user guides and application notes, as well as tips and tricks for implementing these peripherals in your designs. You can also take some self-paced training sessions and watch some videos to help you become familiar with their features and applications. Let our 8-bit MCUs with Core Independent Peripherals help you unleash your creativity to bring more innovative solutions to market.
28
rdering from microchipDIRECT has never been easier. Our simplified home page and updated web interface will help you quickly locate the right Microchip product, add it to your cart and checkout. Other new features include:
Easy re-order from past orders Connectivity focus with easy-to-find links to our newly acquired Roving Networks and SMSC products Credit card transactions hosted securely with CyberSource Corporation, a VISA company With sales support for 68 countriesand more to be addedmicrochipDIRECT gives you convenient access to the largest inventory of Microchip products, 24 hours a day, 7 days a week. Visit www.microchipDIRECT.com and place your order today!
microchipDIRECT
29
edge to solve your problems or meet your opportunities. Since training needs can vary widely by individual or business requirements, we offer a range of opportunities, from face-to-face training at events like our MASTERs, instructor-led web-based classes or pre-recorded training over the web on a number of timely and informative topics, some available as self-paced learning modules.
e know that solving technical problems and getting your product to market quickly is vitally important to your business. Microchip is dedicated to providing you with the resources you need to help you get the job done, including many ways to acquire knowl-
TRAINING ROOM
30
TRAINING ROOM
directly to the heart of the topic and provides focused training on that specific subject. The training includes knowledge checks to help you decide if you need to repeat the material or are ready to move on. Most have code examples to demonstrate the material. For more information on these and other training options available from Microchip, visit the Training page on our website.
Applications:
TCP-IP Intro Part 1: Local Network TCP-IP Communication TCP-IP Intro Part 2: TCP-IP 5 Layer Model and Applications TCP-IP Intro Part 3: TCP-IP Client Server Model TCP-IP Intro Part 4: TCP-IP Sockets and Ports TCP-IP Intro Part 5: Local Network and Internet TCP-IP Communication
Peripherals:
Digital Input Output on 8-bit Microchip PIC MCU Using the Configurable Logic Cell Using the Timer1 Gate Function to Measure the Width of a Pulse Using the Numerically Controlled Oscillator Using the Complementary Waveform Generator
31