Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Sainsmart 3.2 inch TFT Touchscreen interface with Arduino

Status
Not open for further replies.

prakashvenugopal

Advanced Member level 1
Joined
Jun 1, 2011
Messages
473
Helped
15
Reputation
30
Reaction score
15
Trophy points
1,298
Activity points
4,973
Hi all,

Did anyone have the sample code to edit the value in the touchscreen and store that value in a register?. Please let us know. if anyone have example for this. please share. Please help.

I am using Sainsmart 3.2 inch tft touchscreen with arduino mega 2560.

Thanks in advance.

Regards,
V. Prakash
 

Re: Sainsmart 3.2 TFT LCD touchscreen interface with Arduino mega 2560 board

LCD controller is SSD1289, touch ADS7843. For both of them there are a lot of code examples in internet.
I can give you my lcd driver for SSD1289, but I don't think you gonna be happy having it :)
 

Re: Sainsmart 3.2 TFT LCD touchscreen interface with Arduino mega 2560 board

Hi easyrider83,

Please share your code so that it is very helpful for me. Please share.

Regards,
V.Prakash
 

Re: Sainsmart 3.2 TFT LCD touchscreen interface with Arduino mega 2560 board

Are these the Sainsmart boards you have?
 

Attachments

  • SKU20-011-846(Sainsmart Mega 2560+TFT mega shield +Touch panel).pdf
    265.6 KB · Views: 108
Re: Sainsmart 3.2 TFT LCD touchscreen interface with Arduino mega 2560 board

Hi easyrider83,

Thanks for sharing the link but i need a sample code to edit the value in the touchscreen and store that value in a register.??
Do you have, Please share. I am quite new to this Sainsmart 3.2" TFT touchscreen interface with arduino mega 2560? Please help.

Regards,
V. Prakash

- - - Updated - - -

Hi oldsirhippy,

Yes. The same sainsmart 3.2" TFT Touchscreen display is used with Arduino mega 2560. Do you have any sample code to edit the values in the touchscreen. Please share.


Regards,
V. Prakash
 

Re: Sainsmart 3.2 TFT LCD touchscreen interface with Arduino mega 2560 board

Sorry, I can't provide any code. This driver has no hw dependency. It can work with any hw. But you need to provide interface functions. SSD1289 support spi, i2c and parallel 8 and 16 bit interfaces. I have no idea which one you use and how to use it with mega or whatever do you have there.
 

Re: Sainsmart 3.2 TFT LCD touchscreen interface with Arduino mega 2560 board

Here are the examples and library associated with them.
EDAboard would not allow me to upload *.cpp, *.h or *.ino files, so you'll need to rename the files and librariy correctly.
 

Attachments

  • ITDB02_Graph16_Demo_Landscape_text.txt
    7.5 KB · Views: 103
  • TFT3_2_Mega_text.txt
    6.5 KB · Views: 96
  • ITDB02_Graph16_text.txt
    25.1 KB · Views: 97
  • ITDB02_Graph16_h_text.txt
    4.7 KB · Views: 97

Re: Sainsmart 3.2 TFT LCD touchscreen interface with Arduino mega 2560 board

Hi oldsirhippy,

Thanks for sharing this. I am having following doubt as i was new to it.
1. Did these files contain any sample code to edit the value in the touchscreen and store that value in a register?
2. When i ask for the sample code, all of them are giving library Files? is it enough for my editing the value in the touchscreen? i was totally
confused.
3. We have to edit the library files to achieve our requirement.? or otherwise seperate .ino file have to written apart from the library files. Please explain?

Regards,
V. Prakash
 

Re: Sainsmart 3.2 TFT LCD touchscreen interface with Arduino mega 2560 board

Hi,

You misunderstood how this forum works.
--> it is not meant that others do your job or provide code for you.

The usual way is:
* you look for informations, documents, example code..
* you write or edit existing code
* you test the code
* in case of problems: you write your expectations, you write your test conditions, you write a detailed error description..
--> then there are many members to help you rectify your code

Klaus
 

Re: Sainsmart 3.2 TFT LCD touchscreen interface with Arduino mega 2560 board

I have not studied or used the code so don't know.

If you look at the code, there is a header file *.h, a C++ library file *.cpp and 2 arduino files - all these need to be appropriately renamed to be usable arduino code.

The arduino files are the examples that were included in the file that Sainsmart provided. That's all I have.
 

Re: Sainsmart 3.2 TFT LCD touchscreen interface with Arduino mega 2560 board

Hi KlausST, Easyrider83, Oldsirhippy,

Thanks for your replies. I will study completely regarding the interface of Sainsmart 3.2" TFT touchscreen interface with arduino mega 2560 and get back to you. Thanks for the help.

Regards,
V. Prakash
 

Re: Sainsmart 3.2 TFT LCD touchscreen interface with Arduino mega 2560 board

One advice before we will lost you for a years. Forget 'Sainsmart' and 'mega'. This words are unnesecessary. Exlude them from daily usage.
Your diplay using SSD1289 controller. This is important. Also important is adc being used for touch screen.
SPI interface is quite common for all AVR mcu. You write driver once and then just reuse it.
 
Re: Sainsmart 3.2 TFT LCD touchscreen interface with Arduino mega 2560 board

Hi,

I received the Arduino mega 2560 board + display shied +Sainsmart 3.2" TFT touchscreen display. Please refer the attachment.
But during Power ON, instead of white screen, the black patch seen on the display. pl. refer the attachment.
I think the display is damaged. Actually, i waited long time for receiving the ordered item.

If i order another sainsmart 3.2" TFT touchscreen display. it will take huge time to receive.

can anyone suggest the equivalent for sainsmart 3.2"TFT touchscreen display in amazon and ebay.

Please help.

Regards,
V. Prakash
 

Attachments

  • Arduino mega, TFT display, display shield Front view.jpg
    Arduino mega, TFT display, display shield Front view.jpg
    123.5 KB · Views: 135
  • Arduino mega, TFT Display, displayshield back view.jpg
    Arduino mega, TFT Display, displayshield back view.jpg
    149.6 KB · Views: 146
  • Black Batch on the Display during PowerON.jpg
    Black Batch on the Display during PowerON.jpg
    69.4 KB · Views: 205
  • Black Batch on the Display during PowerON1a.JPG
    Black Batch on the Display during PowerON1a.JPG
    99.3 KB · Views: 175

Re: Sainsmart 3.2 TFT LCD touchscreen interface with Arduino mega 2560 board

Here are Amazon India and other links to buy it.

https://www.amazon.in/SainSmart-Display-Adjustable-Arduino-Mega2560/dp/B008FWSH3C

TFT Lcd expansion board.

https://www.flipkart.com/sainsmart-...ega-2560-r3-1280-a082-plug/p/itmf3h46gzhhqe5s

**broken link removed**

You use free shipping I guess but you were lucky to receive the product. I had ordered 250 USD worth USB PC Oscilloscope with free shipping from SainSmart but it never reached me. The shipment got lost and no refund.

A few years back I had successfully used SainSmart 3.2" display with UTFT and UTouch libraries. Now I guess UTouch is replaced by another library URTouch.

**broken link removed**
 
Re: Sainsmart 3.2 TFT LCD touchscreen interface with Arduino mega 2560 board

Hi baileychic,

Thanks for the reply. I am only looking to purchase the defective Sainsmart 3.2 inch TFT display alone from amazon or ebay etc. i have LCD shield pcb and the Arduino mega 2560 board. Can you please recommend the sainsmart 3.2 inch TFT display alone. Please help.

Regards,
V. Prakash

- - - Updated - - -

Hi,

Will this 3.2 inch TFT display from amazon.in is same display as from Direct sainsmart:

Here is the amazon link TFT display link:

**broken link removed**

Here is the direct sainsmart tft display link:

https://www.sainsmart.com/collections/all/products/3-2-tft-lcd-touch-screen-with-sd-slot


will this amazon link tft display is same as sainsmart tft display?
will this amazon link tft display works with arduino?
Please let us know for Purchasing?

Regards,
V. Prakash
 

Re: Sainsmart 3.2 TFT LCD touchscreen interface with Arduino mega 2560 board

Yes, that display is the same but the cost is very high. Instead of buying just the display from above link you could add a little more and buy all the three modules that are Mega2560, display and shield.
 

Re: Sainsmart 3.2 TFT LCD touchscreen interface with Arduino mega 2560 board

Hi,

Ok. thanks. I will try to buy all the three.

Regards,
V. Prakash
 

Re: Sainsmart 3.2 TFT LCD touchscreen interface with Arduino mega 2560 board

Hi,
I had successfully interfaced Sainsmart TFT touchscreen with atmega 2560 board. Now i had the following problem in it.

I am using the Arduino Mega 2560 board to generate the 1 usec timer interrupt.
For 1 count, i.e timer1_counter = 65534, it is taking 7 usec to go to the timer interrupt routine.
I need 1 usec timer interrupt to scan my Program. Let us know if i am making any mistake.
What is the Problem.?

Here is the code:



cli();
TCCR1A = 0x00;
TCCR1B = 0x00;
// Set timer1_counter to the correct value for our interrupt interval
//timer1_counter = 65534;
TCNT1 = timer1_counter; // preload timer
TCCR1B |= (1 << CS10); // No prescaling
//TCCR1B = 0x01; //No prescaling
TIMSK1 |= (1 << TOIE1); // enable timer overflow interrupt
//TIMSK1 = 0x01 ; //set TOIE1 // enable timer overflow interrupt
sei();





ISR(TIMER1_OVF_vect) // interrupt service routine
{
TCNT1 = timer1_counter; // preload timer
//digitalWrite(ledPin, digitalRead(ledPin) ^ 1);
PORTB=0Xff;
PORTB=0X00;
}


Kindly let us know.

Regards,
V. Prakash
 

Re: Sainsmart 3.2 TFT LCD touchscreen interface with Arduino mega 2560 board

Hi,

I'm using AVRs.
In my eyes it makes no sense to generate a "1us" interrupt.
(Neither for AVR, and I think nor for any other microcontroller I know)
It is too fast, and especially with C# (and it's overhead) it needs too much processing power.
What is it used for?

Please draw for your own a flow chart and a timing diagram (paper, pencil) to see what happens.

Klaus
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top