Bmp viewer help

I was wondering if you could please help me, im a beginner in this domain and I cant get my project to work.
The project im trying to achieve is a bmp viewer of about 50 files that continuously loops.
I have a nano,
st7789v display

( BTW I have seen the display work with ILI9341 driver, will not work on anything else )
sd reader

#define TFT_CS 10
#define TFT_DC 9
#define TFT_MOSI 11
#define TFT_CLK 13
#define TFT_RST 8
#define TFT_MISO 12
#define sdcs 4
ive connected data lines through 1k ohm resistor.

Are you able to help me with coding and files required to get this going please ?

Your topic was MOVED to its current forum category which is more appropriate than the original as it has nothing to do with Installation and Troubleshooting of the IDE

Go get the MCUFriend library, then talk to @david_prentice

thank you

ive got the mcufriend library, the graphics example works, but show bmp does not.

@david_prentice
Are you happy to help here? You are much more experienced than I am.

One point - due to the SPI circuitry on your LCD, you may find that you cannot use an external SD card module. Have you tried using the SD card slot on the back of the screen?

Post the sketch here, using code tags when you do

What does "show bmp does not work" mean ?
What happens when you upload it ?
Do you get any error messages ?

There is an example included in the mcufriend library called that.

I know, but just saying that it "does not work" tells us nothing

no not yet, the issue is that if a sd card is placed in that one, it makes the lcd board to big to fit in the enclosure that i would place it in.

@newtothis1966 Can you try the LCD SD card slot as a test at least?

@newtothis1966 Can you also explain what this project is? What drivers your LCD has? Can you find a schematic of the LCD internal circuitry?

First off. Thanks for providing links to Display and SD card reader.

I don't know where you originally posted but Displays Forum is the most appropriate place. (I don't read the Programming Forum.)

Life is easiest with the onboard SD card holder but monster SD cards are a nuisance.

Remember. The TFT and SD / microSD are all 3.3V devices. Your Nano has 5V logic.

Your Display is SPI. Use Adafruit_ST7789 library. MCUFRIEND_kbv is for parallel Displays.
Connect TFT to VCC=5V. U2 is a 3.3V voltage regulator.
Connect all the logic via level shifters. e.g. 4k7+10k potential dividers, level shifter chips, ...
Connect microSD VCC=3.3V. The board was designed for "D1 mini". I will need to look up the pin connections for SD_CS, SD_MISO and SD_MOSI

At the end of the day you could just buy a Wemos D1 Mini and avoid all the level shifters.
Or buy a Uno clone and 2.4 inch "Mcufriend" Shield (which has microSD) . Plug and go !!

I can get you going with Adafruit_ST7789 showing BMP files from SD but you have to connect Display properly first.

David.

Thanks for your input here David. I am a little out of my depth when it comes to LCDs.

It does not matter. You just need to know which Shield to plug in to your Arduino. And which libraries to use.

However when it comes to hand-wiring there are a lot of extra things to worry about. Especially if you use 5V logic in an electronics world intended for 3.3V.

David.

1 Like

Hi David,
can you please draw up a connection diagram for me to follow so I can at least wire it up correctly and go from there.
ive been playing around as its connected and have found a library that works with the test 100%.

this library is Ucglib.

ive tried the st7789 libraries and there is only a white screen

btw i have some logic level convertors, can these be used instead of resistors ?

Which ST7789 library(s)?
How have you wired the screen?

Ucglib does not support ST7789 ---- as far as I know.
But you still need to answer :
How have you wired the screen?

Yes you can use the level-shifters in your JayCar link. It looks like 4 channels.
You need 6 level shifter channels:
TFT_SCK, SD_SCK
TFT_MOSI, SD_MOSI
TFT_DC
TFT_RST
TFT_CS
SD_CS

TFT_MISO, SD_MISO does not need a level-shifter.

So that would be 6x 2k2 + 6x 3k3 resistors.
Or 2x JayCar modules.

Follow the instructions in https://simple-circuit.com/interfacing-arduino-ili9341-tft-display/

Just add an extra channel for SD_CS.

The resistor values are not too critical. What resistors do you possess ?

I strongly advise getting the ST7789 Display to work with Adafruit_ST7789.h library first.

David.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.