GithubHelp home page GithubHelp logo

deirvlon / st7789v-arduino Goto Github PK

View Code? Open in Web Editor NEW
19.0 1.0 6.0 38 KB

ST7789v Arduino Library - Tested on Arduino UNO and STM32 (Blue Pill)

Home Page: http://www.deirvlon.com

License: MIT License

C++ 100.00%
arduino st7789-display st7789v display driver sd-card

st7789v-arduino's Introduction

ST7789v-Arduino

I have faced many challenges to up on running display with the ST7789v driver. There is very poor information about this Driver on the Internet. The most information is about the ST7789 Driver. The main difference between ST7789 and ST7789v is the availability of DC pin. On ST7789v DC signal send as 9's bit of data in SPI communication, but DC is a physical pin on ST7789.

In this library i collected all the research that i have done about ST7789v driver.

I have made following example sketchs:

  • Graphic test sketch (graphicsTEST.ino)
  • Load .bmp files directly from SD Card (graphicsSDcrad.ino)
  • Load Image from MEMORY from .h (graphicsIMG.ino)
  • Display control modes test (graphicsControllerMods.ino)

From my tests:

Kamran Gasimov Smart Watch Deirvlon OS Mini - Demo

If you want to connect SD Card then Display pin configuration will be like

#define TFT_DC    8
#define TFT_RST   9
#define TFT_CS    10 // only for displays with CS pin
#define TFT_MOSI  7   // for hardware SPI data pin (all of available pins)
#define TFT_SCLK  8   // for hardware SPI sclk pin (all of available pins)

GitHub Logo

st7789v-arduino's People

Contributors

deirvlon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

st7789v-arduino's Issues

Issues with 9bit SPI with TFT_DC=-1

Hello,

I was getting many errors on debug console when using TFT_DC=-1, for 9 bit SPI.
I found out that if I add a check on DC HIGH/LOW functions it will fix it:
(line 608)

inline void ST7789v_arduino::DC_HIGH(void)
{
  _DCbit = true;
  if (_SPI9bit == false)
  {
#if defined(USE_FAST_IO)
    *dcport |= dcpinmask;
#else
    digitalWrite(_dc, HIGH);
#endif
  }
}

inline void ST7789v_arduino::DC_LOW(void)
{
  _DCbit = false;
  if (_SPI9bit == false)
  {
#if defined(USE_FAST_IO)
    *dcport &= ~dcpinmask;
#else
    digitalWrite(_dc, LOW);
#endif
  }
}

Hope it helps others!
Thanks for this great job!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.