+ Post New Thread
Page 1 of 2 1 2 LastLast
Results 1 to 20 of 24
  1. #1
    Full Member level 6
    Points: 3,015, Level: 12
    Achievements:
    7 years registered

    Join Date
    Jun 2011
    Posts
    387
    Helped
    14 / 14
    Points
    3,015
    Level
    12

    Sainsmart 3.2 TFT LCD touchscreen interface with Arduino mega 2560 board

    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

  2. #2
    Advanced Member level 5
    Points: 9,012, Level: 22
    Achievements:
    7 years registered
    Easyrider83's Avatar
    Join Date
    Oct 2011
    Location
    Tallinn, Estonia
    Posts
    1,588
    Helped
    362 / 362
    Points
    9,012
    Level
    22

    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 :)
    Love me or hate me. All infractions will be ignored.



  3. #3
    Full Member level 6
    Points: 3,015, Level: 12
    Achievements:
    7 years registered

    Join Date
    Jun 2011
    Posts
    387
    Helped
    14 / 14
    Points
    3,015
    Level
    12

    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



  4. #4
    Advanced Member level 5
    Points: 9,012, Level: 22
    Achievements:
    7 years registered
    Easyrider83's Avatar
    Join Date
    Oct 2011
    Location
    Tallinn, Estonia
    Posts
    1,588
    Helped
    362 / 362
    Points
    9,012
    Level
    22

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

    Love me or hate me. All infractions will be ignored.


    1 members found this post helpful.

    •   AltAdvertisment

        
       

  5. #5
    Junior Member level 2
    Points: 524, Level: 4

    Join Date
    Mar 2017
    Location
    Oldcroft, Forest Of Dean, UK
    Posts
    24
    Helped
    9 / 9
    Points
    524
    Level
    4

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

    Are these the Sainsmart boards you have?
    Always remember that you are absolutely unique,
    just like everyone else.


    1 members found this post helpful.

  6. #6
    Full Member level 6
    Points: 3,015, Level: 12
    Achievements:
    7 years registered

    Join Date
    Jun 2011
    Posts
    387
    Helped
    14 / 14
    Points
    3,015
    Level
    12

    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



    •   AltAdvertisment

        
       

  7. #7
    Advanced Member level 5
    Points: 9,012, Level: 22
    Achievements:
    7 years registered
    Easyrider83's Avatar
    Join Date
    Oct 2011
    Location
    Tallinn, Estonia
    Posts
    1,588
    Helped
    362 / 362
    Points
    9,012
    Level
    22

    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.
    Love me or hate me. All infractions will be ignored.



  8. #8
    Junior Member level 2
    Points: 524, Level: 4

    Join Date
    Mar 2017
    Location
    Oldcroft, Forest Of Dean, UK
    Posts
    24
    Helped
    9 / 9
    Points
    524
    Level
    4

    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.
    Always remember that you are absolutely unique,
    just like everyone else.



  9. #9
    Full Member level 6
    Points: 3,015, Level: 12
    Achievements:
    7 years registered

    Join Date
    Jun 2011
    Posts
    387
    Helped
    14 / 14
    Points
    3,015
    Level
    12

    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



    •   AltAdvertisment

        
       

  10. #10
    Super Moderator
    Points: 73,784, Level: 66
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    14,968
    Helped
    3407 / 3407
    Points
    73,784
    Level
    66

    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
    Please don´t contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



  11. #11
    Junior Member level 2
    Points: 524, Level: 4

    Join Date
    Mar 2017
    Location
    Oldcroft, Forest Of Dean, UK
    Posts
    24
    Helped
    9 / 9
    Points
    524
    Level
    4

    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.
    Always remember that you are absolutely unique,
    just like everyone else.



  12. #12
    Full Member level 6
    Points: 3,015, Level: 12
    Achievements:
    7 years registered

    Join Date
    Jun 2011
    Posts
    387
    Helped
    14 / 14
    Points
    3,015
    Level
    12

    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



  13. #13
    Advanced Member level 5
    Points: 9,012, Level: 22
    Achievements:
    7 years registered
    Easyrider83's Avatar
    Join Date
    Oct 2011
    Location
    Tallinn, Estonia
    Posts
    1,588
    Helped
    362 / 362
    Points
    9,012
    Level
    22

    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.
    Love me or hate me. All infractions will be ignored.


    1 members found this post helpful.

  14. #14
    Full Member level 6
    Points: 3,015, Level: 12
    Achievements:
    7 years registered

    Join Date
    Jun 2011
    Posts
    387
    Helped
    14 / 14
    Points
    3,015
    Level
    12

    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



  15. #15
    Advanced Member level 2
    Points: 2,574, Level: 11
    baileychic's Avatar
    Join Date
    Aug 2017
    Posts
    501
    Helped
    46 / 46
    Points
    2,574
    Level
    11

    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-Disp.../dp/B008FWSH3C

    TFT Lcd expansion board.

    https://www.flipkart.com/sainsmart-t...mf3h46gzhhqe5s

    https://www.prayogindia.in/product/s...for-arduino-u/

    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.

    http://rinkydinkelectronics.com/library.php?id=51


    1 members found this post helpful.

  16. #16
    Full Member level 6
    Points: 3,015, Level: 12
    Achievements:
    7 years registered

    Join Date
    Jun 2011
    Posts
    387
    Helped
    14 / 14
    Points
    3,015
    Level
    12

    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:

    https://www.amazon.in/SLB-Works-Sain...ail_bullets_id

    Here is the direct sainsmart tft display link:

    https://www.sainsmart.com/collection...n-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



  17. #17
    Advanced Member level 2
    Points: 2,574, Level: 11
    baileychic's Avatar
    Join Date
    Aug 2017
    Posts
    501
    Helped
    46 / 46
    Points
    2,574
    Level
    11

    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.



    •   AltAdvertisment

        
       

  18. #18
    Full Member level 6
    Points: 3,015, Level: 12
    Achievements:
    7 years registered

    Join Date
    Jun 2011
    Posts
    387
    Helped
    14 / 14
    Points
    3,015
    Level
    12

    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



  19. #19
    Full Member level 6
    Points: 3,015, Level: 12
    Achievements:
    7 years registered

    Join Date
    Jun 2011
    Posts
    387
    Helped
    14 / 14
    Points
    3,015
    Level
    12

    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



  20. #20
    Super Moderator
    Points: 73,784, Level: 66
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    14,968
    Helped
    3407 / 3407
    Points
    73,784
    Level
    66

    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
    Please don´t contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



--[[ ]]--