Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

st7789 for 2.8 inch lcd #4

Open
hpexeph opened this issue Feb 16, 2020 · 1 comment
Open

st7789 for 2.8 inch lcd #4

hpexeph opened this issue Feb 16, 2020 · 1 comment

Comments

@hpexeph
Copy link

hpexeph commented Feb 16, 2020

Hi and thank you for sharing the library.
Can I use this library for 2.8 inch lcd?
if yes, what changes I have make in the code?
If no, why?
Is there any difference between st7789 and st7789v and st7789h2?

@Floyd-Fish
Copy link
Owner

I don't know the details about your 2.8 inch LCD...If its driver is ST7789, of course you can use it. All you need to do is change the code to adapt it's resolution for your LCD.
The most significant parameter is:

    #define ST7789_WIDTH 240
    #define ST7789_HEIGHT 240

And if your screen displays incorrectly, you may also change the parameter

#define ST7789_ROTATION 1
//#define ST7789_ROTATION 1
//#define ST7789_ROTATION 2
//#define ST7789_ROTATION 3

/* And these two below in each rotation settings*/
#define X_SHIFT 53
#define Y_SHIFT 40

I don't have a 2.8 inch LCD so i haven't run any tests on such a LCD.If you have some trouble during the developing, you may refer to ST7789's datasheet:https://www.waveshare.com/w/upload/a/ae/ST7789_Datasheet.pdf
And I didn't find any differences between ST7789/V/H2, at least in technical parameters, they are about the same. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants