Connect Nano atmega328 to TFT 2.2" LCD

Hi,

I've been trying to get this LCD to work on an arduino nano atmega 328. So far i have found the MISO, MOSI, SCK, RESET, VCC and GND pins to connect onto the nano atmega328. I have the D/C, LED and CS pins left on the TFT 2.2" to place but not sure where they go in the nano. It says CS is pin 53 and DC is pin 49 on the Arduino DUE but what about on Nano?

Also i still need to know which library is relevant for the nano to use the tft 2.2" LCD. I've had a look online but there doesn't seem to be one available yet.

Help please

I recently had this come up in the compiler whilst uploading the script to the Nano atmega 328:

core.a(main.cpp.o): In function main': C:\Users\C\Desktop\arduino-1.0.5-r2\hardware\arduino\cores\arduino/main.cpp:11: undefined reference to setup'
C:\Users\C\Desktop\arduino-1.0.5-r2\hardware\arduino\cores\arduino/main.cpp:14: undefined reference to `loop'

Just before, another error message was appearing with a message saying 'there should be a class before the {' along the line of

class Adafruit_HX8340B : public Adafruit_GFX {

But i never touched it so i'm not sure what is going on. Can anyone help with this please?

I have downloaded the Adafruit_HX8340B library and was uploading it onto my Arduino Nano atmega 328 just in case anyone is wondering ....

But i'm wondering if there's something in the script that i have to change in order for it to work?

Just thoughts. I have attached the diagram i will be working on to attach the 2.2" TFT LCD Display to the Arduino Nano Atmega328.

Cheers

Post your sketch.
I think you compile only the library and not the demo or sketch.
In a Arduino sketch are obligatory setup() and loop() functions.

In this thread we speak about TFT 2.2" but it use a ILI9314 controller, I think your is different if you try using Adafruits HX8340B
http://forum.arduino.cc/index.php?topic=181679.0

When you see on peripherals some pins named MISO, MOSI we speak about SPI communication.
On AtMega328 (Nano o Uno) pins are fixed 13=SCK 12=MISO 11=MOSI SS=usually 10
Also on AtMega2560 (Mega) pins are fided. 52=SCK 50=MISO 51=MOSI SS=usually 53

For library
1.you must download the entire zip file here (button Download Zip on right):

2.extract the files from Zip and maintain the internal folders structure
Folder name will be Adafruit-HX8340B-master, rename in Adafruit_HX8340B
ATTENTION underscore and not minus char !!!

  1. this folder must be copied under libraries of IDE.
    This folder is named LIBRARIES and is a subfolder where you have the sketch folder
    Check in Arduino IDE under "File->Preferences" label "Sketchbook location"

For example in my PC: => G:\Arduino_projects
under this folder I have LIBRARIES => G:\Arduino_projects\LIBRARIES
After copy you must have G:\Arduino_projects\LIBRARIES\Adafruit_HX8340B

  1. Close IDE, restart it.
  2. On IDE menu File->Examples->Adafruit_HX8340B you see 2 demo sketch

ATTENTION: this library require also Adafruit_GFX Library !!!!

P.S. sorry for my English

Thanks i'll try it out and let you know. I'm just abit busy this week so i'll get back to you in a couple of days.

Cheers

Best regards,

Charles

Found this from someone:

It looks very similar but has sms functions. Unfortunately it can only work on Duo as shown in this video. Wonder if anyone can work out how to do sms for Nano as well?

BTW, i have the pins all sorted out for NANO:

D4 : RESET
D5 : CS
D6 : D/C
D7 : LED
D11 : MOSI
D12 : MISO
D13 : SCK

Do you know where i can get a conversion board?

Cheers