資料下載:http://linksprite.com/wiki/index.php5?title=Touch_LCD_Shield
This is a multifunctional Arduino/Arduino Mega compatible resistive touch screen. It can be used as display device or sketch pad. With a SD card module integrated also on this shield, this shield reserves great room for other expansions to your project.
ItemMinTypicalMaxUnitVoltageCurrentLCD Panel SizeView angleResolutionLCD colorBacklight TypeLCD driver ICInterface TypeTouch ScreenActive areaESD contact dischargeESD air dischargeDimensionWeight
Pins Used for TFT Screen Control: D4: TF_CS, SD card select input pin
D5: TFT_CS, TFT chip select input pin
D6: TFT_D/C, TFT Data/Command control pin
D7: BACKLIGHT, TFT backlight control pin
Pins Used for SPI Interface: D10: SPI chip select D11: SPI MOSI pin
D12: SPI MISO pin
D13: SPI serial clock pin
Pins Used for Touch Function: A0 - Touch Screen Y- input pin.
A1 - Touch Screen X- input pin.
A2 - Touch Screen Y+ input pin.
A3 - Touch Screen X+ input pin.
The TFT library provides the following Application Programming Interfaces(API). The library makes use of direct access to PORT registers instead of Arduino APIs. This is to increase the speed of communication between MCU and TFT. At present, the library supports Arduino, Arduino Mega (1280 or 2560) and Seeeduino ADK Main Board compatible boards. In Mega the 8bit data port of TFT is distributed to different pins belonging to different ports. This decreases the speed of graphics drawing when compared to Arduino. The choice of port pins are purely based on Arduino / Mega port pin arrangement.
Sets the cursor position to (poX,poY). This function is internally used by other graphics APIs.
Sets the (poX,poY) pixel to color color. This function is internally used by other graphics APIs.
Draws a line from pixel (x0,y0) to pixel (x1,y1) with color color.
Draws a Horizontal Line of length length with color color starting from pixel (poX,poY).
Draws a Vertical Line of length length with color color starting from pixel (poX,poY).
Draws a rectangle starting from (poX,poY) of length length, width width and color color.
Draws a filled rectangle starting from pixel (poX,poY) of length length, width width and color color.
Draws a circle at (poX,poY) of radius radius and color color.
Draws a filled circle at (poX,poY) of radius radius and color color.
Draws a character starting from (poX,poY) using inbuilt font of size size and with color fgcolor. This function is used by drawString() function.
Draws a string of text starting from (poX,poY) using inbuilt font of size size and with color fgcolor.
TFT Touch Shield uses the Adafruit Touch Screen Library. In short, a 4-wire resistive touch screen provides two voltage divider each for X and Y axis. By applying proper voltages for each axis and scanning the ADC values the position of the touch can be detected. These values are always prone to noise. Hence a digital filter is used.
Where XP, YP, XM and YM are ADC port pins connected to XPlus, YPlus, XMinus and YMinus pins of Touch Screen. 300 is the resistance across X plates.