This picture compares the sizes of the screens.
This is the 2.4 inch screen.  It has some sort of push button switch.  
This is the 3.2 inch screen.  It uses a totally different pin arrangement. Why?  I do not know!  
This is the 3.5 inch LCD screen.  On this LCD pin A4 is the LCD Reset pin so it has to be disconnected and pulled high with a resistor in order to use A4 for the MSGEQ7.
The 2.4 inch and 3.5 inch LCD screens both work with the Adafruit ILI9341 driver.  You can use   uint16_t identifier = 0x9341; or tft.begin(0x9341); to set it up.  
The screen size needs to be manually changed in the Adafruit library.  The "Adafruit_TFTLCD" file is changed like the following for the 3.5 inch screen:
// Manually overide size
#define TFTWIDTH   320
#define TFTHEIGHT  480
//#define TFTWIDTH   240
//#define TFTHEIGHT  320
Now the 3.2 inch screen is more complicated to get working.  In the Adafruit library the file "pin_magic" needs to have these lines changed to designate the correct data pins as follows:
 #else // Uno w/Breakout board
  #define write8inline(d) {                          \
    PORTD = (PORTD & B00101111) | ((d) & B11010000); \
    PORTB = (PORTB & B11010000) | ((d) & B00101111); \
    WR_STROBE; }
  #define read8inline(result) {                       \
    RD_ACTIVE;                                        \
    DELAY7;                                           \
    result = (PIND & B11010000) | (PINB & B00101111); \
    RD_IDLE; }
  #define setWriteDirInline() { DDRD |=  B11010000; DDRB |=  B00101111; }
  #define setReadDirInline()  { DDRD &= ~B11010000; DDRB &= ~B00101111; }
 #endif

 
 
No comments:
Post a Comment