Giter Club home page Giter Club logo

adafruit_ra8875's Introduction

Adafruit RA8875 Build StatusDocumentation

This is a library for our driver board 40-pin TFT Touch Displays - 800x480 Max

Pick one up today in the adafruit shop!

The RA8875 is a TFT driver for up to 800x480 dotclock'd displays It is tested to work with displays in the Adafruit shop. Other displays may need timing adjustments and are not guanteed to work.

Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit!

Written by Limor Fried/Ladyada for Adafruit Industries. BSD license, check license.txt for more information.

All text above must be included in any redistribution

adafruit_ra8875's People

Contributors

driverblock avatar eringerli avatar evaherrada avatar hoffmannjan avatar impulseadventure avatar ladyada avatar makermelissa avatar microbuilder avatar paintyourdragon avatar paulstoffregen avatar ronguest avatar rotaryprophet avatar sgonzalez avatar siddacious avatar tdicola avatar tyeth avatar

Stargazers

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

Watchers

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

adafruit_ra8875's Issues

800x480 PLLinit

It seems that there is a copy/paste error in PLLinit in the 800x480 section. From the application note pdf page 7, they are initializing RA8875_PLLC1(0x88) with 0x0B, which in the case of Adafruit_RA8875.cpp should be decimal 11 .

--- ./Adafruit_RA8875.cpp.orig 2015-07-22 13:45:57.885695858 -0600
+++ ./Adafruit_RA8875.cpp 2015-10-13 22:21:50.869268570 -0600
@@ -116,7 +116,7 @@ void Adafruit_RA8875::PLLinit(void) {
delay(1);
}
if (_size == RA8875_800x480) {

  • writeReg(RA8875_PLLC1, RA8875_PLLC1_PLLDIV1 + 10);
  • writeReg(RA8875_PLLC1, RA8875_PLLC1_PLLDIV1 + 11);
    delay(1);
    writeReg(RA8875_PLLC2, RA8875_PLLC2_DIV4);
    delay(1);

Doesn't compile for SAMD51 and probably SAMD21 because of eeprom

When a feature was merged in to allow calibration persistence, adding #include <EEPROM.h> caused compilation for the SAMD51 to stop working. I need to go through and add some IFDEFs around it so it still works for Arduino, but it turned off for other boards.

No license.txt

README.txt says:

 Written by Limor Fried/Ladyada for Adafruit Industries. BSD license, check license.txt for more information.

But there is no license.txt file in the repository.

switch graphics layer?

I want to do some real time drawing of values but the fill_triangle function, even with all points as variables so it's a straight look-up, is causing some flicker (I am not doing a screen fill every frame, just overwriting the stuff I need to). I know there's a way to do layer switching if I do 4-bit mode (I have the 5" touchscreen, and 800x400 can't fit into the chip's ram so I'm told). There's very few people trying to do this it seems, but I was just wondering if there's any library support for it?

EDIT: I mitigated most of the flicker by refining exactly what I needed to overwrite, but I would still appreciate support for layering

The ESP32 crashes

  • Arduino board: ESP32 DevKit
  • Arduino IDE version: 2.0.1
  • Arduino ESP Core: 2.0.5

Open the "buildtest" example and compile.
The result is a crash of the ESP32:

RA8875 start
ets Jun  8 2016 00:22:57

rst:0x8 (TG1WDT_SYS_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13864
load:0x40080400,len:3608
entry 0x400805f0

Add support to Adafruit_LvGL_Glue

This library does not inherit Adafruit_SPITFT so it cannot be used with LvGL Glue.
Please update the library for compatibility with Adafruit_LvGL_Glue.

Contributing -- LVGL & DMA SPI

I'm currently working on a project that makes use of the RA8875 controller and LVGL on an Arduino DUE (SAM3X8E).

It was mentioned in #39 by @makermelissa that it's possible to use this library for LVGL but it's pretty slow because of pixel drawing.
I ended up forking their example and refining it more by adding a new SPI transfer function for writing blocks instead of pixels, since the new LVGL makes it easier to bulk transfer their buffer. That improved performance but still isn't as fast as I'd like.

LVGL also provides an option for 2 screen buffers: the buffer is filled and then sent over SPI by a DMA controller while the other buffer is filled with new updates and the cycle repeats.

Bill Grieman's SdFs library already has a nice implementation of SPI over DMA for the Due and a few other chips and I'm working to adapt it into my fork of this library.

Currently I need to:

  • Adapt the different DMA drivers into the library
  • Add macros to manually enable DMA mode
  • Change the base library to use the new SPI driver implementation

Would you be interested in/willing to accept these changes in master or another branch if a pull request is made? I'd like to contribute back to the library, ideally.
If so, are there any contribution guidelines or things I should keep in mind while I'm working?

Thanks

Adafruit RA8875 sclk pin

I posted this on the Adafruit Forum and was referred here:

I have an Adafruit RA8875 (1590) and the 7.0" TFT screen (2353). I am connecting it to a Teensy 3.2. Following examples from the Adafruit libraries the hardware connections are:

// Library only supports hardware SPI at this time
// Connect SCLK to UNO Digital #13 (Hardware SPI clock)
// Connect MISO to UNO Digital #12 (Hardware SPI MISO)
// Connect MOSI to UNO Digital #11 (Hardware SPI MOSI)
#define RA8875_INT 3
#define RA8875_CS 10
#define RA8875_RESET 9

However the sketch I am going to write uses Pin #13 for a Arduino FreqCount sketch input. Is there anyway to change the SPI clock Pin? I have looked at the Adafruit RA8875 libraries and don't see any place to change the Pin.

I have used other RA8875 libraries that can have the sclk pin changed. Is that possible to add it to this library.
Thanks
Tim Hatch

Go through all outstanding Pull Requests

There's a bunch of good PRs out there that need to be pulled in. However, they range from 2-5 years old and some newer merge requests have already been merged in, so some the code changes are a little outdated and should probably be rebased.

@ladyada, how would you like me to approach these? Because of their age, I could go through each one and reimplement and test with the updated code just to make sure they work. Or should I request the original authors to update these? Thanks.

display.textEnlarge(1) mangles text in RA8875_800x480 mode

It appears that when the text enarge is set to 1, something happens to the text. Words get mangled.

Observe the view of the text in different states of textEnarge:

This seems to be fine. Everything gets rendered ok. There's some special symbols appearing in places of tabs because this is a JSON file that's been prettified but I assume that's alright as these symbols tend to be reused for special characters in graphics libraries
display.textEnlarge(0);
image

display.textEnlarge(1);
This is where things get flakey. At textEnlarge(1) the text seems to get mangled and it's never consistent too, I can reboot the esp32 and the characters that get mangled seem to change.
image

display.textEnlarge(2);
image

display.textEnlarge(3);
image

pushPixels Results in Blank Screen

  • Arduino board: HiLetgo ESP-WROOM-32 ESP32 + Adafruit RA8875 (1590) + Adafruit 7" TFT w/Touchscreen (2354)

  • Arduino IDE version (found in Arduino -> About Arduino menu): CLion 2021.3

  • List the steps to reproduce the problem below (if possible attach a sketch or
    copy the sketch code in too):

https://github.com/9ae8sdf76/dbuddy/blob/master/src/esp32dev.cpp#L58 - rename drawPixels to pushPixels.

I reached out on the forums, but have been overlooked/ignored. I also attempted to get y'alls attention via email, but was ignored there too. So, as a last-ditch effort, I'm reaching out here. I could really use some assistance. Thank you.

Enable use of Adafruit GFX fonts

The Adafruit_RA8875 library cannot utilize alternate fonts, such as those provided with the Adafruit_GFX library. This problem can be fixed by commenting out the two virtual size_t write() prototypes in Adafruit_RA88745.h.

Rather than requiring those wishing to use these fonts to make custom-modified libraries, how about making a compiler directive like USE_ADAFRUIT_GFX_FONTS ? The two instances of virtual size_t write() would then only be compiled if this directive is not defined.

This would be a simple change that would enhance usability of this library.

println does not work as expected.

println does not carriage return but rather prints garbage characters.

Sample code:

include <SPI.h>

include "Adafruit_GFX.h"

include "Adafruit_RA8875.h"

// Connect SCLK to UNO Digital #13 (Hardware SPI clock)
// Connect MISO to UNO Digital #12 (Hardware SPI MISO)
// Connect MOSI to UNO Digital #11 (Hardware SPI MOSI)

define RA8875_INT 3

define RA8875_CS 10

define RA8875_RESET 9

Adafruit_RA8875 tft = Adafruit_RA8875(RA8875_CS, RA8875_RESET);
uint16_t tx, ty;

void setup()
{
Serial.begin(9600);
Serial.println("RA8875 start");

/* Initialise the display using 'RA8875_480x272' or 'RA8875_800x480' */
if (!tft.begin(RA8875_800x480)) {
Serial.println("RA8875 Not Found!");
while (1);
}

tft.displayOn(true);
tft.GPIOX(true); // Enable TFT - display enable tied to GPIOX
tft.PWM1config(true, RA8875_PWM_CLK_DIV1024); // PWM output for backlight
tft.PWM1out(255);
tft.fillScreen(RA8875_BLACK);

tft.textMode();

tft.textSetCursor(10, 10);

tft.textColor(RA8875_WHITE, RA8875_BLACK);
tft.print("Testing Print, ");
tft.print("All your base are belongs to us");

tft.textSetCursor(10, 30);
tft.println("Testing Println");
tft.println("All your base are belongs to us");
}

void loop()
{
}

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.