Display LCD ST7735S 1.8" SPI Not work for Proton?


#1

i have Display LCD ST7735S 1.8" SPI i try to use it connect to photon and i use library

Don’t work , because display not have dc pin


#2

This doesn’t look like an Adafruit board.
Any links for it?


#3

Detail

Datasheet http://thaieasyelec.com/downloads/EFDV366/Datasheet.zip
Example MCS51 http://thaieasyelec.com/downloads/EFDV366/51-keil-Demo.zip
Example code for arduino http://thaieasyelec.com/downloads/EFDV366/EFDV366-Arduino-Example-Code.rar
TTE_ST7735 Library http://thaieasyelec.com/downloads/EFDV366/ST7735_TEE.rar


#4

Well Done ^ ^ connect rst pin to spark


#5

@fangda01

I have exactly the same board ST7735S according to my order. I have other ST7735 boards that work but having tried various things I still cannot get these to work with the photon. Could you clarify your connections to the photon (the photo is not that clear) and the code you have used: tft.init version you used and whether you do anything with the reset pin - please?


#6

@fangda01

Could you please share how you wired this to work and the firmware that produced what is shown in the picture?

[Update] I managed to figure this out with a bit of trial and error and the hints about attaching reset to RST on the photon. The photon data sheet and the display data sheet together explain why this works. The trick to making these display modules work is that the reset pin needs to be held HIGH and stable during the power on sequence and then all the time the display is on. RST pin on the photon is internally connected to 3.3V with a 1K ohm resistor and with a capacitor to GND. 

My wiring connections are as follows:
LED - either 3.3V or to a PWM enabled output if soft light up and down is required. A7/WKP used.
SCK (both TFT and SD) - A3
SDA (TFT) and MOSI (SD) - A5
MISO (SD) - A4
RESET - RST
SD CS - A6 (but could be any free pin as long as the firmware corresponds)
TFT CS - A2 (but could be any free pin as long as the firmware corresponds)
TFT AO/DC - A1(but could be any free pin as long as the firmware corresponds)
GND - GND
VCC - 3.3V

The photon compatible SD library works with SPI_FULL_SPEED and tft.initR(INITR_BLACKTAB);

#7

My Project show connect pin to work

My Prototype


#8

Code Setting Header

#define cs   A2
#define dc   A0
#define rst  NO_RST_PIN
#include "Adafruit_mfGFX.h"    // Core graphics library
#include "Adafruit_ST7735.h"   // Hardware-specific library
Adafruit_ST7735 display = Adafruit_ST7735(cs, dc, rst); // hardware spa


void setup() {
display.initR(INITR_BLACKTAB);
  display.fillScreen(ST7735_BLACK);
  display.setCursor(0, 0);
  display.setTextColor(ST7735_WHITE);
  display.setTextWrap(true);
  display.setRotation(3);
  display.setTextSize(1);
}

#9

Nice project share :+1:

I just think the 2N2222A seemst mirrored, or not?
And for completeness, the power rails might also be nice to add (if you find space ;-))


#10

2N2222A is NPN switching transistors
add for when deep sleep mode is close step up safe battery ( Control with Digital D7 when wake up )

Sorry , I’m not good at English. ^ ^


#11

Since I can’t really make out your power rails, but judging from the “Step Up 3.3 to 5V” I’d think your Photon’s 3V3 pin will be sourcing the power for the step-up and the Photon’s GND will sink it.
Consequently I’d expect the emitter (marked with the emitter diode) pointing towards the sinking GND pin, not the other way, otherways it’d be blocking current.

But I could be mistaken and you actually have the system GND connected between emitter and Step-Up (which would make me wonder how D7 would ever switch GND to the Photon to actually drive D7 :wink: - a resistor between base and D7 might also not harm).

And I guess the 10k resistors are pull-up not -down (which might better be tied to 3V3 rather than Vin).


#12

Actually Use load switch mosfet , but now not find it ,
and i am ordering it

Because my firmware can open and close barcode scanner


#13

@fangda01

Thanks for sharing this project - 3D printed custom case looks great. I noticed a couple of things like @ScruffR with your use of voltages. I would add 100nF capacitors in parallel to the resistors you have for the switches.

The Lipo battery you are using is 3.7V what is that connected to on the photon - the Vin, does this work OK? Also, the Lipo battery fuel gauge what advantage does this give over splitting the voltage output from the battery with resistors to ensure a range of 0-3.3v and putting this into one of the analogue pins?

Does the barcode reader not work with 3.3V TTL? My experience and since most of the digital pins on the photon are 5V tolerant is that as long as the peripheral is powered correctly the logic signals work fine. Surely you could take out a bit of complexity :grinning: