Welcome to the training module on Microchip’s 16-bit and 32-bit PIC MCUs.
This training module will discuss Microchip’s 16 and 32 bit products, how to choose the right 16 and 32 bit Microchip Product for your embedded application.
Microchip’s 16 bit products
Just to recollect: a designer has been designing a water system to automatically water his lawn. He has constantly raised the bar in his watering system design and has thus far been successfully meeting the challenges using newer and larger PIC products. Let us offer another challenge to him. The designer wants to collect data from his watering system. Using the temperature and humidity data he has collected over a period of time, he wants to analyze the data to maximize the efficiency of his watering system. In order to do this the designer needs to collect the data over a period of time then download the data to a portable USB thumb drive. He could then analyze the data using his desktop PC. The solution we have for this application is to use a PIC24F Microchip USB device.
First let’s discuss the new changes in the PIC24F family. Just a reminder that the changes in the new architectures are show in red blocks. PIC24F MCUs now have a 16-bit core operating at 16 Million Instructions per second or MIPS. The core has a 16 –bit ALU and sixteen, 16-bit file registers also known as working registers. These are typically referred to as w registers in the 8-bit core. There is a 17 by 17 multiplier to help out in math functions. A barrel shifter is added, which can shift right or shift left multiple times in a single cycle operation. For example if we want to shift say a 16 bit value 4 times left, then this can be very easily accomplished using the barrel shifter in one single cycle operation. A JTAG interface is now available for emulation and testing. Since a majority of the programs on a 16-bit processor will be written in C and to accommodate space for these programs a large amount of Flash program and data memory is now available 256KB of flash and 16Kb of RAM. Many peripherals are also available and many of them overlap with our 8-bit offering. The two new peripherals which stand out are the USB on the go or OTG peripheral and the CRC error correction peripheral. The OTG USB peripheral helps a customer design a host, device, dual role and OTG USB implementation in an embedded application.
There are over 40 devices in the PIC24F family with pin counts from 20 to 100 pins. An architecture designed for C code efficiency. More flash program and data memory are used to run large C programs. Peripheral pin select allows for re-routing digital peripherals to different I/O pins on a device. USB OTG allows a host, device, dual role and OTG configuration. Charge time measurement unit and extreme low power sleep current
Getting back to the application mentioned at c page: the application is satisfied with the peripherals in the PIC24F family but the designer needs more throughput or horse power to run his application. Well the Microchip solution would be to use the PIC24H family of products.
The PIC24H family is pretty much the same as the PIC24F family. The main difference is a faster Core running at 40 MIPS. In order to help faster operation , it also has an 8 channel DMA to help handle peripheral data. To understand how a DMA helps handle peripheral data let us look at how a DMA may work with peripherals.
To understand how a DMA works with say a UART, let us first look at how a typical CPU would handle a UART peripheral. First, the UART is getting serial data. When its buffer is full, it will interrupt the CPU to indicate its full status. The CPU has to then stop what it is doing, retrieve the data and then saves it in RAM for some later operation. This is done for every byte of data received. If this data is coming in large chunks and at a fast rate, then the CPU gets interrupted quite a bit and the overall CPU throughput suffers.
The UART can be assigned to one channel of the DMA. When the UART is full, the DMA is programmed to automatically get the data from the UART buffer and loads it into RAM. Not only that the DMA can be programmed to get multiple bytes of data from the UART and load it into RAM. When the specified number of data bytes is reached, the DMA then interrupts the CPU to signal that N number of data bytes are now available for analysis. In this manner the CPU can do other more important tasks and leave peripheral handling to the DMA, thereby increasing the overall CPU throughput.
Compared to the PIC24F products, the PIC24H runs at a fast 40 MIPS. There is more flash program and data memory. The DMAs available on the PIC24H family enhances the overall throughput and makes the CPU more efficient. It also has more accurate peripherals. If an application requires more throughput, the designer could certainly use this family of products.
Microchip’s dsPIC Products.
Adding a new challenge to the previous application. What if the designer needed to add a voice recognition or voice activated input to his system. Speech recognition is a computationally challenging application. In this case Microchip’s Digital Signal processors or dsPICs would be the ideal solution for this kind of application.
The first member of the dsPIC family is the dsPIC30F family. As seen in the blue blocks, the Core now has a DSP engine in it. This DSP engine can perform a 16 by 16 multiply and accumulate operation in a single cycle. The accumulator is 40 bits wide to allow for overflow from a 16 by 16 multiply operation which normally would gives us a 32 bit result. A codec interface is available for speech purposes. The dsPIC30F family is also designed for Motor Control applications so a special Motor Control PWM peripheral is available along with a Quadrature decoder interface which helps locate the position of a rotor in a motor control application. Some products also offer high speed Switch Mode Power Supply PWMs well suited for Switch Mode Power supply applications.
dsPIC30F has over 20 products running at 30 MIPS. With peripherals like a single cycle MAC, high resolution 12 bit ADC and CODEC interface, this family is well suited for speech processing. And the designer can use it for his voice activated watering system mentioned before. This family is also designed for Motor Control and Switch Mode Power Supply applications.
Another member of the dsPIC family is the dsPIC33F family of products. As can be seen nearly all of the peripherals of the dsPIC30F are present in this family. To improve the throughput however, the CPU speed has been increased to 40 MIPS and an 8 Channel DMA has been added. As we have seen previously adding a DMA greatly enhances the peripheral handling of the CPU thereby increasing its overall through put.
The dsPIC33F family offers over 33 products which run at a faster 40 MIPS. More program flash and data ram is offered along with all peripherals required for Speech analysis and control, motor control and switch mode power supply applications.
Microchip’s 32-bit products.
A New challenge to the previous application would be create a super water system with all the bells and whistles. Internet connection, connection to a PDA, a graphics QVGA screen as a display and touch control basically the Rolls Royce of all watering systems. Well for this solution we would have to choose the PIC32 MCU.
The PIC32 has the MIPS M4K core. This core runs at 80 MIPs with a dual set of thirty two, 32-bit registers. These two sets of registers can be swapped, one set to another in a single cycle. This operation is very useful and achieves faster interrupt handling. The core also has a 32-bit hardware multiply and divide module. Its ALU has a 32-bit five stage pipeline for faster operation. To handle peripherals a DMA is available. All common peripherals offered on other PIC products are also available on the PIC32. To talk to a PDA a USB OTG with a dedicated DMA is available. Interfacing with a QVGA graphics panel, can be easily accomplished using the 16-bit Parallel Master Port. Nick can certainly design his top end watering system with the PIC32
In a bullet format the PIC32 family has 17 products built around the MIPS M4K core and running at 80 MIPS. It has a 5 deep pipeline and achieves a throughput of 1.56 Drystone MIPS per mega hertz. Large amount of flash and data RAM. DMA control for all peripherals. Multiple channels of the Usual peripherals like ADC, UARTs, SPI, I2C etc. USB OTG with a dedicated DMA and a 16-bit Parallel Master Port to communicate with 16-bit peripheral devices.
What hardware platforms would Nick use to develop his 16 and 32 bit applications.
The top of the line debugger from Microchip is the MPLAB Real Ice. This is a high performance real time debugger with unlimited debugging capability and real time data monitoring features. The middle of the road solution is the MPLAB ICD3. This debugger offers limited debugging and real time data monitoring features. At the low end of the spectrum we have the PICkit 3 debug express which is Microchip’s entry level debugger. Depending on your application complexity you now have a choice of selecting the appropriate debugger. Depending on your application complexity you now have a choice of selecting the appropriate debugger. For most 16 and 32 bit applications Microchip would highly recommend the Real Ice debugger.
In order to jump start the hardware platform for your design, Microchip offer a whole list of starter kits. The most important feature offered in a starter kit is that a debugger is included as part of the starter kit. The starter kit is low cost and has some hardware and prototyping area for a customer to evaluate a PIC product. All starter kits are supported on MPLAB and most are bundled with a C compiler making it easy for the end user to program and evaluate the PIC device.
The PIC24F Starter Kit 1 is a one stop demo board to getting started using a 16-bit PIC24F. The Board highlights the PIC 24F USB MCU as an embedded Host, dual role or OTG application. As an embedded host it has firmware to interface directly to a USB Flash Drive connected to it. It has a high resolution OLED display and a touch keypad interface for user inputs. It has a built in MPLAB compatible Debugger built on the board. Power to the board is provided by the PC via the USB cable. With the free C compiler and free MPLAB IDE provided, Nick can very easily start developing code for his application using this board.
The dsPIC starter Kit would get the designer started on his dsPIC application. This board has the codec interface for voice capture and playback. Input from a microphoneand output to a speaker are built in. It comes with a integrated debugger compatible with MPLAB and a free C compiler. For the voice activated watering system the designercould use this starter Kit.
The PIC32 USB Starter board is a one stop Demo board featuring the PIC32 USB MCU. It is based on thePIC32 USB MCU and it highlights the Embedded Host and OTG capability of the PIC32 MCU. A USB Peripheral Device interface/connector is available for connection to say a Flash Drive. A special OTG port is also available for connection to other USB OTG applications. A MPLAB compatible debugger interface is built in to the board so no addition debugging tool is needed. Power to the board is provided by the USB to PC interface on the debugger port.
A more general purpose hardware solution for 16 and 32-bit products is to use the Explorer 16 demo board. This demo board has a LCD display, LEDs, switches and a Plug In Module header or PIM header to which different PIMs can be plugged. PIMs for all microchip 16 and 32 bit devices are available. The board also has two expansion connectors. Additional specialized PICTail board can be purchased from microchip to plug into these connectors. Example of such PICtail boards are the Ethernet PICTail, the QVGA pictail, USB Pictail etc. This board supports all Microchip’s 16 and 32-bit products.
As we have seen in Microchip’s portfolio, there are a lot of parts available. So it may be a little bit intimidating for a customer to select the right part for the assignment at hand. To help customer select the right product for their application, Microchip has come up with a solution on its website
The solution is Microchip’s Advanced Part Selector commonly abbreviated as MAPS. The challenge is to select one MCU from over 500+ MCUs and also to select the right memory and analog products for the application. MAPS is available on Mixrochip’s website at: www.microchip.com forward slash MAPS. The lead page gives you three choices to start with: microcontroller, analog and memory. Let us start with the Micro first…
Selecting Microcontroller, give you a page where you can now enter the features that you would like to see in the MCU of your choice. You can choose from 8, 16 or 32 bit products and a whole list of peripherals some which may be important to have, some a maybe and some not at all. Pull down tabs allow you to select these options and when you are satisfied you can view all the parts which meet these requirements. If you have too many options you may want to narrow you search using filters and narrowing your requirements down. When you are down to a handful of parts, you can do a side by side comparison between part as in the next slide ..
A side by side comparison allows you to get a better view of the parts and compare and contrast if one part is better than the other. Hopefully you will have narrowed your search down to one or two. At which point you can order samples or look at pricing.
Thank you for taking the time to view this presentation on “ Microchip’s 16-bit and 32-bit PIC MCUs” . If you would like to learn more or go on to purchase some of these devices, you may either click on the part list link, or simply call our sales hotline. For more technical information you may either visit the Microchip site, or if you would prefer to speak to someone live, please call our hotline number, or even use our ‘live chat’ online facility. You may visit Element 14 e-community to post your questions.
Microchip's 16-bit and 32-bit PIC MCUs
Microchip’s 16-bit and 32-bit PIC MCUs <ul><li>Source: Microchip </li></ul>
Introduction <ul><li>Purpose </li></ul><ul><ul><li>To discuss Microchip’s 16 and 32 bit products and introduce how to choose the right 16 and 32 bit Microchip Product for your embedded application. </li></ul></ul><ul><li>Outline </li></ul><ul><ul><li>Microchip 16-bit MCUs </li></ul></ul><ul><ul><li>Microchip dsPIC products </li></ul></ul><ul><ul><li>Microchip 32-bit MCUs </li></ul></ul><ul><ul><li>Microchip’s Hardware Solutions </li></ul></ul><ul><li>Content </li></ul><ul><ul><li>33 pages </li></ul></ul>
One Practical Problem <ul><li>Problem: Needs to monitor watering data and temperature to make system more efficient </li></ul><ul><li>Solution: Create a Embedded USB Host and download data to Thumb drive </li></ul><ul><li>Use a PIC24F device </li></ul>
PIC24F Family 16 MIPS 16-bit Core 16-bit ALU Register File 16 x 16 17 x 17 MPY Address Generation Barrel Shifter JTAG & Emu. Interface Memory Bus 8 – 256 KB Flash 0.5 - 16 KB RAM Peripheral Bus Interrupt Control Peripheral Pin Select CRC USB On-the-Go 0 – 512 B EEPROM 20 – 100 pin packages nanoWatt XLP Low Power Resources UART - 4 SPI - 3 I 2 C TM - 3 Real Time Clk Calendar Parallel Master Port Out Comp./PWM - 9 Input Capture - 9 16-bit Timers - 5 Charge Time Meas Unit Watchdog Timer Comparators - 3 ADC, 10-bit, 16 ch. 500ksps
Solutions: PIC24F Products <ul><li>16-bit devices @ 16 MIPS </li></ul><ul><ul><li>>40 products in 20 – 100 pins </li></ul></ul><ul><ul><li>Arch. for efficient C code </li></ul></ul><ul><ul><li>8 – 256 KB Flash, 0.5 – 16 KB RAM, EEPROM </li></ul></ul><ul><ul><li>Peripheral Pin Select </li></ul></ul><ul><ul><li>USB OTG </li></ul></ul><ul><ul><li>Charge Time Measurement Unit </li></ul></ul><ul><ul><li>nanoWatt XLP eXtreme Low Power <20nA Sleep Currents </li></ul></ul>
The Application Needs More HP <ul><li>Problem: the application need more Through put </li></ul><ul><li>Solution: Use the PIC24H family </li></ul>
PIC24H Family 40 MIPS 16-bit Core 16-bit ALU Register File 16 x 16 17 x 17 MPY Address Generation Barrel Shifter JTAG & Emu. Interface 12-256 KB Flash Memory 1-16 KB SRAM Interrupt Control UART 1-2 Peripheral Pin Select SPI 1-2 I 2 C TM 1-2 RTCC PMP CRC Out Comp./PWM Input Capture 16b/32b Timers - 5 0-2 ECAN WDT & PWR Mgmt Analog Comp. 0-2 ADC, 10/12-bit, 32CH 8 CHANNEL DMA Memory Bus Peripheral Bus
UART Data Handling CPU 01011100 FULL UART Interrupt 01011100 RAM 01011100 1 2 3 4 5
UART Data Handling with DMA DMA 01011100 FULL UART Controls 01011100 RAM 01011100 01101110 01001010 CPU Interrupts 1 2 3 4
New Challenge <ul><li>Challenge: </li></ul><ul><ul><li>Wants the whole enchilada: </li></ul></ul><ul><ul><li>Internet Connection to his PC </li></ul></ul><ul><ul><li>Connection with his PDA </li></ul></ul><ul><ul><li>QVGA display with touch control </li></ul></ul><ul><ul><li>Rolls Royce of all watering systems </li></ul></ul><ul><li>Solution: </li></ul><ul><li>Use Microchip’s 32-bit MCU – PIC32 </li></ul>
8-32 KB RAM 32 – 512 KB Flash 80MHz MIPS 32-bit Core 32-bit ALU 5 stage pipeline Vectored Interrupt Ctrl 32-bit HW MUL / DIV 32 Core Registers 32 Core Registers JTAG PIC32 Family High Speed Bus Matrix Peripheral Bus Interrupt Control Inst. Data Prefetch + Cache 0-4 Ch. DMA VREG POR BOR USB OTG 16-bit Timers Watchdog A/D, 10-bit, 16 ch. GP I/O UART - 2 I2C™ - 2 SPI™ - 2 Cap/Com/PWM - 5 PMP16-bit Data RTCC Analog Comp- 2 LVD
PIC32 Products <ul><li>PIC 32 Products: </li></ul><ul><ul><li>17 M4K 32-bit MIPS Core products @80 Mhz </li></ul></ul><ul><ul><li>5 deep Pipeline; 1.56DMIPS/Mhz </li></ul></ul><ul><ul><li>512 K Flash, 32 K RAM </li></ul></ul><ul><ul><li>32x32 hardware Multiply/Divide </li></ul></ul><ul><ul><li>DMA controlled Peripherals </li></ul></ul><ul><ul><li>16 Ch -10bit ADC and Comparators </li></ul></ul><ul><ul><li>2xUART, 2xSPI,2xI2C, USB OTG w/DMA </li></ul></ul><ul><ul><li>16-bit Parallel Master Port </li></ul></ul>
Which debugger tool to use? <ul><li>Top end: MPLAB REAL ICE http:// www.microchip.com/realice </li></ul><ul><ul><li>High performance </li></ul></ul><ul><ul><li>More features, more options </li></ul></ul><ul><li>Middle of the road: MPLAB ICD3 http://www.microchip.com/ICD3 </li></ul><ul><ul><li>High performance </li></ul></ul><ul><ul><li>Some key functional features provided </li></ul></ul><ul><li>Low end: PICkit3 Debug Express http://www.microchip.com/Pickit3 </li></ul><ul><ul><li>Lower performance </li></ul></ul><ul><ul><li>Less features </li></ul></ul><ul><ul><li>Bundled with Demo board </li></ul></ul>
Starter Kits <ul><li>Starter Kits for all Families </li></ul><ul><ul><li>Includes debugger </li></ul></ul><ul><ul><li>Low Cost </li></ul></ul><ul><ul><li>Easy evaluation of Part </li></ul></ul><ul><ul><li>MPLAB IDE required </li></ul></ul><ul><ul><li>Most bundled with C Compiler </li></ul></ul>
PIC24F Starter Kit <ul><li>Easy and inexpensive way to learn the PIC24F 16-bit MCU family </li></ul><ul><li>Starter kit features the PIC24FJ256GB110 MCU with 256KB Flash </li></ul><ul><li>Peripherals including CTMU for capacitive touch and USB OTG </li></ul><ul><li>Integrated debugger </li></ul><ul><li>Free MPLAB C Compiler </li></ul>Debugger Application USB Peripheral Device Ports Debugger Port PIC 24F4 Starter Kit Part #DM240011
dsPIC DSC Starter Kit <ul><li>Integrated debugger / programmer </li></ul><ul><li>USB powered </li></ul><ul><li>dsPIC33FJ256GP506 DSC with 256 KB Flash and 16 KB RAM </li></ul><ul><li>16/24/32 bit codec with a maximum sampling frequency of 48KHz </li></ul><ul><li>Audio capture and play back </li></ul><ul><li>Microphone and line level inputs </li></ul><ul><li>100mW headphone amplifier </li></ul><ul><li>2 switches and 3 LEDs </li></ul><ul><li>4 Megabit serial flash </li></ul><ul><li>Temperature sensor </li></ul><ul><li>MPLAB C Compiler; code examples and user’s guide </li></ul><ul><li>All tools for developing and prototyping speech and audio applications </li></ul>dsPIC DSC Starter Kit Part #DM330011
PIC32 Starter Board <ul><li>Free MPLAB C32 C Compiler </li></ul><ul><li>Example source code for projects and all peripherals </li></ul><ul><li>Integrated programmer/debugger; USB powered </li></ul><ul><li>3 LEDs/Switches </li></ul><ul><li>PIC32 running at 72 MHz with 512K Flash, 32K RAM, 4 ch. DMA 3 user </li></ul>Debugger Port Debugger Port USB Peripheral Device Port OTG Port
Explorer 16 Compatibility Overview dsPIC33 PIM Explorer 16 + + <ul><li>Customize with optional PICTail Plus cards </li></ul><ul><li>Add a Debugger </li></ul><ul><li>(Starter Board Includes Debugger) </li></ul>QVGA Ethernet SD Card ..and more Third Party JTAG Probe PIC24F PIM PIC32/24F USB PIM PIC32 GP PIM + USB PICTail+ <ul><li>PICK YOUR PIC </li></ul>
MAPS <ul><li>How to select the right microcontroller between more than 500 products? </li></ul><ul><li>How to easily find Microchip analog/memory component given a set of electrical parameters or competitor part number ? </li></ul><ul><li>> Microchip Advanced Part Selector < </li></ul><ul><li>http://www.microchip.com/MAPS </li></ul><ul><li>MAPS exists as 2 versions : </li></ul><ul><ul><ul><li>Online version (internet access necessary) </li></ul></ul></ul><ul><ul><ul><li>Installable version on your PC </li></ul></ul></ul>
MAPS (8/16/32 MCUs) <ul><li>Enter technical features and find matching products. </li></ul><ul><li>Filters by family or prefix </li></ul>
MAPS (8/16/32 MCUs) Side by side comparison of up to 4 devices in parallel for easy reference Export to EXCEL
Additional Resource <ul><li>For ordering Microchip 16-bit or 32-bit MCUs, please click the part list or </li></ul><ul><li>Call our sales hotline </li></ul><ul><li>For more product information go to </li></ul><ul><ul><li>16-bit MCUs & DSC 32-bit MCUs </li></ul></ul><ul><li>Visit Element 14 to post your question </li></ul><ul><ul><li> www.element-14.com </li></ul></ul><ul><li>For additional inquires contact our technical service hotline or even use our “Live Technical Chat” online facility </li></ul>