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.