• 0
mboroff

Any Working TFT with uC32?

Question

Has anyone gotten a 40 pin tft to work with a uC32?

 

I have tried two different 40 pin tfts both with and without a shield and failed. I have been attempting to use the UTFT library. Both tfts work ok with shields on an AATAmega256 and a DUE.

 

I am also compiling with MPIDE 0023-windows-20140821.

 

I have heard there are some displays that do work Nokia 5110 and one other. But I feel their resolution is too small a foot print for my project. I'm looking for a minimum of 240x320.

 

If you have a solution please provide links to hardware and software libraries required.

 

Thanks

Edited by Josh
Added Tags

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Hi mboroff,

 

I personally haven't run a 40-pin tft with a chipKIT uC32.

 

I have seen a tft run on a uC32 like the one here.  Granted, the display is about half the resolution that you're looking for and is not a 40 pin module, but the code that's provided in the post might be able to help you out.

 

Thanks,

JColvin

Share this post


Link to post
Share on other sites
  • 0

Hello,

I would like to do that but with the 2.2 inch tft from adafruit. It has the ili9340c controller instead of the The TFT driver (ST7735R). I have seen on the web that people have modify the adafruit library to make it fit for the chipkit uc32. How can I modify the adafruit ili9340 to use the chipkit uc32 instead of the Arduino Uno.

On the Arduino it's working fine because Adafruit has made the library and the code to test the TFT screen but if I use the chipkit uc32 in the Arduino IDE and I'm getting error mostly because of the pins of the spi and because the memory is not the same on AVR and Microchip. int =8bits on AVR and int=16bits on a pic32.

 

Can You help me to know how to make it fit. I tried some code here is the example to make it fit.

 

/***************************************************
  This is an example sketch for the Adafruit 2.2" SPI display.
  This library works with the Adafruit 2.2" TFT Breakout w/SD card
  ----> http://www.adafruit.com/products/1480
 
  Check out the links above for our tutorials and wiring diagrams
  These displays use SPI to communicate, 4 or 5 pins are required to
  interface (RST is optional)
  Adafruit invests time and resources providing this open source code,
  please support Adafruit and open-source hardware by purchasing
  products from Adafruit!

  Written by Limor Fried/Ladyada for Adafruit Industries.
  MIT license, all text above must be included in any redistribution
 ****************************************************/
//#include "SPI"
#include "DSPI.h"  // I PUT THAT
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9340.h"

// pour Arduino Due car c'est ce type de microcontrolleur sam3x8e
#if defined(__SAM3X8E__)
    #undef __FlashStringHelper::F(string_literal)
    #define F(string_literal) string_literal
#endif

//// pour pic32
    #if defined(__PIC32MX__)
      #ifndef _P32XXXX_H
      #define _P32xxxx_H
     
      #include <p32xxxx.h>
      #define __C32_UART __XC_UART
      
      #ifndef _P32MX340F512F_1
      #define _P32MX340F512H_1 //_P32xxxx_H
     
      #include <plib.h>
         
      #ifndef _XC_H
      #include <xc.h>
                  
   #endif /* _P32XXXX_H */
 
     /* For backwards compatibility */
  #undef __FlashStringHelper::F(string_literal)
  #define F(string_literal) string_literal
#endif

// These are the pins used for the UNO
// for Due/Mega/Leonardo use the hardware SPI pins (which are different)
#define _sclk 13  //connecteur spi sur Arduino Due
#define _miso 12  //connecteur spi sur Arduino Due
#define _mosi 11  //connecteur spi sur Arduino Due
#define _cs 10
#define _dc 9
#define _rst 8  //connecteur spi sur Arduino Due

// Using software SPI is really not suggested, its incredibly slow
//Adafruit_ILI9340 tft = Adafruit_ILI9340(_cs, _dc, _mosi, _sclk, _rst, _miso);
// Use hardware SPI
Adafruit_ILI9340 tft = Adafruit_ILI9340(_cs, _dc, _rst);

void setup() {
  Serial.begin(115200);
  while (!Serial);
 
  Serial.println("Adafruit 2.2\" SPI TFT Test!");
 
  tft.begin();

  Serial.println(F("Benchmark                Time (microseconds)"));
  Serial.print(F("Screen fill              "));
  Serial.println(testFillScreen());
  delay(500);  etc....

 

Best Regards,

 

Frank

 

graphicstestChipkitUc32.ino

Share this post


Link to post
Share on other sites
  • 0

Hi Francois,

I got the opportunity to take a look at the code and while it is indeed possible to re-work the library so that it does rely on AVR, but unfortunately Digilent will not be able to dedicate the resources that would be needed to change the dependencies in this one library. 

I'm sorry I could not be of more help.

Thanks,
JColvin

Share this post


Link to post
Share on other sites
  • 0

Yes, my DisplayCore library handles both those chips just fine.  In fact the 2.2" from Adafruit was the first TFT it ever supported. The ILI9340C support though is only through SPI at the moment. Does your 40 pin interface actually use the parallel mode, or is it just using SPI hidden within all those pins? I have seen that before, where you have a big 40 pin interface but only a handful are actually used.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.