I have a few questions concerning the TFTLCD Library, because I am unable to compile the example on my Teensy.
I am using the [url="http://www.adafruit.com/products/335"]2.8" 18-bit color TFT LCD with touchscreen breakout board - ILI9325[/url] on a Teensy 3.0.
I am powering the screen through a second powersupply ([url="http://www.pieterfloris.nl/shop/product.php?id_product=492"]Breadboard Power Supply USB - 5V/3.3V[/url] using the 3.3v since the screen allows it)
Below is a picture of my setup without connections between Teensy & screen (first step of tutorial was to test the backlight this way):
I have downloaded, extracted and renamed both libraries from Adafruit and placed these into \arduino-1.0.3\libraries\ :
[url="https://github.com/adafruit/TFTLCD-Library"]TFT LCD library[/url]
[url="https://github.com/adafruit/Adafruit-GFX-Library"]GFX library[/url]
According to the tutorial on Adafruit I am supposed to alter line 12 in TFTLCD.h :
"In the TFTLCD Library folder, you will need to edit TFTLCD.h. On about line 12, you will see "#define USE_ADAFRUIT_SHIELD_PINOUT". Comment out this line and save the file."
I have done this, saved the file, reopened arduino.exe, loaded the graphicstest example that comes with the TFT LCD library and tried to verify/compile it, but here I get errors:
- Code: Select all
In file included from D:\arduino-1.0.3-beta\libraries\Adafruit_TFTLCD\Adafruit_TFTLCD.cpp:11:0:
D:\arduino-1.0.3-beta\libraries\Adafruit_TFTLCD\pin_magic.h:224:3: error: #error "Board type unsupported / not recognized"
D:\arduino-1.0.3-beta\libraries\Adafruit_TFTLCD\Adafruit_TFTLCD.cpp: In member function 'void Adafruit_TFTLCD::write8(uint8_t)':
D:\arduino-1.0.3-beta\libraries\Adafruit_TFTLCD\Adafruit_TFTLCD.cpp:763:21: error: 'write8inline' was not declared in this scope
D:\arduino-1.0.3-beta\libraries\Adafruit_TFTLCD\Adafruit_TFTLCD.cpp: In member function 'uint8_t Adafruit_TFTLCD::read8()':
D:\arduino-1.0.3-beta\libraries\Adafruit_TFTLCD\Adafruit_TFTLCD.cpp:770:27: error: 'read8inline' was not declared in this scope
D:\arduino-1.0.3-beta\libraries\Adafruit_TFTLCD\Adafruit_TFTLCD.cpp: In member function 'void Adafruit_TFTLCD::setWriteDir()':
D:\arduino-1.0.3-beta\libraries\Adafruit_TFTLCD\Adafruit_TFTLCD.cpp:777:21: error: 'setWriteDirInline' was not declared in this scope
D:\arduino-1.0.3-beta\libraries\Adafruit_TFTLCD\Adafruit_TFTLCD.cpp: In member function 'void Adafruit_TFTLCD::setReadDir()':
D:\arduino-1.0.3-beta\libraries\Adafruit_TFTLCD\Adafruit_TFTLCD.cpp:783:20: error: 'setReadDirInline' was not declared in this scope
For as far as I can tell, these display libraries only seem to recognize Arduino chips, but not Teensy's ARM
Concerning the connections I made (the wiring), I tried to follow [url="http://learn.adafruit.com/2-8-tft-touchscreen/tft-wiring"]the tutorial[/url] as much as possible, but it is a bit confusing to me:
"Start at the end of the TFT (other side than the power pins) and in order connect the pins to digital 7 thru 2. If you're using a mega, connect the TFT Data Pins #0-7 to Mega pins #22-29, in that order. Those Mega pins are on the 'double' header.
Then connect the next two pins to digital 9 and 8."
The pins on the screen are labeled D7 to D2, and I tried to connect them to digital 7 to 2 on the Teensy, along with D1 to dig.9 & D0 to dig.8
The Analog connections were quite simple, I followed the tutorial to the letter on my Teensy 3, but I am unsure if this works:
"Connect the third pin CS (Chip Select) to Analog 3
Connect the fourth pin C/D (Command/Data) to Analog 2
Connect the fifth pin WR (Write) to Analog 1
Connect the sixth pin RD (Read) to Analog 0
Connect the seventh pin RST (Reset) to the Arduino Reset line. This will reset the panel when the Arduino is Reset. You can also use a digital pin for the LCD reset but this will save us a pin."
I have tried to make a picture of all cables connected, but its too much wire on too little surface to take a detailed picture :
-Can I update the library with some small changes, or do I have to add a new section to/rewrite the library ?
-How do I know which digital port should go into which I/O pin on the Teensy ?
-Any other pointers, advice, (well placed) criticism is always welcome
Regards,
Michel
edit, posted error output of test-code, not actual library

