General area when it fits no where else

Moderator: Mmiscool

User avatar
By Ecoli-557
#54070 Might be a different problem - not enough level on the outputs. I checked with scope and it is just 1v!
Another thread here: viewtopic.php?f=13&t=10525#p49576

Will look into the power supply but the datasheet says .8 x Vin so considering 3v in = 2.4 v as a high.......
User avatar
By picstart
#54073 /// the esp12e USES qio FOR THE PROGRAM FLASH
/// the places GOPI10 and GPIO9 as unavailable
/// unless the flash inside the can is removed and pins 3 and 7 lifted
/// pin 3 is wired to 7 and then to 3.3v
/// pads 3 and 7 are connected to GPIO9 and GPIO10
/// since GPIO9 and GPIO10 are now free and then set the FLASH to DIO mode
//// QIO will now not work
/// DIO mode is now needed to flash the arduino IDE NodeMCU v1 12E board
/// +--------+
/// _CS |1 8| 3.3v
/// DO |2 7| _HOLD
/// _WP |3 6| CLK
/// GND |4 5| DI
/// +--------+
/// 25Q32 4m byte flash

The libraries used
#include <SPI.h>
#include <SD.h>
#include <Ticker.h>
#include <Adafruit_ILI9341esp.h>
#include <Adafruit_GFX.h>
#include <XPT2046.h>



#define TFT_DC 2
#define TFT_CS 15

#define Touch_CS 4
#define Touch_IRQ 5
#define SD_CS 9
// For esp8266 chipSelect 9 is GPIO9 SD2 needs flash 3 7 pins lifting


Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
XPT2046 touch(Touch_CS, Touch_IRQ);

Adafruit_GFX_Button buttons[3]; //// declare button array

In setup code somewhat like this snippet ( it is not all the code in setup but could help you see what is needed for your code)
pinMode(SD_CS,FUNCTION_3); //// needed since GPIO9 is function 3
pinMode(SD_CS, OUTPUT);
//// deselect all SPI devices ( helps with a clean start of the SPI common bus)
digitalWrite(SD_CS,HIGH);
digitalWrite(TFT_CS ,HIGH);
digitalWrite(Touch_CS ,HIGH);

Serial.begin(115200);
delay(1000);


tft.begin();
touch.begin(tft.width(), tft.height()); // Must be done before setting rotation defined in <Adafruit_ILI9341esp.h>
tft.setRotation(0);

scrollAddress(0);
setupScrollArea(TOP_FIXED_AREA, BOT_FIXED_AREA); //// lines from the top , lines from the bottom



Serial.println();
Serial.println("controller ILI9341 with XPT2046 touch 2.8in LCD");
Serial.print("tftx ="); Serial.print(tft.width()); Serial.print(" tfty ="); Serial.println(tft.height());


// Replace these for your screen module
touch.setCalibration(208, 1752, 1760, 203);
///initButton(&tft, 100, 100, 70, 40, ILI9341_DARKCYAN, ILI9341_BLUE, ILI9341_GREENYELLOW, "Clear", 2)
/// x y w h outline color fill color text color font size
buttons[0].initButton(&tft, 30, 300, 50, 40, ILI9341_DARKCYAN, ILI9341_BLUE, ILI9341_GREENYELLOW, "File", 1);
buttons[1].initButton(&tft, 120, 300, 50, 40, ILI9341_DARKCYAN, ILI9341_BLUE, ILI9341_GREENYELLOW, "Clear", 1);
buttons[2].initButton(&tft, 210, 300, 50, 40, ILI9341_DARKCYAN, ILI9341_BLUE, ILI9341_GREENYELLOW, "E-Mail", 1);




tft.fillScreen(ILI9341_BLACK);
tft.setCursor(0,0);
tft.setTextColor(ILI9341_WHITE,ILI9341_BLACK);
tft.setTextSize(1);

tft.println("\nInitializing SD card");
if (!SD.begin( SD_CS)) //// note hangs here if SD not present or not even wired.
{
tft.println("Card failed, or not present");
// don't do anything more:
SD_card_present=false;
}

if(SD_card_present==true)
{

tft.println("card initialized.");
}
User avatar
By Ecoli-557
#54094 Thanks for that. I am still looking into the weak signal levels from the ESP.
The capacitance of the scope probe can even affect the levels!
I have removed the 23S17 SPI lines, my Saleae logic analyzer, powered the 3.3 from a bench supply, power the NODE from the USB, have the grounds connected, and the TFT routines work fine!

I still need the TFT and the port expander to work on the same bus. I think its time to lay out a board and try to remove ALL variables in jumpers, breadboards, etc.......

Nobody else is working SPI and Basic? I have gone to 'the dark side' and fooled with Arduino code to get the elements that I need, but the bus loading is still a problem AND there are no kewl graphics already written like radio buttons!

Will keep after it........
Regards to All.
User avatar
By Ecoli-557
#54125 It looks like to me (if I can believe my scope) that the clock is 80 MHz. I have inserted a spi.setup(1000000) after the tft.setup statement in an effort to slow down the clock - didn't work.
My current theory is the added capacitance of the solderless breadboard is affecting the signals. I will re-do the NODE so the SPI pins are above the board and solder wires directly to the pins and on to the TFT display and the port expander and then observe the waveforms.
I hope it is just a fact of too little drive at these frequencies. If so, would Mike add a speed directive for the SPI bus???

I will post my findings later.
Regards to All.