APPLICATION NOTE Atmel AVR32936: mXT143E Xplained Hardware Users Guide Atmel maXTouch Touchscreen Controller Features • 2.8 inch mXT143E LCD display module from Precision Design Associates (PDA) • • • • • Atmel® ATMXT143E touchscreen controller Capacitive touch ITO 320 x 240 pixel LCD display with SPI interface LED backlight Memory • Standard 2GB SD card (SPI interface) • Xplained header compatible Description The Atmel mXT143E Xplained evaluation kit is a hardware platform to evaluate the Atmel ATMXT143E touchscreen controller. The kit enables the user to easily get started using the maXTouch® touchscreen controller and learn how to interface the ATMXT143E device into their own design. This kit requires one of the Xplained MCU boards to run applications. Figure 1. Atmel mXT143E Xplained kit. 42032B−AVR−05/2013 Table of Contents 1. Getting started ..................................................................................... 3 1.1 Quick start ......................................................................................................... 3 1.1.1 What is required to get started? .......................................................... 3 1.1.2 Connecting mXT143E Xplained .......................................................... 3 1.1.3 Configuring SPI mode ......................................................................... 3 1.1.4 Running demo applications ................................................................. 3 1.2 Tools and documentation for mXT143E Xplained ............................................. 3 2. Hardware users guide .......................................................................... 5 2.1 Overview ........................................................................................................... 5 2.2 Power supply..................................................................................................... 5 2.3 SPI mode switch ............................................................................................... 5 2.4 Headers ............................................................................................................ 6 2.5 SD card ............................................................................................................. 7 2.6 Precision Design Associates (PDA) 2.8 inch mXT143E LCD display module ... 7 2.6.1 Displaytech Ltd. 2.8 inch LCD............................................................. 7 2.6.2 LED backlight ...................................................................................... 8 2.6.3 mXT143E touchscreen controller ........................................................ 9 2.7 Alternative backlight control .............................................................................. 9 2.8 ID device ......................................................................................................... 10 3. Code examples .................................................................................. 10 4. Revision history .................................................................................. 11 4.1 Revision 1 ....................................................................................................... 11 4.2 Revision 2 ....................................................................................................... 11 5. Document Revision History ................................................................ 12 Atmel AVR32936: mXT143E Xplained Hardware Users Guide [APPLICATION NOTE] 42032B−AVR−05/2013 2 1. Getting started 1.1 Quick start 1.1.1 What is required to get started? Basically the following items are required in addition to the Atmel mXT143E Xplained to run demo applications: • • • Xplained MCU base board Programming tool for the Xplained MCU board Atmel Studio For more detailed information on each item take a look at Section 1.2. 1.1.2 Connecting mXT143E Xplained Place the mXT143E Xplained onto an Xplained MCU board by connecting the four headers J1, J2, J3 and J4 to the according headers on the base board. An orientation marking is present in the top left corner (a white silkscreen border around the mounting hole) and the same marking is present on the Xplained MCU board. 1.1.3 Configuring SPI mode For XMEGA® based MCU board set the SPI mode switch on the mXT143E Xplained to “XMEGA USART in SPI mode”. For all other Xplained MCU boards set the switch in “Native SPI” position. 1.1.4 Running demo applications If not already done, download and install Atmel Studio. Start Atmel Studio, select a demo application for the Xplained MCU base board and the mXT143E Xplained, and download it via the programming tool. 1.2 Tools and documentation for mXT143E Xplained The following list contains links to the most relevant documents, software and tools for the mXT143E Xplained. Xplained products Atmel Xplained is a series of small-sized and easy-to-use evaluation kits for 8- and 32-bit Atmel microcontrollers. It consists of a series of low cost MCU boards for evaluation and demonstration of feature and capabilities of different MCU families. mXT143E Xplained design documentation mXT143E Xplained design documentation is a package containing schematics, BOM, assembly drawings, 3D plots, layer plots ... Atmel AVR32936: mXT143E Xplained Users Guide This document. Precision Design Associates (PDA) PDA is an Atmel partner that designed the PDA TM2800 display module. Displaytech Displaytech is an LCD module manufacturer that provided the SDT028ATFT display which is used in the PDA TM2800 display module. The display and display driver IC datasheets are available on their website. Atmel Studio Atmel Studio is a free Atmel IDE for development of C/C++ and assembler code for Atmel microcontrollers. Atmel AVR32936: mXT143E Xplained Hardware Users Guide [APPLICATION NOTE] 42032B−AVR−05/2013 3 IAR Embedded Workbench for Atmel AVR IAR Embedded Workbench® for Atmel AVR® is a commercial C/C++ compiler that is available for 8-bit AVR. There is a 30 day evaluation version as well as a 4k (code size limited) kick-start version available from their website. Atmel AVR32936: mXT143E Xplained Hardware Users Guide [APPLICATION NOTE] 42032B−AVR−05/2013 4 2. Hardware users guide 2.1 Overview The display module is mounted on a routing board that is shown in Figure 2-1 and connected with a FFC cable. All components in the figure are therefore located under the display module. Figure 2-1. Routing board overview. 2.2 Power supply The kit is powered via the four headers on the board and is compliant to the Xplained-series base boards. The input voltage is 3.3V. 2.3 SPI mode switch The Atmel mXT143E Xplained has a SPI Mode switch which can be used for the XMEGA based Xplained MCU boards, where the XMEGA has the option to use the USART in Master SPI mode. This enables the user to use the USART in SPI mode in combination with DMA, as the normal SPI module does not support DMA transfers. For all non XMEGA based Xplained base boards the switch should be set to normal SPI mode. Atmel AVR32936: mXT143E Xplained Hardware Users Guide [APPLICATION NOTE] 42032B−AVR−05/2013 5 2.4 Headers The Atmel mXT143E Xplained kit has four 10-pins, 100mil female headers. The headers fit onto the Xplained series MCU boards. Table 2-1. Header J1 J2 J3 Signal connections on the mXT143E Xplained. Pin Xplained std. function mXT143E Display SD-card 1 SDA SDA - - 2 SCL SCL - - 3 RXD ~CHG - - 4 TXD - WR - 5 SS - ~CS - 6 MOSI - SDI MOSI 7 MISO - SDO MISO 8 SCK - RS/SCL CLK 9 GND GND GND VSS 10 VCC VCC +Vin VDD 1 ADC1/AREF - - ~SD_CS 2 ADC2 - - ~SD_DETECT 3 ADC3 - - - 4 ADC4 - - - 5 ADC5 - LED_EN - 6 ADC6 - LED- - 7 ADC7 - ~RESET_LCD - 8 ADC8 ~RESET_MXT - - 9 GND GND GND GND 10 VCC VCC +Vin VDD 1 GPIO - - - 2 GPIO - - - 3 GPIO - - - 4 GPIO - - - 5 GPIO - - - 6 GPIO - - - 7 GPIO - - - 8 GPIO - - - 9 GND GND GND GND 10 VCC 5V0 - - - Atmel AVR32936: mXT143E Xplained Hardware Users Guide [APPLICATION NOTE] 42032B−AVR−05/2013 6 Header J4 2.5 Pin Xplained std. function mXT143E Display SD-card 1 SDA - - - 2 SCL - (optional LED_EN) - 3 RXD - - - 4 TXD - - - 5 SS - - - 6 MOSI - - - 7 MISO - - - 8 SCK - - - 9 VCC VCC +Vin VDD 10 GND GND GND GND SD card The Atmel mXT143E Xplained kit features a standard size SD memory card connector. The interface to the SD card is based on SPI. The MOSI, MISO and SCK lines of the SPI interface is routed from the header J1, while the chip select (~CS) and card detect (CD) lines are routed to header J2. Drivers for the SD memory card can be found in ASF. For further information about how to interface a SD card, please refer to the the SD-card Association. The SD card interface share the same SPI lines with the LCD except for the Chip Select, so it is not possible to communicate with both at the same time. 2.6 Precision Design Associates (PDA) 2.8 inch mXT143E LCD display module The display module PDA TM2800 was designed by the Atmel partner Precision Design Associates (PDA) and it contains: • • • A 2.8 inch LCD display from Displaytech Ltd (model SDT028ATFT) ITO sensor Routing PCB that contains • • Atmel mXT143E touchscreen controller • Regulator • Backlight control circuit for the display • Connector for ITO • Connector for the display • Connector that makes all signals available for the application Plastic casing that holds all parts together The display module is available via DigiKey. 2.6.1 Displaytech Ltd. 2.8 inch LCD The LCD of the display module is from Displaytech Ltd. and the used model is SDT028ATFT. The specifications for the display are listed in Table 2-2. Atmel AVR32936: mXT143E Xplained Hardware Users Guide [APPLICATION NOTE] 42032B−AVR−05/2013 7 The display driver (ILI9341) offers a parallel and a serial interfaces, but for compatibilty between the different Xplained boards and standardization on the headers, only the SPI interface is routed. The default communication with the display is 8-bit SPI and the change between command and data (CMD/DATA) is done with a separate IO pin. The board can be reconfigured to use SPI in 9-bit mode. In this mode the 9th bit will be used to control if a command or data is transferred and hence the extra IO line will not be needed. To reconfigure this, you it is necessary to alter the display configuration by moving some resistors. Please look at the schematics for more information. For a complete set of commands and settings for controlling the display, please refer to the datasheet of the display controller. Atmel provides a driver, code examples and graphics libraries in ASF (Atmel Software Framework). Table 2-2. Display specifications. Item Specification LCD module Transmissive Resolution 320 x 240 pixels Diagonal size 2.8 inch Overall size 50mm x 69.2mm Active area 43.2mm x 57.6mm Driver IC ILI9341 Interface type Serial, parallel and RGB Colors Up to 262k The SD card interface share the same SPI lines with the LCD except for the chip select, so it is not possible to communicate with both at the same time. 2.6.2 LED backlight The display module has a LED backlight which is build up by four parallel diodes. The ratings for the LED backlight can be found in Table 2-3. Table 2-3. LED backlight specification. Condition Minimum Typical Maximum Forward current - - - 20mA Forward voltage 20mA 2.9V 3.2V 3.5V Figure 2-2. Backlight LEDs circuit of the display mode. Atmel AVR32936: mXT143E Xplained Hardware Users Guide [APPLICATION NOTE] 42032B−AVR−05/2013 8 The backlight diodes are driven by the circuit seen in Figure 2-3 inside the display module: Figure 2-3. Backlight LED driving circuit. LED_K is connected to K1, K2, K3 and K4 in figure TBD. The anode (A) in figure TBD is connected to the supply voltage of the module (3.3V). In a worst case scenario where the diodes have a forward voltage of 2.9V@20mA the voltage over R13 must be at least 3.3V – 2.9V = 0.4V. That means R13 needs to be at least 0.4V / 4 * 20mA = 5Ω. The chosen resistor value of 7.5Ω will reduce the current to 0.4V / 7.5Ω = 53mA in a worst case scenario. That means through each diode a current of 53mA / 4 = 13.25mA will flow. Because of the reduced current it is also possible to drive the backlight without PWM but with additional losses in the resistor. The LED-signal can be used to measure the current that flows through the backlight diodes. LED_EN can be used to enable the backlight, which is by default off, either by using PWM or by driving this signal to VCC. 2.6.3 mXT143E touchscreen controller The interface to the mXTE143E touchscreen sensor is I²C. The device also has an alert pin (~CHG), which will toggle when a touch event occurs. The I²C address of the device is 0x4A and the maximum bus clock speed is 400kHz. The protocol that is used to communicate with the touchscreen controller as well as the datasheet of the device is only available under NDA but these documents are not necessary to use the controller on the mXT143E Xplained because all the required code and the configuration is available in the Atmel Software Framework (ASF). If the user intends to fully evaluate the mXT143E in order to make his own maXTouch design please contact the nearest Atmel sales representative to get an NDA agreement. Application notes for maXTouch can be obtained from the Atmel website by registration. 2.7 Alternative backlight control The mXT143E Xplained has an optional routing possibility for the LED backlight control. The alternative signal is pin 2 of the header J4. To change to the alternative location, it is necessary to disassemble the display module and de-solder the existing 0Ω resistor shown in Figure 2-4, and solder it back onto the alternative footprint. It is also possible to just add a solder joint between the two pads to get a new connection. Atmel AVR32936: mXT143E Xplained Hardware Users Guide [APPLICATION NOTE] 42032B−AVR−05/2013 9 Figure 2-4. Alternative backlight control. 2.8 ID device This device is not mounted because the Xplained platform does not offer expansion module detection. 3. Code examples The example applications are based on the Atmel Software Framework (ASF) that is included in Atmel Studio. The Atmel Software Framework can also be found as a separate package. Atmel AVR32936: mXT143E Xplained Hardware Users Guide [APPLICATION NOTE] 42032B−AVR−05/2013 10 4. Revision history To identify the revision of the Atmel mXT143E Xplained kit, locate the bar-code sticker on the back side of the board. The first line on the sticker shows the product ID and the revision. For example “A09-1573/2” can be resolved to ID=A09-1573 and revision=2. 4.1 Revision 1 Not released. 4.2 Revision 2 Revision 2 of the mXT143E Xplained kit is the initially released version. This revision of the kit has the following product ID: A09-1573/2. Atmel AVR32936: mXT143E Xplained Hardware Users Guide [APPLICATION NOTE] 42032B−AVR−05/2013 11 5. Document Revision History Doc. Rev. Date Comments 42032B 05/2013 Section 2.6.3 has been updated 42032A 01/2013 Initial document release Atmel AVR32936: mXT143E Xplained Hardware Users Guide [APPLICATION NOTE] 42032B−AVR−05/2013 12 Atmel Corporation Atmel Asia Limited Atmel Munich GmbH Atmel Japan G.K. 1600 Technology Drive Unit 01-5 & 16, 19F Business Campus 16F Shin-Osaki Kangyo Building San Jose, CA 95110 BEA Tower, Millennium City 5 Parkring 4 1-6-4 Osaki USA 418 Kwun Tong Road D-85748 Garching b. Munich Shinagawa-ku, Tokyo 141-0032 Tel: (+1)(408) 441-0311 Kwun Tong, Kowloon GERMANY JAPAN Fax: (+1)(408) 487-2600 HONG KONG Tel: (+49) 89-31970-0 Tel: (+81)(3) 6417-0300 www.atmel.com Tel: (+852) 2245-6100 Fax: (+49) 89-3194621 Fax: (+81)(3) 6417-0370 Fax: (+852) 2722-1369 © 2013 Atmel Corporation. All rights reserved. / Rev.: 42032B−AVR−05/2013 Atmel®, Atmel logo and combinations thereof, AVR®, Enabling Unlimited Possibilities®, maXTouch®, XMEGA®, and others are registered trademarks or trademarks of Atmel Corporation or its subsidiaries. Other terms and product names may be trademarks of others. Disclaimer: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to any intellectual property right is granted by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN THE ATMEL TERMS AND CONDITIONS OF SALES LOCATED ON THE ATMEL WEBSITE, ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORY WARRANTY RELATING TO ITS PRODUCTS INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE, SPECIAL OR INCIDENTAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS AND PROFITS, BUSINESS INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT OF THE USE OR INABILITY TO USE THIS DOCUMENT, EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Atmel makes no representations or warranties with respect to the accuracy or completeness of the contents of this document and reserves the right to make changes to specifications and products descriptions at any time without notice. Atmel does not make any commitment to update the information contained herein. Unless specifically provided otherwise, Atmel products are not suitable for, and shall not be used in, automotive applications. Atmel products are not intended, authorized, or warranted for use as components in applications intended to support or sustain life.