1 Using PIC32 MCUs to Develop Low-Cost Controllerless (LCC) Graphics Solutions Author: INTRODUCTION Adam Folts, Microchip Technology Inc. As the demand for Graphical Embedded Applications becomes more popular, so does the need for developing cost effective solutions. Today, many companies offer solutions involving an additional internal or external graphics controller as part of a system, which may result in higher costs and more complicated designs. In most cases, for a simple embedded Graphical User Interface (GUI), these graphics controllers are not necessary, but a suitable solution may not be available. One solution that is becoming more popular is to use a controllerless solution. This solution uses microcontroller (MCU) peripherals to create a virtual graphics controller for graphics rendering without taking up large amounts of CPU time (in this solution less than 5%). The Low-Cost Controllerless Graphics PICtail Plus Daughter Board (referred to as the LCC Graphics Board), was designed to showcase a technique offered by Microchip that utilizes this low-cost controllerless method and is designed to work with many existing PIC32 starter kits. This application note describes the LCC Graphics Board that enables the implementation of a low-cost controllerless graphic method using a PIC32 microcontroller. Basic Graphics Definitions Pixel One dot of color data on a LCD. Refresh Rate Defined in Hertz (Hz), the rate at which the LCD panel frame is being redrawn per second. Resolution Defined in horizontal by vertical dimensions, the number of pixels a certain display panel contains. For example, a QVGA LCD panel that is 320x240 pixels has a horizontal pixel count of 320 and a vertical pixel count of 240. Pixel Clock (PCLK) LCD panels use this signal to synchronize the sampling of incoming color data. The clock signal needs to be faster for higher resolutions so that all pixels of a frame can be clocked. Frame Buffer Volatile memory where pixel color data is stored for the purposes of refreshing an LCD screen of a certain resolution. Pixel Throughput Speed at which a pixel can be redrawn. The time to draw an entire frame would be pixel throughput multiplied by the LCD screen resolution. Color Depth Defines how many possible colors a pixel can be drawn. Commonly represented in bits per pixel (BPP), a common color depth is 16 BPP, where the color data is represented in a 565 RGB color format. In this format, 565 represents 5 red, 6 green, and 5 blue color bits Microchip Technology Inc. DS01387B-page 1
2 SETTING UP A CONTROLLERLESS GRAPHICS SYSTEM In general, a controllerless graphics system needs to send a frame of pixel information to a display glass at a certain rate. This refresh rate is usually around 60 Hz. To do this, the system must constantly send frame data to the LCD panel. At first inspection, it seems like this task would take up most of the CPU time in an MCU. However, this is not the case for PIC32 MCUs that contain a Direct Memory Access (DMA) peripheral for data transfer. With a DMA transferring the pixel data, less than 5% of CPU time can be used to achieve a virtual graphics controller. PIC32 MCUs have a built-in DMA peripheral. This peripheral can transfer data from one location to another without CPU intervention. In a controllerless graphics method, the DMA is set up to transfer one line of frame data at a time through the Parallel Master Port (PMP). Each line consists of many pixels. The DMA sends a portion of the frame buffer during one transfer. A PMP or Timer interrupt request is used to trigger the next DMA transfer until a line is transferred. In PIC32 devices with non-persistent interrupts, a timer is used as the DMA trigger source. During data transfers, the PMP strobes a read or write signal after each pixel transfer. The read/write strobes of the PMP peripheral act as the pixel clock for the display glass. After each line of pixel data is transferred, the CPU is interrupted by the DMA and certain timing signals (e.g., HSYNC, VSYNC, and DEN) necessary for LCD panels are updated. This is repeated continuously until an entire frame has been drawn. The frame is stored in volatile memory so the image can be dynamic. In this setup, SRAM memory is used. This configuration is the foundation for a controllerless graphics system. The system can be set up to use internal SRAM memory or external SRAM memory. The system diagram is illustrated in Figure 1 and Figure 2. Mapping color to an TFT LCD display is done by using the PMP data lines. Depending on the color format used, the 16 PMP data lines can be configured to transmit the color data. In 8 BPP Color mode only eight PMP data lines are needed. When using external memory for 16 BPP Color mode, eight or 16 PMP data lines can be used. If eight data lines are used, the external memory data lines still get mapped to the TFT LCD in 16 BPP mode; however, the PIC32 MCU only connects to the memory through eight bits. When a write needs to be performed, the PIC32 MCU can then use the low/high byte pins on the external memory to send 16-bit color values to the SRAM. FIGURE 1: EXTERNAL MEMORY METHOD Pixel Write (SRAM) Frame Buffer DMA Read from PMP Display Glass (Glass updated in parallel with DMA Read) FIGURE 2: INTERNAL MEMORY METHOD PMP Display Glass Internal SRAM DMA Write (Data sent to glass during DMA PMP write) DS01387B-page Microchip Technology Inc.
3 DMA AND PMP INITIALIZATION ROUTINE Code to set up and initialize the DMA and PMP is provided in Example 1. This code is a snippet from the LCC driver software, and is being provided as a reference to show how easy it is to set up a system for controllerless graphics. It is not intended for copy and reuse purposes. EXAMPLE 1: DMA AND PMP INITIALIZATION SOURCE CODE //Suspend ALL DMA transfers DMACONbits.SUSPEND =1; #define PMP_CONTROL (PMP_ON PMP_MUX_OFF PMP_READ_WRITE_EN \PMP_CS2_EN PMP_CS2_POL_LO PMP_WRITE_POL_LO PCLK_POLARITY) #define PMP_MODE (PMP_DATA_LENGTH PMP_MODE_MASTER2 \PMP_WAIT_BEG_1 PMP_WAIT_MID_1 PMP_WAIT_END_1) // Set up the PMP // PMP is setup to use data and address lines, in 16 bit PMP mode // PMP wait states are set to fastest mpmpopen(pmp_control, PMP_MODE, PMP_ADDRESS_LINES, PMP_INT_ON); // Set PMP address to 0 PMADDR = 0x0000; // Open the desired DMA channel DmaChnOpen(1, 0, DMA_OPEN_DEFAULT); // Set the transfer event control: what event is to start the DMA transfer DmaChnSetEventControl(1, DMA_EV_START_IRQ(_TIMER_2_IRQ)); // Set the transfer parameters: source & destination address, source & destination size, // number of bytes per event source is the PMP, destination is a dummy array, source size is // 2 for 16-bit color, first destination size is the backporch, transfers per event is two. DmaChnSetTxfer(1, (void*)&pmdin,&graphicsframe, 2, HBackPorch, 2); // Set INT controller priority to 7 for highest priority INTSetVectorPriority(INT_VECTOR_DMA(1), INT_PRIORITY_LEVEL_7); // Set INT controller sub-priority INTSetVectorSubPriority(INT_VECTOR_DMA(1), INT_SUB_PRIORITY_LEVEL_3); // Enable the transfer done interrupt, when all buffer transferred DmaChnSetEvEnableFlags(1, DMA_EV_BLOCK_DONE); // Enable the interrupt in the INT controller INTEnable(INT_SOURCE_DMA(1), INT_ENABLED); // Once configured, enable the DMA channel DmaChnEnable(1); // Turn on Timer2 to act as a "trigger" for the pixel clock (DMA transfer) OpenTimer2(T2_ON T2_SOURCE_INT T2_PS_1_1, 10); // Start ALL DMA transfers DMACONbits.SUSPEND = 0; Microchip Technology Inc. DS01387B-page 3
4 BASICS OF THIN-FILM TRANSISTOR (TFT) LCD PANELS There are different types of LCD glass to choose from in the marketplace. The controllerless graphics method was designed to work with TFT LCD panels, but can work with CSTN or MSTN glass with minor modifications. Figure 3 shows a typical timing of a TFT display panel. The data lines consist of the pixel color information. Most LCD panels can have 8 to 24 color data lines depending on the color depth of the LCD panel. These data lines supply the LCD panel with the raw color data of each pixel. The clock signals HSYNC, VSYNC, DEN and PCLK are used to synchronize the pixel data with the graphics frame and the LCD panel. The sync lines tell the LCD panel when the data is at the start or end of a line (HSYNC) or a frame (VSYNC). The DEN, or data enable line, lets the LCD panel know when valid pixel data is being sent to the LCD panel. The DEN is required for TFT type LCD panels because there is time required to set up the LCD panel for proper pixel locations. This setup time is shown in Figure 3 as the gray non-display area. The Microchip logo represents the area of the timing where valid pixel data needs to be sent to the screen. This is where the DEN is asserted high. Data is sent one line at a time until the entire frame is drawn. The PCLK signal is not shown, but is the clock source for the whole system. One clock pulse from the PCLK updates the LCD panel. All other clock lines must be synchronized to the pixel clock to achieve proper image output. Not all display panels have HSYNC, VSYNC, and DEN lines. This application note covers panels that can be used to explain each line and its purpose. LCD panels not containing HSYNC and VSYNC signals can still be used with the controllerless graphics setup. The LCC software driver is set up to help with synchronization needing certain timing parameters, such as pulse width, front porch, and back porch for both horizontal and vertical pulses. After these values are compiled into the LCC Graphics driver, the LCD Panel displays the frame. These timing constants can be found in the data sheet of the specific LCD Panel to be used. It is usually a value given in pixel clocks. These constants help set up the proper frequencies needed for accurate image data on the display. FIGURE 3: CLOCK SIGNAL SETUP TIMES HSYNC DEN Non-display Area VSYNC DS01387B-page Microchip Technology Inc.
5 LCC GRAPHICS FLOWCHART Figure 4 shows what happens inside the PIC32 microcontroller when a graphics frame is being sent to the display. The DMA/PMP block indicates what the DMA and PMP peripherals that share the data bus with the CPU are performing. The CPU block indicates the tasks required for graphics rendering. The DMA Interrupt Service Routine (ISR) is the only code that must be written besides setting up the DMA and PMP peripherals to send a graphics frame to the display. This flowchart does not specify the location of the graphics frame (internal or external), and it does not describe updating the frame image. FIGURE 4: PIC32 MICROCONTROLLER LCC GRAPHICS FLOWCHART PIC32 Microcontroller CPU loading is minimal as the only function the CPU is required to do is to update the timing signals and set up the next DMA transfer during the DMA ISR. DMA ISR Update Timing Signals Send One Pixel of Frame Line of Data to the Screen from SRAM End of Line? Call DMA ISR Set up Line Transfer Update Pixel Clock (PMP Read/Write Strobe) Interrupt Trigger CPU DMA/PMP Microchip Technology Inc. DS01387B-page 5
6 TIMING DIAGRAMS Many questions come up as to how the whole system works. A good way to address these questions are by the use of what is produced at run-time. This can be seen in some of the timing diagrams that are created in the system. This section shows several different timing diagrams of the system, which demonstrates how low-cost controllerless graphics works. Figure 5, shows the pixel clock that is generated by the PMP strobe (read or write). The pixel clock is required by the TFT LCD panels and the PIC32 device can generate signals up to 15 MHz, which is sufficient for WQVGA solutions. All timing diagrams were taken with a pixel clock of 13 MHz. To change the speed of the pixel clock, the system can slow down the PMP or DMA transfer speed. An SRAM with support for these pixel clocks must be considered. This signal can be seen by probing the SHIFT test point seen on most Microchip graphics display boards. Figure 6 shows a typical frame rate of a graphics system. The frame rate is approximately 60 Hz, which is a typical refresh rate seen in today's market. This signal can be seen by probing the FRAME test point on most Microchip graphics display boards. FIGURE 5: CLEAN PIXEL CLOCK TIMING DIAGRAM FIGURE 6: FRAME RATE TIMING DIAGRAM DS01387B-page Microchip Technology Inc.
7 Figure 7 shows a zoomed out pixel clock in external memory code. There are two areas in the diagram where the pixel clock is stopped. This is where the ISR is updating LCD timing constraints. This is the only portion of LCC that requires CPU bandwidth and remaining is handled by the DMA transfer. The delta x shows how much time the ISR routine absorbs, which equates to 80 clock cycles. Therefore, if we consider a WQVGA display refreshing at 60 Hz, with 272 lines and two interrupts per line, the LCC solution only uses (60* 272 * 2 * 80) = 2.6 MIPS. Figure 8 shows the affect of the putpixel function on the pixel clock. The putpixel function updates the frame and it is designed to update two frames per pixel halt. The total time required to update two pixels is 800 ns. The user can change the software to monitor the update rate so that the refresh rate does not fall below a certain refresh (50 Hz). FIGURE 7: ISR TIMING DIAGRAM FIGURE 8: putpixel TIMING DIAGRAM Microchip Technology Inc. DS01387B-page 7
8 RENDERING NEW PIXELS ON THE FRAME Rendering new pixels in the screen is as important as refreshing the screen. This is performed by the CPU writing to the display buffer. If the frame is stored externally, the DMA transfer is suspended while the frame is being updated. This is necessary because there is only one PMP peripheral and it is being shared by the virtual graphics controller or DMA transfer. This method does affect the refresh rate of the screen. The amount of pixel updates needs to be monitored to prevent too large of a refresh rate change; otherwise, the change will be perceptible by the human eye. This is done by using a pixel count variable within the virtual graphics controller that is updated on every pixel write and cleared during every DMA interrupt. HARDWARE DESCRIPTION The LCC Graphics Board is built with simplicity and low cost in mind. The onboard 512 Kbyte SRAM IC is only required if the application is using the LCC Graphics Board for external memory. Otherwise, if a PIC32 MCU with enough internal memory is used with the board, no external memory is necessary. The equation to calculate whether a certain PIC32 MCU has enough volatile memory to store a data frame is provided in Equation 1. In the following example, the internal memory demo for the LCC Graphics Board uses a starter kit that has a PIC32MX795F12L device, which has 128 Kbytes of SRAM. The demonstration uses QVGA resolution and 8 BPP Graphics; therefore, the equation is: 76,800 = 320 x 240 x 1 This technique still leaves almost half of the internal SRAM for program use, while giving the designer 255 color choices to create a meaningful embedded user interface application. If extra memory is needed, there are many different types to choose from. A parallel SRAM was used for this board, but any type of volatile memory can be used, as long as it is fast enough to support the required frame rate. PSRAM is a cost-effective external memory that offers a lower cost than SRAM; however, this type of memory has slower access speeds. There are 15 jumpers on the LCC Graphics Board to change from Internal Memory mode to External Memory mode. Set jumper pins 1 and 2 when using internal SRAM and set jumper pins 2 and 3 when using external SRAM. The LCC Graphics Board was made to be used with many different PIC MCUs. The board provides a starter kit connector to connect starter kits, such as the PIC32 USB Starter Kit II, and a PICtail Plus connector to connect the board to an Explorer 16 Development Board. Since LCC uses no graphics controller, this makes many graphics features available through software including alpha blending, scrolling, and the use of multiple frames. A user is no longer limited by the graphics controller used; instead, the PIC microcontroller is used. EQUATION 1: SRAM size = (x pixel resolution) (y pixel resolution) (Bytes of Color Depth) DS01387B-page Microchip Technology Inc.
9 Display Connector LCD panels are connected to the display connector. Descriptions of each display connector pin are listed in Table 1. TABLE 1: Pin Name RD9, RB0, RB9, RB1 R0-R4 G0-G5 B0-B4 RC1/LCD_RESET RC2/LCD_CS SCK1, SD01, SDI1, SS1 RBS/LCD_DC LCD_SHIFT RD2/LCD_DEN RC3/VSYNC RB8/HSYNC PMPBE DISPLAY CONNECTOR PINS Description 4-wire Resistive Touch Screen Lines Red Color Data Lines Green Color Data Lines Blue Color Data Lines LCD Reset Line LCD Chip Select Line SPI Lines for Communication for Timing or Touch Controllers LCD DC Power Enable Line Pixel Clock Data Enable (DEN) Line VSYNC Line HSYNC Line Backlight Enable Line (PWM Capable) Microchip Technology Inc. DS01387B-page 9
10 SOFTWARE USAGE The LCC Graphics Board uses the Microchip Graphics Library that makes creating a GUI such as the one presented in this application note fast and easy. The Microchip Graphics Library is available for download free-of-charge from the Microchip Libraries of Applications web page (www.microchip.com/mla). There are two methods to use software with the Graphics Library: internal SRAM memory and external SRAM memory. The internal SRAM memory method uses the write strobe of the PMP for the pixel clock. Jumper rows 1 and 2 on the LCC Graphics Board must be set for this configuration. In this setup, all color is 8 BPP and no external SRAM is used. SRAM from inside the PIC32 MCU is continuously writing its pixel values to the PMP. For 8 BPP color, a 332 RGB color format is used (i.e., 3 color values for red, 3 for green, and 2 for blue). This is a common color format, because red is an easier color for the human eye to detect than blue. The external SRAM memory method uses the read strobe of the PMP for the pixel clock. Jumper rows 2 and 3 on the LCC Graphics Board must be set for this configuration. In this setup, all color is 16 BPP and the external SRAM contains the graphics frame that is continuously being read. For 16 BPP color, a 565 RGB color format is used (i.e., 5 color values for red, 6 for green, and 5 for blue). In both methods, when connecting to an LCD panel with more than 16 color lines, the unused color lines are tied to the Most Significant bits of the last color bit being used. This ensures that a full color scale from white to black can be achieved. DEMONSTRATION SOFTWARE Demonstration software specifically for the LCC Graphics Board is available on the LCC Graphics web page at The demonstration showcases both internal and external memory methods and contains many different user interface screens that can be created by using the Microchips Graphics Library and Microchip s Graphics Display Designer. Other software for the LCC Graphics Board is contained within the Microchip s Graphics Library, where the LCC graphics driver is contained, which is able to run most of the demonstrations found in the Microchip Graphics Library. CONCLUSION This application note describes the Low-Cost Controllerless (LCC) Graphics PICtail Plus Daughter Board, which can be used to enable the implementation of a low-cost controllerless graphics system using a PIC32 microcontroller. REFERENCES Microchip Libraries of Applications: PIC32 Device Family: Microchip Graphics Support: DS01387B-page Microchip Technology Inc.
11 APPENDIX A: SOURCE CODE Software License Agreement The software supplied herewith by Microchip Technology Incorporated (the Company ) is intended and supplied to you, the Company s customer, for use solely and exclusively with products manufactured by the Company. The software is owned by the Company and/or its supplier, and is protected under applicable copyright laws. All rights are reserved. Any use in violation of the foregoing restrictions may subject the user to criminal sanctions under applicable laws, as well as to civil liability for the breach of the terms and conditions of this license. THIS SOFTWARE IS PROVIDED IN AN AS IS CONDITION. NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATU- TORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICU- LAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. All of the software covered in this application note is available as a single WinZip archive file. This archive can be downloaded from the Microchip corporate Web site at: Microchip Technology Inc. DS01387B-page 11
12 APPENDIX B: REVISION HISTORY Revision A (July 2011) This is the initial released version of this document. Revision B (October 2012) This revision includes the following updates: The Board Setup section, including Figure 1 was removed A paragraph was added to "Setting up a Controllerless Graphics System" A sentence referencing PSRAM was added to "Hardware Description" Figure 9: Display Connector Schematic was removed Appendix B Schematics was removed Additional minor updates to text and formatting were incorporated throughout the document DS01387B-page Microchip Technology Inc.
13 Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification contained in their particular Microchip Data Sheet. Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the intended manner and under normal conditions. There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip s Data Sheets. Most likely, the person doing so is engaged in theft of intellectual property. Microchip is willing to work with the customer who is concerned about the integrity of their code. Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not mean that we are guaranteeing the product as unbreakable. Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our products. Attempts to break Microchip s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act. Information contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer s risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights. QUALITY MANAGEMENT SYSTEM CERTIFIED BY DNV == ISO/TS == Trademarks The Microchip name and logo, the Microchip logo, dspic, FlashFlex, KEELOQ, KEELOQ logo, MPLAB, PIC, PICmicro, PICSTART, PIC 32 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 , Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved. Printed on recycled paper. ISBN: Microchip received ISO/TS-16949:2009 certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona; Gresham, Oregon and design centers in California and India. The Company s quality system processes and procedures are for its PIC MCUs and dspic DSCs, KEELOQ code hopping devices, Serial EEPROMs, microperipherals, nonvolatile memory and analog products. In addition, Microchip s quality system for the design and manufacture of development systems is ISO 9001:2000 certified Microchip Technology Inc. DS01387B-page 13
14 Worldwide Sales and Service AMERICAS Corporate Office 2355 West Chandler Blvd. Chandler, AZ Tel: Fax: Technical Support: support Web Address: Atlanta Duluth, GA Tel: Fax: Boston Westborough, MA Tel: Fax: Chicago Itasca, IL Tel: Fax: Cleveland Independence, OH Tel: Fax: Dallas Addison, TX Tel: Fax: Detroit Farmington Hills, MI Tel: Fax: Indianapolis Noblesville, IN Tel: Fax: Los Angeles Mission Viejo, CA Tel: Fax: Santa Clara Santa Clara, CA Tel: Fax: Toronto Mississauga, Ontario, Canada Tel: Fax: ASIA/PACIFIC Asia Pacific Office Suites , 37th Floor Tower 6, The Gateway Harbour City, Kowloon Hong Kong Tel: Fax: Australia - Sydney Tel: Fax: China - Beijing Tel: Fax: China - Chengdu Tel: Fax: China - Chongqing Tel: Fax: China - Hangzhou Tel: Fax: China - Hong Kong SAR Tel: Fax: China - Nanjing Tel: Fax: China - Qingdao Tel: Fax: China - Shanghai Tel: Fax: China - Shenyang Tel: Fax: China - Shenzhen Tel: Fax: China - Wuhan Tel: Fax: China - Xian Tel: Fax: China - Xiamen Tel: Fax: ASIA/PACIFIC India - Bangalore Tel: Fax: India - New Delhi Tel: Fax: India - Pune Tel: Fax: Japan - Osaka Tel: Fax: Japan - Yokohama Tel: Fax: Korea - Daegu Tel: Fax: Korea - Seoul Tel: Fax: or Malaysia - Kuala Lumpur Tel: Fax: Malaysia - Penang Tel: Fax: Philippines - Manila Tel: Fax: Singapore Tel: Fax: Taiwan - Hsin Chu Tel: Fax: Taiwan - Kaohsiung Tel: Fax: Taiwan - Taipei Tel: Fax: Thailand - Bangkok Tel: Fax: EUROPE Austria - Wels Tel: Fax: Denmark - Copenhagen Tel: Fax: France - Paris Tel: Fax: Germany - Munich Tel: Fax: Italy - Milan Tel: Fax: Netherlands - Drunen Tel: Fax: Spain - Madrid Tel: Fax: UK - Wokingham Tel: Fax: China - Zhuhai Tel: Fax: /29/11 DS01387B-page Microchip Technology Inc.
Recommended Usage of Microchip 23X256/23X640 SPI Serial SRAM Devices Author: INTRODUCTION Martin Bowman Microchip Technology Inc. This document details recommended usage of the Microchip 23X256 and 23X640
Installing and Licensing MPLAB XC C Compilers DS50002059G Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification contained in their particular
Software Real-Time Clock and Calendar Using PIC16F1827 Author: INTRODUCTION Cristian Toma Microchip Technology Inc. This application note describes the implementation of software Real-Time Clock and Calendar
Water-Resistant Capacitive Sensing AN1286 Author: INTRODUCTION Thomas Perme Steven Lin Microchip Technology Inc. This application note describes a new hardware sensing method which is resilient to water
Using the PIC MCU CTMU for Temperature Measurement Author: Padmaraja Yedamale Microchip Technology Inc. The Charge Time Measurement Unit (CTMU), introduced on the latest generation of PIC24F and PIC18F
PIC32 USB Plug-In Module for the Explorer 16 Development Board PIC32MX Overview The PIC32 USB Plug-In Module (PIM) demonstrates the capabilities of PIC32MX460F512 and PIC32MX795F512 microcontrollers using
Precision Temperature-to-Voltage Converter Features Supply Voltage Range: - TC147: 2.7V to 4.4V - TC147A: 2.V to.v Wide Temperature Measurement Range: - -4 o C to +12 o C High Temperature Converter Accuracy:
MCP2003 Power-Down and Wake-Up Handling in the Case of LIN Bus Loss Author: INTRODUCTION Frank Ziegenhorn Microchip Technology Inc. This technical brief gives a description of how to set the MCP2003 in
Manchester Decoder Using the CLC and NCO Authors: ABSTRACT A Manchester decoder can be built using Microchip s award winning CLC (Configurable Logic Cell) blocks and NCO (Numerically Controlled Oscillator)
USB Mass Storage Class on an Embedded Host Author: INTRODUCTION With the introduction of Microchip's microcontrollers with the USB OTG peripheral, microcontroller applications can easily support USB Embedded
Universal Programming Module OVERVIEW The Universal Programming Module (UPM) is a handy, low-cost board that supports the programming of Microchip devices using MPLAB in-circuit emulators and debuggers.
mtouch Metal Over Cap Technology AN1325 Authors: INTRODUCTION Keith Curtis Dieter Peter Microchip Technology Inc. As a user interface, capacitive touch has several advantages: it is low power, low cost,
KEELOQ with Advanced Encryption Standard (AES) Receiver/Decoder Author: OVERVIEW Enrique Aleman Microchip Technology Inc. This application note describes a KEELOQ with AES code hopping decoder implemented
Emulating High-Endurance Data EEPROM for PIC10 and PIC12 AN1687 Author: INTRODUCTION Willem J. Smit Microchip Technology Inc. Given Microchip s growing portfolio of microcontrollers, it is self-evident
PIC18F2520 MCP3909 3-Phase Energy Meter Reference Design - Meter Test Results and Adapting the Meter Design for other Requirements Author: OVERVIEW Craig L. King Microchip Technology Inc. This application
RGBW Color Mixing DALI Control Gear AN1857 Author: INTRODUCTION Mihai Cuciuc Microchip Technology Inc. This application note provides an example of obtaining custom colors by combining the spectra of the
Precision Temperature-Sensing With RTD Circuits Author: INTRODUCTION Bonnie C. Baker Microchip Technology Inc. The most widely measured phenomena in the process control environment is temperature. Common
Using MRF24W with PIC32 Internal Program Flash Memory For EZ_CONFIG_STORE Author: OVERVIEW This application note describes the EZ_CONFIG_STORE feature used in the Wi-Fi G Demo Board and TCPIP-WiFi EZConfig
Remote Thermal Sensing Diode Selection Guide Author: INTRODUCTION Wayne Little Microchip Technology Inc. This application note is aimed at designers who build systems that use thermal sensors with remote
Glucose Meter Reference Design AN1560 Author: Namrata Dalvi Microchip Technology Inc. INTRODUCTION This application note describes the basic glucose meter design using Microchip s PIC 8-bit PIC16LF178X
Video Playback and Streaming Solutions Using the PIC MCU AN1415 INTRODUCTION The required bandwidth for data access from off-chip components can be a bottleneck in the system performance for microcontroller
Current Sensing Circuit Concepts and Fundamentals Author: INTRODUCTION Yang Zhen Microchip Technology Inc. Current sensing is a fundamental requirement in a wide range of electronic applications. Typical
Solder Reflow Recommendation AN233 Author: INTRODUCTION Ravi Sharma Microchip Technology Inc. The electronic manufacturing industry is moving towards lead-free, environmentally safe assembly processes.
Battery Fuel Measurement Using Delta-Sigma ADC Devices Author: INTRODUCTION Youbok Lee, Ph.D. Microchip Technology Inc. The battery fuel status indicator is a common feature of the battery-supported handheld
Section 20. Comparator HIGHLIGHTS This section of the manual contains the following major topics: 20.1 Introduction... 20-2 20.2 Comparator Control egister... 20-3 20.3 Operation... 20-4 20.4 Interrupts...
Using Temperature-Sensing Diodes with Remote Thermal Sensors AN10.14 Author: OVERVIEW Wayne Little Microchip Technology Inc. Microchip offers a family of remote diode temperature sensors that accurately
Using Single Supply Operational Amplifiers in Embedded Systems Author: INTRODUCTION Bonnie Baker Microchip Technology Inc. Beyond the primitive transistor, the operational amplifier (op amp) is the most
PIC18F26K20/46K20 Rev. B2/B3/B5/B6 Silicon Errata and Data Sheet Clarification The PIC18F26K20/46K20 family devices that you have received conform functionally to the current Device Data Sheet (DS41303G),
dspic Digital Signal Controllers dspic Digital Signal Controllers Digital Signal Controller Solutions Building on the legacy of Microchip s world-leading 8-bit PIC microcontrollers, 16-bit dspic Digital
MPLAB XC8 GETTING STARTED GUIDE MPLAB XC8 Getting Started Guide This document provides a starting point for programmers who are just starting out with the MPLAB XC8 C Compiler, particularly those who are
Microchip MiWi Wireless Networking Protocol Stack Author: INTRODUCTION Implementing applications with wireless networking is now common. From consumer devices to industrial applications, there is a growing
PIC18F4XK22 Development Board User s Guide DS41618A Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification contained in their particular
Brushed DC Motor Fundamentals AN905 Author: Reston Condit Microchip Technology Inc. INTRODUCTION Brushed DC motors are widely used in applications ranging from toys to push-button adjustable car seats.
PIC18F2410/2510/4410/4510 Rev. B4 Silicon Errata The PIC18F2410/2510/4410/4510 Rev. B4 parts you have received conform functionally to the Device Data Sheet (DS39636C), except for the anomalies described
MPLAB Code Configurator User s Guide 2013-2014 Microchip Technology Inc. DS40001725B MPLAB CODE CONFIGURATOR USER S GUIDE Note the following details of the code protection feature on Microchip devices:
Bluetooth Smart Communication Using Microchip RN4020 Module and 16-bit PIC Microcontroller Author: Venkatesh Bengeri and Pradeep Shamanna INTRODUCTION Most of the embedded applications require real-time
KEELOQ with AES Microcontroller-Based Code Hopping Encoder Authors: INTRODUCTION This application note describes the design of a microcontroller-based KEELOQ Hopping Encoder using the AES encryption algorithm.
Op Amp Rectifiers, Peak Detectors and Clamps Author: Dragos Ducu, Microchip Technology Inc. INTRODUCTION This application note covers a wide range of applications, such as halfwave rectifiers, fullwave
dspic Digital Signal Controllers dspic Digital Signal Controllers Digital Signal Controller Solutions Building on the legacy of Microchip s world-leading 8-bit PIC microcontrollers, 16-bit dspic Digital
Timers: Timer0 Tutorial (Part 1) 2007 Microchip Technology Inc. DS51682A Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification contained
Touch Through Metal mtouch Metal Over Capacitive Technology Part 1 2010 Microchip Technology Incorporated. All Rights Reserved. Touch Through Metal Slide 1 Hello and welcome to Microchip s Touch Through
Development Tools Integrated Development Environment Transforming Ideas Into Realities The typical product development life cycle is comprised of smaller cycles each representing an iterative process toward
Section 5. Flash Programming HIGHLIGHTS This section of the manual contains the following topics: 5.1 Introduction...5-2 5.2 Control Registers... 5-3 5.3 Run-Time Self-Programming (RTSP) Operation... 5-10
Designing A Li-Ion Battery Charger and Load Sharing System With Microchip s Stand-Alone Li-Ion Battery Charge Management Controller Author: INTRODUCTION Brian Chu Microchip Technology Inc. Batteries often
Using USB Keyboard with an Embedded Host Author: INTRODUCTION Amardeep Gupta Microchip Technology Inc. Microcontroller applications can easily support USB embedded host functionality with the introduction
Development Tools Integrated Development Environment Transforming Ideas Into Realities The typical product development life cycle is comprised of smaller cycles each representing an iterative process toward
MCP2200 USB to RS-232 Demo Board User s Guide DS51901A Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification contained in their particular
Hardware Limit Timer on PIC Microcontrollers Author: Swathi Sridhar Microchip Technology Inc. INTRODUCTION PIC microcontrollers are equipped with hardware features that are useful for implementing Fault
1Mbit SPI Serial SRAM with SDI and SQI Interface Device Selection Table Part Number VCC Range Dual I/O (SDI) Quad I/O (SQI) Max Clock Frequency 23A1024 1.7-2.2V Yes Yes 20 MHz SN, ST, P 23LC1024 2.5-5.5V
WORKSHOP-IN-A-BOX 2: LOW POWER SOLUTIONS DEMONSTRATION BOARD 2004 Microchip Technology Inc. DS51512A Note the following details of the code protection feature on Microchip devices: Microchip products meet
AN0 Gas and Water Metering with the PIC6F9X Family Author: INTRODUCTION Electronic utility meters are an important step towards automating the utility metering process. Automated utility meters allow many
Resistive Temperature Detector (RTD) Reference Design DS51891A Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification contained in their
Microchip s Power MOSFET Driver Simulation Models Author: INTRODUCTION Cliff Ellison (Microchip Technology Inc.) Ron Wunderlich (Innovative Ideas and Design) The simulation models for Microchip s power
MCP321 Low Power 1-Bit A/D Converter With I 2 C Interface Features 1-bit resolution ±1 LSB DNL, ±1 LSB INL max. 25 µa max conversion current 5 na typical standby current, 1 µa max. I 2 C compatible serial
Sensorless Field Oriented Control (FOC) of an AC Induction Motor (ACIM) Using Field Weakening Author: Mihai Cheles Microchip Technology Inc. Co-author: Dr.-Ing. Hafedh Sammoud APPCON Technologies SUARL
Microchip ZigBee RF4CE Performance under Wi-Fi Interference Author: Yifeng Yang Microchip Technology Inc. INTRODUCTION To overcome the limitations of InfraRed (IR) remote control technology, ZigBee RF4CE
MCP9700/9700A MCP9701/9701A Low-Power Linear Active Thermistor ICs Features Tiny Analog Temperature Sensor Available Packages: - SC70-5, SOT-23-5, TO-92-3 Wide Temperature Measurement Range: - -40 C to
MPLAB ICD 3 In-Circuit Debugger User s Guide For MPLAB X IDE DS52081A Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification contained
High-Quality Audio Applications Using the PIC32 Author: Jayanth Murthy Madapura Microchip Technology Inc. When designing audio docking stations and accessories for portable digital audio devices, and other
RS232 Serial Accessory Board User's Guide 2010 Microchip Technology Inc. Preliminary DS70649A Note the following details of the code protection feature on Microchip devices: Microchip products meet the
dspic30f3012/3013 Rev. B0 Silicon Errata dspic30f3012/3013 (Rev. B0) Silicon Errata The dspic30f3012/3013 (Rev. B0) samples you have received were found to conform to the specifications and functionality
START NOW with Small Flash PIC Microcontrollers Small Flash PIC Microcontrollers Lots of options and the ability to easily migrate START NOW with Microchip s easy-to-learn Baseline and Mid-Range Architectures
Sensorless BLDC Control with Back-EMF Filtering Using a Majority Function Author: INTRODUCTION Adrian Lita and Mihai Cheles Microchip Technology Inc. This application note describes a sensorless Brushless
Design Tips for the MCP3911 AN1426 Author: Craig King Microchip Technology Inc. Here, pushing the limits of the analog-to-digital conversion will be the focus, showing the true performance limits of the
Migrating Applications to USB from RS-232 UART with Minimal Impact on PC Software Author: INTRODUCTION Rawin Rojvanit Microchip Technology Inc. The RS-232 serial interface is no longer a common port found
M AN709 System Level Design Considerations When Using I 2 C TM Serial EEPROM Devices Author: INTRODUCTION Rick Stoneking Developing systems that implement the I 2 C protocol for communicating with serial
Low Quiescent Current LDO MCP1700 Features: 1.6 µa Typical Quiescent Current Input Operating Voltage Range: 2.3V to 6.0V Output Voltage Range: 1.2V to 5.0V 250 ma Output Current for Output Voltages 2.5V
Application note Generating PWM signals using STM8S-DISCOVERY Application overview This application user manual provides a short description of how to use the Timer 2 peripheral (TIM2) to generate three
LIN Serial Analyzer User s Guide Rev2.0 2008 Microchip Technology Inc. DS51675B Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification
PI657 Based ode Hopping Security System Author: OVERVIEW This document describes a PI657 based code hopping automotive security system. The security system implements all the basic features found on security
Freescale Semiconductor Document Number: AN4353 Application Note Rev. 0, 9/2011 Flexible Active Shutter Control Interface using the MC1323x by: Dennis Lui Freescale Hong Kong 1 Introduction This application
APPLICATION NOTE Atmel AVR32848: Android Accessory Demo 32-bit Atmel Microcontrollers Features Control an accessory from an Android device Send data to and from an Android device to an accessory Supported
Timers: Timer0 Tutorial (Part 2) 2008 Microchip Technology Inc. DS51702A Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification contained