Features • Complete Module for Standalone Use: • • • • • – Atmel XMEGA256A3BU MCU – Projected Capacitive Multi Touch Controller – 2.8in LCD – USB Connectivity – SD Card MCU: – ATXMEGA256A3BU – 256KBytes Flash / 8Kbytes Boot – 16KBytes RAM – 4KBytes EEPROM – USB 2.0 Full speed (12Mbps) and low speed (1.5Mbps) Storage: – SD/MMC Touch: – Atmel maXTouch mXT143E Touch Controller – Supports up to 8 touches Display: – Displaytech SDT028ATFT 2.8in LCD – 320x240 resolution – 20 ms typical response time – SPI Communication via ILI9320 Driver IC – Optional support for 18-bit parallel interface – White LED backlight Cover Panel: – 1.2mm Soda Lime Glass – Optional 0.7mm Gorilla Glass™ PDA TM2801: 2.8in PCAP Touch Module 1211-3-3 Contents 1 2 Module Overview 1.1 PCB Connections 4 1.2 Debug Connector J1 5 1.3 Touch Sensor Flex Connector J2 5 1.4 Display Flex Connector J3 6 1.5 Programming/Debug J4 7 1.6 Universal Serial Bus (USB) J5 7 1.7 SD/MMC U5 7 1.8 XMEGA U4 8 Overview of the 2.8in PCAP Touch Module Introduction 2.2 Understanding Unfamiliar Concepts 10 2.3 XMEGA A3BU Microcontroller 10 Atmel Software Framework 10 2.4 LCD Panel 2.4.1 2.5 2.6 2 maXTouch Controller Interface SD/MMC Connector 2.6.1 5 Atmel Software Framework maXTouch Capacitive Touchscreen Controller 2.5.1 4 9 2.1 2.3.1 3 4 Atmel Software Framework Getting Started 9 10 10 11 11 11 11 12 3.1 Hardware Setup 12 3.2 Demo Firmware 12 3.3 Loading Firmware 12 3.3.1 Programming Tools 12 3.3.2 Programming the Example Code 12 Specifications 13 4.1 Mechanical Specifications 13 4.2 Absolute Maximum Specifications 14 4.3 Recommended Operating Conditions 15 4.4 DC Specifications 15 4.5 I2C-compatible Bus Specifications 15 4.6 Power Consumption 15 4.7 Part Number 15 I2C Basics (I2C-compatible Operation) PDA TM2801: 2.8in PCAP Touch Module 16 1211-3-3 PDA TM2801: 2.8in PCAP Touch Module 5.1 Interface Bus 16 5.2 Transferring Data Bits 16 5.3 START and STOP Conditions 16 5.4 Address Byte Format 17 5.5 Data Byte Format 17 5.6 Combining Address and Data Bytes into a Transmission 18 6 Revision History 19 7 Notes 20 3 1 Module Overview 1.1 PCB Connections Pin 1 Host J4 Pin 1 J3 Display Flex Touch Sensor J2 Flex Connector AT M EL MXT143E J1 Debug Pin 1 Pin 1 Figure 1 - PCB Connectors NOTE: The SD/MMC Slot (U5) is on the underside of the PCB The following notations are used for pin descriptions. Note signal direction is given with respect to the touch module and on-board MCU – not the device connected: maXTouch touchscreen LCD LCD Panel SD SD/MMC USB Universal Serial Bus I Input only OD Open drain output O Output only, push-pull ...... P Ground or Power MXT 4 PDA TM2801: 2.8in PCAP Touch Module 1211-3-3 PDA TM2801: 2.8in PCAP Touch Module 1.2 Debug Connector J1 Connector J1 carries signals used to debug the MaXTouch Touchscreen Controller. Pin Type Description Pin Type Description 2 I C SCL (2) 1 P +5Vdc 6 I/O 2 - N/C 7 I ~MXT_RESET (1) 3 O ~MXT_CHG (1) 8 P GND 4 - N/C 9 O MXT DBG DATA 5 I I2C SDA (2) 10 O MXT DBG CLK NOTE 1 – Pulled up through 47kΩ resistor NOTE 2 – Pulled up through 3.3kΩ resistor 1.3 Touch Sensor Flex Connector J2 Connector J2 connects to the touch sensor flex and carries signals used by the maXTouch controller to detect input on the touch sensor. Pin Type 1 I/O 2 Description Pin Type Description X1 14 I/O Y6 I/O X3 15 I/O Y7 3 I/O X5 16 I/O Y8 4 I/O X7 17 I/O Y9 5 I/O X9 18 I/O Y10 6 I/O X11 19 P GND 7 P GND 20 I/O X12 8 I/O Y0 21 I/O X10 9 I/O Y1 22 I/O X8 10 I/O Y2 23 I/O X6 11 I/O Y3 24 I/O X4 12 I/O Y4 25 I/O X2 13 I/O Y5 26 I/O X0 5 1.4 Display Flex Connector J3 Connector J3 connects to the LCD panel flex and carries signals between the host and the LCD panel. Pin Type 1 P 2 3 Description Pin Type Description Vdd 24 O GND (DB8) P LED_K1 (Backlight Cathode) 25 O GND (DB7) P LED_K2 (Backlight Cathode) 26 O GND (DB6) 4 P LED_K3 (Backlight Cathode) 27 O GND (DB5) 5 P LED_K4 (Backlight Cathode) 28 O GND (DB4) 6 - N/C (IM0) 29 O GND (DB3) 7 - N/C (IM1) 30 O GND (DB2) 8 - N/C (IM2) 31 O GND (DB1) 9 - N/C (IM3) 32 O GND (DB0) 10 - N/C (FMARK) 33 O ~CS (1) 11 O GND (VSYNC) 34 O WR 12 O GND (HSYNC) 35 O RS / SCL 13 O GND (DOTCLK) 36 O GND (RD) 14 O GND (ENABLE) 37 O RESET (1) 15 O GND (DB17) 38 I SDO 16 O GND (DB16) 39 O SDI 17 O GND (DB15) 40 P Vcc 18 O GND (DB14) 41 P GND 19 O GND (DB13) 42 - Reserved (RES1) 20 O GND (DB12) 43 - Reserved (mXT ~CHG) (1) 21 O GND (DB11) 44 - Reserved (SDA) (2) 22 O GND (DB10) 45 - Reserved (SCL) (2) 23 O GND (DB9) NOTE 1 – Pulled up through 47kΩ resistor NOTE 2 – Pulled up through 3.3kΩ resistor 6 PDA TM2801: 2.8in PCAP Touch Module 1211-3-3 PDA TM2801: 2.8in PCAP Touch Module 1.5 Programming/Debug J4 Connector J4 connects to the MCU’s PDI programming and debug interface. Pin Type 1 I/O 2 3 Description Pin Type Description PDI_DAT 4 - N/C P Vdd 5 I ~RESET / PDI_CK - N/C 6 P GND Pin Type +5VBUS 6 P GND 1.6 Universal Serial Bus (USB) J5 Connector J5 connects to the MCU’s USB interface. Pin Type Description Description 1 P 2 I/O D- 7 P GND 3 I/O D+ 8 P GND 4 - N/C 9 P GND 5 P GND 1.7 SD/MMC U5 The SD/MMC Connector U5 connects to the MCU’s SPI and I/O. Pin Type Description (1) Pin Type Description 9 - N/C (SD DAT2) 1 O ~SD_CS (SD DAT3) 2 O MOSI (SD CMD) 10 I ~SD_Detect (SD C/D) (1) 3 P GND 11 P GND 4 P Vdd 12 - N/C (SD W/P) 5 O SCK (SD CLK) 13 P GND (SD SHELL) 6 P GND 14 P GND (SD SHELL) 7 I MISO (SD DAT0) 15 P GND (SD SHELL) 8 - N/C (SD DAT1) 16 P GND (SD SHELL) NOTE 1 – Pulled up through 47kΩ resistor 7 1.8 XMEGA U4 Type 1 - 2 Pin Type N/C 34 P GND - N/C 35 P Vdd 3 O LED- 36 - N/C 4 - N/C 37 - N/C 38 - N/C 39 - N/C 40 - N/C 41 - N/C - N/C 5 6 O O Description ~RESET_MXT ~SD_CS (1) (1) (1) Description 7 I ~SD_Detect 8 O ~RESET_LCD (1) 9 - N/C 42 10 - N/C 43 - N/C 11 - N/C 44 P GND 12 - N/C 45 P Vdd 13 - N/C 46 O LED_EN 14 P GND 47 - N/C 15 P Vdd 48 - N/C 16 I/O 2 (2) 49 - N/C 2 (2) 50 - N/C 51 - N/C 52 P GND 53 P Vdd I C SDA 17 O I C SCL 18 I ~MXT_CHG (1) 19 O WR (1) 20 O ~CS 21 O MOSI 54 - N/C 22 I MISO 55 - N/C 23 O SCK 56 I/O 24 P GND 57 I ~RESET / PDI_CK 25 P Vdd 58 - N/C 26 - Reserved (RES1) 59 - N/C 27 - N/C 60 P GND 28 O LED D4 61 P Vdd 29 O LED D5 62 - N/C 30 O LED D2 63 - N/C 31 O LED D3 64 - N/C 32 I/O D- 65 P GND (Thermal Pad) 33 I/O D+ MXT LCD SD USB Pin MXT LCD SD USB The MCU’s SPI and I/O. PDI_DAT NOTE 1 – Pulled up through 47kΩ resistor NOTE 2 – Pulled up through 3.3kΩ resistor 8 PDA TM2801: 2.8in PCAP Touch Module 1211-3-3 PDA TM2801: 2.8in PCAP Touch Module 2 Overview of the 2.8in PCAP Touch Module 2.1 Introduction The 2.8in PCAP Touch Module is a touchscreen module offering best-in-class projected capacitance multi-touch functionality combined with a 2.8in LCD panel. With an onboard Atmel XMEGA256A3BU MCU, the module offers standalone operation based on a subset of functionality available from the Atmel XMEGA A3BU Xplained MCU Board and Atmel mXT143E Xplained Module. The module has been designed to effectively reproduce the combined schematic of these Xplained boards: Atmel XMEGA A3BU Xplained MCU Board = PDA TM2801 2.8in Atmel mXT143E Routing Board PDA TM2800 mXT143E Xplained Board As shown in Figure 2 below, the module MCU offers access to the touchscreen controller, display interface, USB and storage for easy development and integration. PDA 2.8in PCAP Touch Module PCB Capacitive Touchscreen Controller J2 mXT143E J3 J4 MCU LCD Panel U5 XMEGA256 A3BU Touch sensor USB HOST SD Card LOCK LED D2 LED D3 SDSC card LED D4 LED D5 Figure 2 - Functional Block Diagram 9 2.2 Understanding Unfamiliar Concepts Throughout this document, the functionality of the module sub-system will be outlined and summarized. However, the user is encouraged to refer to the resources and documents below in order to gain a more thorough understanding of each sub-system. • Atmel XMega256A3BU (www.atmel.com) • Atmel maXTouch mXT143E Datasheet (www.atmel.com) • Displaytech SDT028ATFT Datasheet (www.displaytech-us.com) • For a basic overview of I2C communication, refer to Section 5 of this document • Universal Serial Bus (www.usb.org) • Secure Digital Card (www.sdcard.org) 2.3 XMEGA A3BU Microcontroller The module is designed around the Atmel XMEGA256A3BU microcontroller. This microcontroller has a variety of features and flexibility and provides a good starting point for development and evaluation of the PDA TM2801 touch module. For additional details, see the XMEGA documentation available from Atmel’s website (www.atmel.com). The MCU is directly connected to all of the module sub-systems, providing a capable full-featured platform for development. 2.3.1 Atmel Software Framework The Atmel Software Framework or ASF (http://asf.atmel.com) contains example projects targeting the XMEGA256A3BU MCU and its various features. This provides an excellent resource, in combination with the XMEGA documentation, for the user to become acquainted with the capabilities of the MCU. Of particular interest with this module, the ASF contains sample code for implementing the USB device interface available on the XMEGA256A3BU. 2.4 LCD Panel The module MCU has a direct connection to the LCD panel interface (Connector J3) which includes a serial interface to the ILI9320 display driver IC and LED backlight control. The LCD Backlight control is performed using the LED_EN and LED- signals (XMEGA U4 Pins 46 and 3, respectively) as shown in Figure 3 below: 3 LED_K R8 3.3k Q1 2N7002 1 2 LED_EN LED- R9 47k R10 33 C6 0.1uF Figure 3 - LED Backlight Control 2.4.1 Atmel Software Framework The Atmel Software Framework includes projects targeting the ILI9320 Display Driver IC. 10 PDA TM2801: 2.8in PCAP Touch Module 1211-3-3 PDA TM2801: 2.8in PCAP Touch Module 2.5 maXTouch Capacitive Touchscreen Controller The module touch screen interface is based on the Atmel maXTouch mXT143E Touch Controller. The touch controller scans the touch sensor and signals the MCU with an active low interrupt signal (~MXT_CHG) when new touch data is available. Data communication with the maXTouch controller is performed over an I2C interface (XMEGA U4 Pins 16, 17). The I2C address of the touch controller is set to 0x4A. NOTE: Pull-up resistors for the I2C SCL and SDA lines are located at R4 and R3 respectively. A pull-up resistor for the ~MXT_CHG interrupt signal is located at R6. 2.5.1 maXTouch Controller Interface Details of the maXTouch communication protocol are beyond the scope of this document. However information is provided below to facilitate evaluation and initial development. The module is pre-loaded with a configuration already optimized for this touch sensor and panel, so the developer need only focus on interfacing with the device. When developing the maXTouch controller interface during evaluation and development, care should be taken to avoid changing the maXTouch configuration or committing changes to NV storage on the maXTouch controller. To get started with development, the user is strongly encouraged to leverage existing code available from the resources outlined in the following sections. 2.5.1.1 Atmel Software Framework The Atmel Software Framework (http://asf.atmel.com) contains examples of code for interfacing with devices in the maXTouch family of touch controllers. Many of the code examples found in the ASF are targeted for the mXT143E Xplained module and support the XMEGA256A3BU as the host MCU. With very minor modification, these projects are directly applicable to this module. 2.5.1.2 Linux Kernel / Android While the Linux or Android OS may not be applicable to XMEGA256A3BU, there is a growing code base in the Linux and Android communities that can interface with maXTouch touchscreen controllers. These drivers provide an excellent starting point for development with embedded firmware running on the XMEGA. The Linux Kernel (www.kernel.org) has included basic support for maXTouch devices since version 2.6.36. The mainline driver has undergone considerable evolution since then. In addition, Atmel maintains patches (www.github.com/atmel-maxtouch/linux) which provide numerous out-of-cycle improvements to the mainline Linux Kernel driver. 2.6 SD/MMC Connector The module includes a SD/MMC Connector (Connector U5) to provide optional removable storage in the user’s developments. This feature is currently experimental. 2.6.1 Atmel Software Framework The Atmel Software Framework (in additional to many online resources) includes example projects that implement SD/MMC support. 11 3 Getting Started As previously noted, the module was designed to effectively consolidate the functionality of the XMEGA A3BU Xplained and mXT143E Xplained board into a single, standalone module. This configuration provides a quick, easy way to evaluate the performance of the touchscreen and display as well as offering a convenient platform for development. In addition, Atmel provides free development tools and coding resources to support development using Atmel Studio (www.atmel.com) and the Atmel Software Framework (http://asf.atmel.com). The following sections outline the process of setting up and programming the module. 3.1 Hardware Setup The module is powered by the USB connector even if the USB interface to a host is not being used. Therefore, the module can be powered either by connecting to a USB host or by connecting USB power supply. 3.2 Demo Firmware The module is pre-loaded with example firmware to demonstrate basic touchscreen and display functionality. This demo firmware will begin as soon as the device is powered up. 3.3 Loading Firmware The user is encouraged to experiment with the various sample projects available in the Atmel Software Framework (http://asf.atmel.com). In order demonstrate the functionality of the module, several of the example projects from the ASF have been compiled for the XMEGA256A3BU and binary images (HEX files) are available for download from the PDA website. See details below. 3.3.1 Programming Tools Before the example HEX files can be loaded, you must first ensure that the necessary programmer (supporting PDI programming) with associated driver/software is installed on your development system. Consult the manual and/or support resources for your programmer for instructions on installation and use. The programmer should be connected to the 6-pin PDI connector J4. 3.3.2 Programming the Example Code Download the example HEX files from http://www.pdaatl.com/modules/2.8in/tm2801demo.zip and unzip to a working folder. Files are named according to the example project. 12 PDA TM2801: 2.8in PCAP Touch Module 1211-3-3 PDA TM2801: 2.8in PCAP Touch Module 4 Specifications For complete specifications, refer to the datasheets listed in section 2.2 for the various sub-system components outlined in Sections 2.4 and 2.5. 4.1 Mechanical Specifications Drawings and CAD models available upon request. 51.0 mm (PET Outline) Cover Panel Outline 57.13mm x 81.61mm R3.175mm in corners 1.2 mm (Cover Panel) 50.0 mm User side 70.1 mm (PET Outline) 58.6 mm (Viewable) Viewed from user side LCD side 0.460 mm (Sensor) 44.2 mm (Viewable) 0.076 mm (FPC) PIN 1 PCB contacts face down 14.1 mm 5.42 mm 13.5 mm (FPC Min Width) PIN 26 4.65 mm 43 mm (FPC Max Width) Figure 4 - Sensor Only Dimensions Sensor (P/N: 21-00001-A0) may be purchased individually. Minimum order quantities apply. Contact PDA for details. 13 AT M EL XM EG A2 56 A3BU 52.7 mm (PCB Length) 81.82 mm (Frame Length) AT M EL MXT143E 19.83 mm (Cover Panel rear surface to Mounting Boss) 50.8 mm (PCB Width) 7.7 mm (PCB Component Clearance) 57.25 mm (Frame Width) Figure 5 – Module Dimensions 4.2 Absolute Maximum Specifications Parameter Value Operating temp 0oC to +70oC Storage temp -40oC to +85oC Vdd -0.5 to +3.6V Max continuous pin current, any control or drive pin ±40 mA Voltage forced onto any pin -0.5V to (Vdd + 0.5) Volts CAUTION: Stresses beyond those listed under Absolute Maximum Specifications may cause permanent damage to the device. This is a stress rating only and functional operation of the device at these or other conditions beyond those indicated in the operational sections of this specification are not implied. Exposure to absolute maximum specification conditions for extended periods may affect device reliability. 14 PDA TM2801: 2.8in PCAP Touch Module 1211-3-3 PDA TM2801: 2.8in PCAP Touch Module 4.3 Recommended Operating Conditions Parameter Value Vin 3.3V ±5 percent Supply ripple + noise ±20 mV 4.4 DC Specifications Vdd = 3.3, Ta = recommended range, unless otherwise noted Parameter Description Min Typ Max Units VIL Low input logic level - 0.5 – 0.3 Vdd V VHL High input logic level 0.7 Vdd – Vdd + 0.5 V VOL Low output voltage – – 0.2Vdd V VOH High output voltage 0.8Vdd – – V – – 1 µA IIL Input leakage current Notes 4.5 I2C-compatible Bus Specifications Parameter Operation Address 0x4A Maximum bus speed (SCL) 400 kHz I2C Specification Version 2.1 4.6 Power Consumption Vdd (V) Mode Idd (mA) 3.3Vdc mxt143E in free run and LCD backlight ON full. 60ma 4.7 Part Number Part Number 90-00003-A0 Description 2.8” Touchscreen Module 15 5 I2C Basics (I2C-compatible Operation) 5.1 Interface Bus The device communicates with the host over an I2C-compatible bus, in accordance with version 2.1 of the I2C specification. The following sections give an overview of the bus; more detailed information is available from www.i2C-bus.org. Devices are connected to the I2C-compatible bus as shown in Figure 6 both bus lines are connected to Vdd via pull-up resistors. The bus drivers of all I2C-compatible devices must be open-drain type. This implements a wired “AND” function that allows any and all devices to drive the bus, one at a time. A low level on the bus is generated when a device outputs a zero. Figure 6. I2C-compatible Interface Bus Vdd Device 1 Device 2 Device 3 Device n R1 R2 SDA SCL 5.2 Transferring Data Bits Each data bit transferred on the bus is accompanied by a pulse on the clock line. The level of the data line must be stable when the clock line is high; the only exception to this rule is for generating START and STOP conditions. Figure 7. Data Transfer SDA SCL Data Stable Data Stable Data Change 5.3 START and STOP Conditions The host initiates and terminates a data transmission. The transmission is initiated when the host issues a START condition on the bus, and is terminated when the host issues a STOP condition. Between the START and STOP conditions, the bus is considered busy. As shown in Figure 8 START and STOP conditions are signaled by changing the level of the SDA line when the SCL line is high. 16 PDA TM2801: 2.8in PCAP Touch Module 1211-3-3 PDA TM2801: Figure 8. 2.8in PCAP Touch Module START and STOP Conditions SDA SCL START STOP 5.4 Address Byte Format All address bytes are 9 bits long. They consist of 7 address bits, one READ/WRITE control bit and an acknowledge bit. If the READ/WRITE bit is set, a read operation is performed. Otherwise a write operation is performed. An address byte consisting of a slave address and a READ or a WRITE bit is called SLA+R or SLA+W, respectively. When the device recognizes that it is being addressed, it acknowledges by pulling SDA low in the ninth SCL (ACK) cycle. The most significant bit of the address byte is transmitted first. Figure 9. Address Byte Format Addr MSB Addr LSB R/W ACK 7 8 9 SDA SCL 1 2 START 5.5 Data Byte Format All data bytes are 9 bits long, consisting of 8 data bits and an acknowledge bit. During a data transfer, the host generates the clock and the START and STOP conditions. The slave device is responsible for acknowledging the reception. An acknowledge (ACK) is signaled by the slave device pulling the SDA line low during the ninth SCL cycle. If the slave device leaves the SDA line high, a NACK is signaled. Figure 10. Data Byte Format Addr MSB Addr LSB R/W ACK 8 9 Aggregate SDA SDA from Transmitter SDA from Receiver SCL from Master 1 SLA+R/W 2 7 Data Byte STOP or Next Data Byte 17 5.6 Combining Address and Data Bytes into a Transmission A transmission consists of a START condition, an SLA+R or SLA+W, one or more data bytes and a STOP condition. The wired “ANDing” of the SCL line is used to implement handshaking between the host and the device. The device extends the SCL low period by pulling the SCL line low whenever it needs extra time for processing between the data transmissions. Figure 11 shows a typical data transmission. Note that several data bytes can be transmitted between the SLA+R or SLA+W and the STOP. Figure 11. Byte Transmission Addr MSB Addr LSB R/W ACK Data MSB Data LSB ACK SDA SCL 1 START 18 2 7 SLA+R/W 8 PDA TM2801: 2.8in PCAP Touch Module 9 1 2 7 Data Byte 8 9 STOP 1211-3-3 PDA TM2801: 2.8in PCAP Touch Module 6 Revision History Revision No. History Rev 1210-1-1 – Oct 2012 Preliminary Draft Rev 1210-2-2 – Oct 19, 2012 Initial Release Rev 1211-3-3 – Nov 20, 2012 Add notes to Figure 4 regarding sensor orientation and pin 1 location. Add notes to Figure 1 identifying connectors and pin 1 locations. 19 7 Notes Precision Design Associates, Inc. 736 Johnson Ferry Rd, Suite C-270 Marietta, GA 30068 USA email: [email protected] tel: (770)-971-4490 ® url: http://www.pdaatl.com ® ® © 2012 Precision Design Associates. All rights reserved. Atmel , Atmel logo and combinations thereof, maXTouch , QTouch , and others are registered trademarks of Atmel Corporation or its subsidiaries. Other terms and product names may be registered trademarks or trademarks of others. 20 PDA TM2801: 2.8in PCAP Touch Module 1211-3-3