kedei 3.5 inch spi tft lcd version 3 free sample

This is a modified version of the official PJRC ILI9341_t3 library (https://github.com/PaulStoffregen/ILI9341_t3) to work with KeDei Raspberry Pi displays.

And it is always a Work In Progress. Also using a lot of work from the the Raspberry Pi implementation: https://github.com/cnkz111/RaspberryPi_KeDei_35_lcd_v62

This library was created to allow extended use on the KeDei Raspberry Pi display and supports T3.5, t3.6 T4 and beyond. It also has support for other T3.x boards as well as TLC.

Your SPI communications on this board does not go directly to display but instead go to three shift registers. There are also two SPI Chip select pins, one labeled, which looks like it is for the Display and the other looks like it is for the touch controller. This is partially true.

However the SPI communications with the display are a lot different than any other I have seen. For example there are no reset pins, nor a Data/Command(DC) pin. Instead this information is encoded into the SPI data that you send to the display.

We figured it out, as the RPI startup code, did several strange SPI transfers at the beginning, which appeared like they were directed to the XPT2046 Touch controller.

Where R1 is connected to GND and R2 is connected to 3.3v. It turns out that some of the few boards we have, has R1 populated and some of them have R2 populated.

So if you send the byte E7 to the display with Touch CS asserted, it starts a AtoD conversion on that AUX pin, and transfer of two more zeros, will return you the AtoD value from AUX,

This library borrows some concepts and functionality from another ILI9341 library, https://github.com/KurtE/ILI9341_t3n. It also incorporates functionality from the TFT_ILI9341_ESP, https://github.com/Bodmer/TFT_ILI9341_ESP, for additional functions:

The teensy 3.6 and now 3.5 have a lot more memory than previous Teensy processors, so on these boards, I borrowed some ideas from the ILI9341_t3DMA library and added code to be able to use a logical Frame Buffer. To enable this I added a couple of API"s

To download. click the DOWNLOADS button in the top right corner, rename the uncompressed folder Adafruit_ILI9341. Check that the Adafruit_ILI9341 folder contains Adafruit_ILI9341.cpp and Adafruit_ILI9341.

Place the Adafruit_ILI9341 library folder your arduinosketchfolder/libraries/ folder. You may need to create the libraries subfolder if its your first library. Restart the IDE

kedei 3.5 inch spi tft lcd version 3 free sample

... height with supports. ...This bracket will accommodate the Kedei 3.5" HDMI LCD screen, using kapakahi"s screw posts. The button wells from kapakahi"s original Thing will also fit. ...

Remix Raspberry Pi Display Case http://www.thingiverse.com/thing:1229473 For the KeDei 3.5" SPI TFTLCD 480x320 version 1.1 2015/8/11 Print Settings Printer Brand: RepRap Printer: reprap prusa i3 marlin Rafts: Doesn"t Matter Supports: No Resolution:...

So I ordered the OSOYOO 3.5" TFT display from Amazon (also seen it for sale as a KeDei display which is what is actually printed on the OSOYOO I received from Amazon), and I wanted a simple case for it that would hold & display it nicely with all...

... stl orientation- screen.stl should be printed downwards. -So the supports go on top of the mounting screws. Screen has some freedom of movement on the back of the pi, just dab som hotglue to the edge of the kedei-pcb and have a good time! ...

I love the case made by 0110-M-P and I couldn"t find a good case for cheap 3.5 kedei LCD so I made a top for 0110-M-P base. I"m using this with my octoprint and touch UI.

My touchscreen (KeDei (ebay)) was a bit higher to fit the original case so I made the display-slot slightly taller for the case and cap. ...Works with the following Raspberry Pi Models:

A Gameboy Zero Helper for the Kedei 3,5 " Display Space for micro usb break out, usb and volume wheel the top adds more useable space into your build print solid and drill the holes by your self

Screen used is KeDei 3.5 inch LCD TFT 320x480 touch screen (sample link https://www.aliexpress.com/item/New-Original-3-5-Inch-LCD-TFT-Touch-Screen-Display-for-Raspberry-Pi-2-Raspberry-Pi/32851565266.html). ... You will need: - The screen (KeDei 3.5 inch...

I have the KEDEI 3.5" 128M SPI TFT screen, and had to modify it slightly: "extending the connector with wires", which gives the opportunity to add some more things like better power connection or i2c RTC. I made the case for the screen to cover the...

... On an ugly reprap display I also deliberately omitted, since I use octoprint touch (with a osoyoo / kedei 3.5 "HDMI touch TFT https://amzn.to/2IivrUA). ...

kedei 3.5 inch spi tft lcd version 3 free sample

I designed this case so I could have the TFT35 screen from a Raspberry Pi on the front of my Ratrig V-Core 3. ...It will probably fit other extrusions but it was designed to sit nicely on 3030 extrusion that the Ratrig has.

I designed this case so I could have the TFT35 screen from a Raspberry Pi on the front of my Ratrig V-Core 3. ...It will probably fit other extrusions but it was designed to sit nicely on 3030 extrusion that the Ratrig has. Print Settings Printer:...

3.5 inch TFT LCD touch screen waveshare. ...Arduino Shield.assembled in a bracket with M2x8 screws and M2-IUTB-inserts.Designed By Alon Rahamim from Trixel Engineering.

It also hold a 3.5 Inch TFT Screen. It is made of nine 3.25mm pieces that all connect with four - 3mm screws. Its very easy to print and assemble. Print each piece in any color you want and then just assemble in order 1 through...

This is a slightly tilted (and upright version included) holder for an Arduino mounted ILI9488 3.5" TFT display with touch and TF card reader. While not a complete enclosure, it looks a bit more elegant and is a bit more short-out-safe than having...

Since I switched to klipper and didn"t feel like figuring out the stock screen, I ended up using a Kuman 3.5" tft and a Pi3b+ for my klipper conversion.

Simplified model of a 3.5 inch LCD for Raspberry Pi. ...I used the usb connectors from this model: Raspberry Pi 3 Model B Reference Design Solidworks CAD Raspberry-Pi Raspberrypi Rpi

I had a challenge finding something at would work perfectly, so this is a remix of 3 different models. The lack side filament holder, the adafruit pi case and the improved top section.

Fit an [Adafruit 3.5" TFT LCD touchscreen](https://www.adafruit.com/product/2441) [Octopi rig](https://octoprint.org/) in the front panel of the [Prusa i3 Mk3](https://www.prusa3d.com/original-prusa-i3-mk3/), keeping it centered on the printer...

Lerdge 3.5 inch screen Features:Add all-inclusive steel frame for the touch screen, more stable.The motherboard adopts resistance to touch, man-machine interaction provides a variety of options.High-resolution of 480*320.Support high-speed hardware...

This is enclosure for [Mellow FLY TFT V1 3.5 inches](https://aliexpress.com/item/1005004091787313.html). ...The enclosure was designed for Ender 3 printer.

Pi TFT plus Console Case for 3.5 Inch Displays Some additions for using displays without mounting holes: The support frame to place between Display und PI to give the display a better foundation then the connector plug alone could give (fits tightly...

Screen used is KeDei 3.5 inch LCD TFT 320x480 touch screen (sample link https://www.aliexpress.com/item/New-Original-3-5-Inch-LCD-TFT-Touch-Screen-Display-for-Raspberry-Pi-2-Raspberry-Pi/32851565266.html). ... You will need: - The screen (KeDei 3.5 inch...

This is a case for Raspberry Pi 4 with 3.5 inch TFT/LCD Display. It is a tight fit and may require some wriggling to fit the PI in. ...This is a very simple and a sleek case.

ER-TFTM050-3 is 5 inch tft lcd module WVGA 800x480 display,serial,spi,i2c parallel interface,RA8875 controller,capacitive or resistive touch screen panel.Souce from EastRising/buydisplay.com

I designed this stand frame for my new 5 inch CTP screen. It"s this one: JLT Technologies JRP 5008 https://es.aliexpress.com/item/1005002280377732.html Use some M3 screws to hold it. I put some auto adhesive small rubber feet to prevent slipping....

I"ve designed this and use it for holding this screen: http://www.banggood.com/FPV-4_3-Inch-TFT-LCD-Monitor-Screen-For-RC-Models-p-940817.html on my Turnigy 9X remote.

Are are links to the hardware: * [kuman for Raspberry Pi 3B+ TFT LCD Display, 3.5 Inch 480x320 TFT Touch Screen Monitor for Raspberry Pi Model B A+ SPI Interface with Touch Pen SC06](https://amzn.to/33aILS4) * [CableCreation [2-Pack] 3.2 feet Right...

This is a slanted box for compact projects incorporating a 3.2" TFT display such as this one which can be found on Aliexpress and many other places for about $USD8: https://www.aliexpress.com/item/32960934541.html I typically use a daughter card...

The display support comes before the assembly on the RJ45 connection. As a touch screen, I use the Elegoo Display 3.5 "inch TFT LCD touch screen monitor 480x320 for Raspberry Pi.

kedei 3.5 inch spi tft lcd version 3 free sample

While googling for any info about lcd controller I came across this page: http://heikki.virekunnas.fi/2015/raspberry-pi-tft/, author managed to get from manufacturer patch file for kernel sources and tested it with 4.1.y - on which lcd worked. But still LCD replace HDMI, but I want to use this screen as additional for user interaction, while the bigger on HDMI as presentation monitor.

I have looked through files that he (author of page `heikki.virekunnas.fi`) published, and I came to conclusion that the patch do not changes standard ILI9341 driver but only replace default framebuffer and directs it to ili driver while cutting out hdmi, only single mention in patch file about ili9341 is adding it"s .ko file to $obj in makefile... wow I"m so smart

Since, fbtft has been merged with rpi kernel, so the fb drivers (including ili9341.c) was moved to fbtft_device driver (so the author of page can"t compile latest kernel with driver+patch).

So something about hardware, which I reverse engineered by the "hard way" - "grab multimeter and run through all LCD FPC pins and shift register pins"

Now I noticed there is "9486L" which can suggest that LCD screen is controlled by ILI9486L, I found this LCD on taobao too but I can"t contact seller.

I"m pretty sure about D/C (Pin 37 on LCD) and Reset (Pin 19 on LCD) pins by looking into driver code, but I can"t identify other signals (WR/RD/CS/etc...)

[ 0.000000] Linux version 3.18.9-v7 (lgh@lgh-ThinkPad-X200) (gcc version 4.7.1 20120402 (prerelease) (crosstool-NG 1.15.2) ) #7 SMP PREEMPT Sun Jun 28 09:33:18 CST 2015

[ 0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2709.boardrev=0xa01041 bcm2709.serial=0x2938b030 smsc95xx.macaddr=B8:27:EB:38:B0:30 bcm2708_fb.fbswap=1 bcm2709.disk_led_gpio=47 bcm2709.disk_led_active_low=0 sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait

[ 4.838806] input: MOSART Semi. Rapoo 2.4G Wireless Touch Desktop as /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:24AE:1000.0001/input/input1

[ 4.862704] hid-generic 0003:24AE:1000.0001: input,hidraw0: USB HID v1.10 Keyboard [MOSART Semi. Rapoo 2.4G Wireless Touch Desktop ] on usb-bcm2708_usb-1.3/input0

[ 4.902783] input: MOSART Semi. Rapoo 2.4G Wireless Touch Desktop as /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.1/0003:24AE:1000.0002/input/input2

[ 4.926400] hid-generic 0003:24AE:1000.0002: input,hiddev0,hidraw1: USB HID v1.10 Mouse [MOSART Semi. Rapoo 2.4G Wireless Touch Desktop ] on usb-bcm2708_usb-1.3/input1

- Controller is not ILI9341/ILI9325 - those are for smaller displays (320x240, etc...), I guess this might be ILI9486/9488 because they are for 480x320 displays. But when I compared init with DS it does not fit right so LCD can have a clone of ILI9486/9488 ...

- Module use only SPI interface and two CE signals (CE0 for touch controller, CE1 for LCD shift registers - compared to others lcd modules, in KeDei module this is swapped),

kedei 3.5 inch spi tft lcd version 3 free sample

3) pls try to install the image with raspbian and 3.5 driver and try it again: https://osoyoo.com/2016/05/26/osoyoo-lcd-touch-screen-for-raspberry-pi-installation-guide/

Hey Nikeron, is the used module really an ILI9325? Maybe we could then traceback the display connection and reverse-engineer it. From that point on when the schematics are released for everyone to build those displays themselfes, we could hack it then and create a free driver?

I downloaded RetroPie from https://retropie.org.uk/docs/First-Installation/ and have been trying to get my 3.5″ LCD to work. I downloaded the driver from http://kedei.net/raspberry/raspberry.html as described, but whenever I try and extract it with the “tar xzvf LCD_show_v6_1_3.tar.gz” around 50 lines are executed and then the Pi crashes. When I restart it, it goes into a kernel panic every time. I’ve reinstalled my OS multiple times. I cannot download the raspbian distro with the driver because I have been unable to install RetroPie on top of it and have been unable to display it on the LCD.

Do you mean you don’t want to install the LCD driver but just install OS? If so, this LCD can’t work, but you can search a 3.5 HDMI LCD in our store and it works with just OS for display function.

Hi, I got version 6.3 of the screen. I tried installing it on the latest Raspbian with latest drivers from kedei.net. But when the Raspberry starts booting, the screen only works for a few seconds before being frozen. ( Raspberry works, only screen is frozen ).

Ok, so, before I was using a Raspberry Pi Zero. Now I switched to my Raspberry Pi 3B and it works great. Any idea on why it won’t work on the Zero? The pinout is the same, is it possible that one of my pins isn’t good?

Buenas tardes, yo tengo instalado raspbian en la Raspberry Pi 3 y la pantalla, el modelo que me pone por detrás es XPT2046, siguiendo el tutorial consigo que funcione la pantalla táctil pero no está calibrada.

I had this happen initially. To resolve it I DISABLED SPI under raspi-config and then also set the bootup settings to be Desktop. I have a weird keyboard and the CTRL-ALT Fn keys didn’t work right, but normally CTRL-ALT-F1 or F7 change you from terminal to desktop virtual sessions in Linux.

Hi Smat, Please install the version 4.9 raspbian firstly, and then install the suitable version driver according to the isntruction. Please don’t update raspbian directly, as the driver can’t update for this

Hola buenas tengo un problema es que compre esta pantalla Raspberry PI 3 Modelo B 3.5 “pulgadas TFT Lcd con Pantalla Táctil de la interfaz SPI. 480*320 píxeles con lápiz táctil para PI 2

4).I copied the file >>>LCD_show_v6_1_3.tar.gz<<>/home/pi<>> RASPBIAN STRETCH WITH DESKTOP<<>tar xzvf LCD*.tar.gz<>cd LCD_show_v6_1_3<> ./LCD35_v <>R-pi display to HDMI<> cd LCD_show_v6_1_3 <> ./LCD_hdmi <>./LCD_dhmi<>HDMI to R-pi display<>R-pi display to HDMI<>HDMI to R-pi display<>>!! #I feel like I want to return my display now#.

https://www.aliexpress.com/item/Raspberry-PI-3-Model-B-3-5-inch-TFT-LCD-Display-with-Touch-Screen-by-SPI/32804087006.html?shortkey=iABj6neU&addresstype=600

4).I copied the file >>>LCD_show_v6_1_3.tar.gz<<>/home/pi<>> RASPBIAN STRETCH WITH DESKTOP<<>tar xzvf LCD*.tar.gz<>cd LCD_show_v6_1_3<> ./LCD35_v <>R-pi display to HDMI<> cd LCD_show_v6_1_3 <> ./LCD_hdmi <>./LCD_dhmi<>HDMI to R-pi display<>R-pi display to HDMI<>HDMI to R-pi display<>>!! #I feel like I want to return my display now#.

https://www.aliexpress.com/item/Raspberry-PI-3-Model-B-3-5-inch-TFT-LCD-Display-with-Touch-Screen-by-SPI/32804087006.html?shortkey=iABj6neU&addresstype=600

“ATTENTION” in the instructions they wrote >>./LCD_dhmi<>HDMI to R-pi display<<: it is just to reinstall the driver again, I need to execute the point 5) through the point 7) again.

https://www.aliexpress.com/item/Raspberry-PI-3-Model-B-3-5-inch-TFT-LCD-Display-with-Touch-Screen-by-SPI/32804087006.html?shortkey=iABj6neU&addresstype=600

https://www.aliexpress.com/item/Raspberry-PI-3-Model-B-3-5-inch-TFT-LCD-Display-with-Touch-Screen-by-SPI/32804087006.html?shortkey=iABj6neU&addresstype=600

Hello, I have been able to install the driver and play/switch between LCD & HDMI, now is there any way to turn off the white screed or turn off LCD when Im not using it? Thanks

The LCD doesn’t do anything else. Initially I had the Memory split set to 16MB – but this through up a memory error on the LCD. Setting it higher removes this error – but still nothing else.

kedei 3.5 inch spi tft lcd version 3 free sample

I have a KeDei 3.5 ich SPI TFT LCD Display. I attached to Raspberry Pi with Android Things Image. When I boot the RPi, nothing is shown, only displays a black screen. The display is getting powered up, and I can differentiate between it"s on and off state. But when I try remote display (followed steps from this post), I can see the display properly.

mBaseDisplayInfo=DisplayInfo{"Built-in Screen", uniqueId "local:0", app 640 x 480, real 640 x 480, largest app 640 x 480, smallest app 640 x 480,mode 1, defaultMode 1, modes [{id=1, width=640, height=480,fps=60.000004}], colorMode 0, supportedColorModes [0], hdrCapabilities android.view.Display$HdrCapabilities@1d6308, rotation 0, density 240 (0.0 x 0.0) dpi, layerStack 0, appVsyncOff 1000000, presDeadline 16666666, type BUILT_IN, state ON, FLAG_SECURE, FLAG_SUPPORTS_PROTECTED_BUFFERS, removeMode 0}

I tried latest Raspbian Image and dev preview 0.4.1 as mentioned here. Tried with HDMI config given in the same link. Nothing works except the rpi_35_v6.3_ubuntu_mate_15_kedei image from KeDei vendor.

kedei 3.5 inch spi tft lcd version 3 free sample

So I just purchased a KeDei 3.5" TFT Display (v6.3) for my Raspberry Pi 3, and I have found out that the display only works with premade Raspbian / Ubuntu / Kali images. This wouldn"t be a problem, but those modified images don"t seem to work with HDMI. What I want is to be able to use HDMI with my TV/Monitor, and when I take my Pi to go, I"d like to just be able to plug the display into the Pi. I installed the drivers on Raspbian Pixel, when booting up the Pi with the KeDei display after installing the drivers, it just froze on the console. I plugged in an HDMI monitor (while the display was still plugged in) and rebooted my Pi, and it went past the console and booted to the Desktop on the HDMI monitor, but not on the LCD Display.

kedei 3.5 inch spi tft lcd version 3 free sample

Note: Raspberry Pi OS Bullseye branch system, since dtoverlay=vc4-kms-v3d is loaded by default, it is invalid to modify the resolution in /boot/config.txt. If you need to modify the resolution, you need to change it to dtoverlay=vc4-fkms -v3d.

3. After reboot, touch will work normally under normal circumstances. But for different resistance screens, the accuracy of using the default calibration parameters may not be very suitable.

kedei 3.5 inch spi tft lcd version 3 free sample

...создаете себе красивый столик. в дополнение к столику идет декор.http://www.fermliving.com/webshop/shop/wire-baskets.aspx http://www.fermliving.com/webshop/shop/wire-baskets/wire-basket-top3.aspx http://www.fermliving.com/webshop/shop/all-products/winebottle-candleholder-5.aspx http://www.fermliving.com/webshop/shop/geometry-vase-1.aspx  в архиве max...

kedei 3.5 inch spi tft lcd version 3 free sample

Decided to play with the 74hc595 attached in the same way as U1 for that Kedei display and I attached a Logic Analyzer to some of the output pins. Labeling is based on: https://github.com/wdim0/esp8266_with_KeDei_lcd_module/blob/master/schema.jpg. In a zoomed view it looks like this:

Regarding the RPI display I found this that you might want to browse in your free time (haha): https://github.com/juj/fbcp-ili9341/issues/40 as well as this. Think this is one of those projects to do for curiosity rather than try and get implemented. Yes it is 3-wire but - T_CS and L_CS is interrelated can"d have one without the other.

I have this display, https://www.amazon.com/gp/product/B00SK6932C/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1, a 1.44in ST7735. Ran the graphics test and looks like the viewable area needs to be shifted to the right and down by a couple pixels like you mentioned. Also, I noticed when printing the large text it goes off the screen and will wrap - this is noticeable when you run the rotation.ino sketch.

@mjs513 - Thanks. I pushed up a slight change to for rotations 2/3 where if not offset... I tried to order one from Adafruit... But won"t ship to PMB, they suggested order from Digikey...

@defragster - Yep I ordered another one like that on Ebay(https://www.ebay.com/itm/153515689082).. That ships from LA so should get here in next week or so: Again these are ones without CS pin..

I actually opened debug_tt - I need to see that working again on T_3.x and on T4 through USB at least. I"m going to go back to minimal and ignore the extended stuff I thought could work on USB - as you got that working with custom prints.

Downloaded your updated lib and ran your test sketch with the "tft.initR(INITR_144GREENTAB_OFFSET);" and it worked perfect for my display (starts with 3,2 if I remember right, also used "tft.setRowColStart(3,2);" with just the initr_144greentab and that also worked.

Downloaded your updated lib and ran your test sketch with the "tft.initR(INITR_144GREENTAB_OFFSET);" and it worked perfect for my display (starts with 3,2 if I remember right, also used "tft.setRowColStart(3,2);" with just the initr_144greentab and that also worked.

I may redo some of these tab names and what they are... That is the INITR_144GREENTAB defined in the Adafruit library starts at 3,2... I probably update it a long time ago to what I have as my displays were all offset differently... So for my other displays, I should probably either:

Not sure if it also would make sense to add my simple test program to the library... If I did would probably remove some of the #define/#ifdef stuff for different boards and different SPI ports... But would add comments that if you specify SCK and MOSI that correspond to another SPI port it will use that port...

Mike I added your sendCommand... Actually only the one: void ST7735_t3::sendCommand(uint8_t commandByte, const uint8_t *dataBytes, uint8_t numDataBytes);

Think the display driver is the same but... You will need to implement 3-wire as well as toggling the Touch_CS pin as well to complete the transfer - that"s why I posted the code references.

And yep all you need is the one sendCommand, don"t really need the other one. I got my second 7735 display so I could check out if it fully works - also attached a photoresistor. Yes it worked across two displays - pretty cool actually. Having fun with it. Wish I could do a video to demonstrate but would see the T4 and can"t do that yet.

Will play soon with that display... May start off by maybe trying to set up an RPI that can at least initialize the display and capture the SPI transfers, to get an idea of what the actual communications are supposed to look like... .

It was interesting to see in some of the things you posted about using with ESP32, that they actually modified the display and added on another chip...

Back on ST7735/89_t3 code - I changed the defaults for the 144GREEN... tab to be compatible with the Adafruit display, as I verified that was what was up in MASTER...

That Adafruit UncannyEyes is pretty nifty - may make a permanent setup for it :) Really nice since you updated the library running at 24Mhz and tested at 48Mhz as well. Still with your updated SPI library as well.

Yeah, saw what the did for the ESP32 - didn"t even go further until a few of the solutions shown that you could do it software. May go back to that now that I got uncanny eyes working. Have to see what happens if I start toggling the touch cs in conjunction with the writing data.

D:\Users\Merli\Documents\Arduino\libraries\ST7735_ t3-T4_beta/ST7735_t3.h:141:8: note: candidate: void ST7735_t3::sendCommand(uint8_t, const uint8_t*, uint8_t)

D:\Users\Merli\Documents\Arduino\libraries\ST7735_ t3-T4_beta/ST7735_t3.h:142:8: note: candidate: void ST7735_t3::sendCommand(uint8_t, uint8_t*, uint8_t)

eye[e].display->sendCommand(ST7735_RAMWR, &nullp, 0); However doesn"t work correctly - part of the logo stays on the screen and instead of 1 big eye per screen I am see 2 eyes in this config - 1/2 eye, full eye, 1/2 eye.

- Right now I am trying to figure out why the UnCannyEyes sketch is wiping out my board... I was running it yesterday, but today when I build it and run it, it crashes... Then Windows gives me a message that there is not a valid USB device connected... Am hoping it was not my cleanup changes to the ST7735 code.... Or my Hardware connections to display. Verified not connection as I unplugged the processor from the breakout board (Paul"s). I edited the sketch to change Reset pin to 23 and the 2nd display to 14 (also tried 21), as these are in the RX/TX pins that Paul routed...

D:\arduino-1.8.9\arduino-builder -dump-prefs -logger=machine -hardware D:\arduino-1.8.9\hardware -hardware C:\Users\kurte\AppData\Local\Arduino15\packages -hardware C:\Users\kurte\Documents\Arduino\hardware -tools D:\arduino-1.8.9\tools-builder -tools D:\arduino-1.8.9\hardware\tools\avr -tools C:\Users\kurte\AppData\Local\Arduino15\packages -built-in-libraries D:\arduino-1.8.9\libraries -libraries C:\Users\kurte\Documents\Arduino\libraries -fqbn=teensy:avr:teensy4b2:usb=serial,opt=o2std,key s=en-us -ide-version=10809 -build-path C:\Users\kurte\AppData\Local\Temp\arduino_build_74 9147 -warnings=all -build-cache C:\Users\kurte\AppData\Local\Temp\arduino_cache_50 7931 -verbose C:\Users\kurte\Documents\Arduino\uncannyEyes\uncan nyEyes.ino

D:\arduino-1.8.9\arduino-builder -compile -logger=machine -hardware D:\arduino-1.8.9\hardware -hardware C:\Users\kurte\AppData\Local\Arduino15\packages -hardware C:\Users\kurte\Documents\Arduino\hardware -tools D:\arduino-1.8.9\tools-builder -tools D:\arduino-1.8.9\hardware\tools\avr -tools C:\Users\kurte\AppData\Local\Arduino15\packages -built-in-libraries D:\arduino-1.8.9\libraries -libraries C:\Users\kurte\Documents\Arduino\libraries -fqbn=teensy:avr:teensy4b2:usb=serial,opt=o2std,key s=en-us -ide-version=10809 -build-path C:\Users\kurte\AppData\Local\Temp\arduino_build_74 9147 -warnings=all -build-cache C:\Users\kurte\AppData\Local\Temp\arduino_cache_50 7931 -verbose C:\Users\kurte\Documents\Arduino\uncannyEyes\uncan nyEyes.ino

"D:\\arduino-1.8.9\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=147 -DARDUINO=10809 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\arduino-1.8.9\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\arduino-1.8.9\\hardware\\teensy\\avr\\libraries\\SPI" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_bu ild_749147\\sketch\\uncannyEyes.ino.cpp" -o nul

"D:\\arduino-1.8.9\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=147 -DARDUINO=10809 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\arduino-1.8.9\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\arduino-1.8.9\\hardware\\teensy\\avr\\libraries\\SPI" "-IC:\\Users\\kurte\\Documents\\Arduino\\libraries\\ Adafruit_GFX_Library" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_bu ild_749147\\sketch\\uncannyEyes.ino.cpp" -o nul

"D:\\arduino-1.8.9\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=147 -DARDUINO=10809 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\arduino-1.8.9\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\arduino-1.8.9\\hardware\\teensy\\avr\\libraries\\SPI" "-IC:\\Users\\kurte\\Documents\\Arduino\\libraries\\ Adafruit_GFX_Library" "-IC:\\Users\\kurte\\Documents\\Arduino\\libraries\\ ST7735_t3" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_bu ild_749147\\sketch\\uncannyEyes.ino.cpp" -o nul

"D:\\arduino-1.8.9\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=147 -DARDUINO=10809 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\arduino-1.8.9\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\arduino-1.8.9\\hardware\\teensy\\avr\\libraries\\SPI" "-IC:\\Users\\kurte\\Documents\\Arduino\\libraries\\ Adafruit_GFX_Library" "-IC:\\Users\\kurte\\Documents\\Arduino\\libraries\\ ST7735_t3" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_bu ild_749147\\sketch\\uncannyEyes.ino.cpp" -o "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_bu ild_749147\\preproc\\ctags_target_for_gcc_minus_e. cpp"

"D:\\arduino-1.8.9\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=147 -DARDUINO=10809 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_b uild_749147/pch" "-ID:\\arduino-1.8.9\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\arduino-1.8.9\\hardware\\teensy\\avr\\libraries\\SPI" "-IC:\\Users\\kurte\\Documents\\Arduino\\libraries\\ Adafruit_GFX_Library" "-IC:\\Users\\kurte\\Documents\\Arduino\\libraries\\ ST7735_t3" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_bu ild_749147\\sketch\\uncannyEyes.ino.cpp" -o "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_bu ild_749147\\sketch\\uncannyEyes.ino.cpp.o"

Using precompiled core: C:\Users\kurte\AppData\Local\Temp\arduino_cache_50 7931\core\core_teensy_avr_teensy4b2_usb_serial,opt _o2std,keys_en-us_44178ada4dfd24cbd2e3430cabf71fb5.a

"D:\\arduino-1.8.9\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-gcc" -O2 -Wl,--gc-sections,--relax "-TD:\\arduino-1.8.9\\hardware\\teensy\\avr\\cores\\teensy4/imxrt1062.ld" -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -o "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_bu ild_749147/uncannyEyes.ino.elf" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_bu ild_749147\\sketch\\uncannyEyes.ino.cpp.o" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_bu ild_749147\\libraries\\SPI\\SPI.cpp.o" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_bu ild_749147\\libraries\\Adafruit_GFX_Library\\Adafr uit_GFX.cpp.o" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_bu ild_749147\\libraries\\Adafruit_GFX_Library\\Adafr uit_SPITFT.cpp.o" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_bu ild_749147\\libraries\\Adafruit_GFX_Library\\glcdf ont.c.o" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_bu ild_749147\\libraries\\ST7735_t3\\ST7735_t3.cpp.o" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_bu ild_749147\\libraries\\ST7735_t3\\ST7789_t3.cpp.o" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_bu ild_749147/..\\arduino_cache_507931\\core\\core_teensy_avr_te ensy4b2_usb_serial,opt_o2std,keys_en-us_44178ada4dfd24cbd2e3430cabf71fb5.a" "-LC:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_b uild_749147" -larm_cortexM7lfsp_math -lm -lstdc++

Which version of UncannyEyes are you using - the one from Adafruit or the one that I posted. I had the same problem when I was initially running UncannyEyes from Adafruit. Made the changes that I posted and then the problem went away - think it may have been trying to get to an address the wasn"t available. I have seen that behavior before but not for a long time. Here is the version I am using:

Actually it is crashing on T3B2 (older one without jumper) - Tried on different one with jumper and it appears to run... At least I am getting debug info... So will move tests over to different board!

Actually it is crashing on T3B2 (older one without jumper) - Tried on different one with jumper and it appears to run... At least I am getting debug info... So will move tests over to different board!

Actually it is crashing on T3B2 (older one without jumper) - Tried on different one with jumper and it appears to run... At least I am getting debug info... So will move tests over to different board!

It seems @mjs513 was getting failures in - that is tough to trap - Serial4 can be online before setup() - but USB after. And if it is in the area of " //[B]printf("before C++ constructors\n"); " - using code with data and arrays or .begin setup - would be stuck too.

Probably something there worth investigating/understanding with mem segment copy or init causing a reset during startup()? I wonder if the same code has problems on T_3.6? Probably not given it may not repro on all T4"s?

I noted my T3B2 confusion too - and by "without" JUMPER is that the "white wire"? Without white wire - or Newer Rev #21 final PCB - it could be a Serial# UART power issue affecting boot.

Paul. Not sure if you saw post #3493 (https://forum.pjrc.com/threads/54711-Teensy-4-0-First-Beta-Test?p=209497&viewfull=1#post209497) where I caused fault using Eigen and it enters bootloader.

Sorry :o - I meant T4B2 (pre brownout fixed version) - Pretty sure it is not Serial brownout issue as I can reprogram things on it like blink, or graphictest... And it also faults even when not plugged into breakout board...

@KurtE - no displays but I put the 7X Serial# breakout ( 14 pins at 3+V ) on the T4B4 - both white wire Mod - and it showed no issues - as posted on T4 thread with the eyes sketch and it didn"t have any issue - so it doesn"t seem to be brownout related.

@defragster - Hard to know what caused these both to get into the state, that it would not run that specific program, but would load and run others. And then once I changed it significantly enough it would load again... My guess is it could be some screwy timing thingy or maybe some exact size write at some specific location or, maybe a voltage spike/brownout as maybe I was plugging in or unplugging one of the displays or...

@mjs513 and ... With that RPI display, as I mentioned, I think I will try to setup an RPI to be able to at least use this display... and then try to capture the signals in Logic Analyzer.

For the heck of it today, I hooked up that strange RPI TFT display to an RPI3, and then setup logic Analyzer to capture some of their initial SPI conversation.

Once installed you can load saved captures and scroll through the data, update some of the analyzers... Like look at the SPI for the touch screen init...

I am not sure yet how bad I screwed it up for running on the ST7735 displays... I tried to change it to remove including the main library header in main file, and have it such that you uncomment the one you wish to use in config.h... But with the hack I had to allow two displays to be initialized differently I moved the eye definitions down below the includes...

Been looking at the Logic Analyzer dump and can"t for the life of figure out what display controller its using. Doesn"t seem to match anything I"ve seen for this display - argh. First 8bytes should be controlling the first 595 chip and then next 16 bytes should be the data to be sent? Since its in groups of 4bytes is that equivalent to a 32bit transfer? Also seems to sending the last transfer continuously until the next change, for instance I saw about 20 transfers of 0x00,0x15,0x00,0x00 before the next packet sent.

I have not found any searches by the markings shown on his version on what the underlying screen is... It looks like it may have about 40 pins coming off of the display, which I don"t believe matches for example the one I have Eastrising which I think the actual display has like 50 pins coming off of it. Nor have it Tried to pick apart the one ILI9486 version for Arduino Mega shield to see what display it has and the pins coming off of it.

Note with the LA, you can click on the sort of wheel looking thing on the right of the SPI thing under analyzers, and you can click to export as text/CSV file, which can give you textual verison, which I have done... I then tried editing the file to combine the 4 lines associated with each output that had a 0x00 next line 0x11 and marked that as CMD and then likewise for 0x15 and marked as DAT

Yeah - the LA results are confusing - pretty much did the same as you except looking at the data on the screen and saw the same thing. The one thing I found that exactly matches the our display is here: https://github.com/juj/fbcp-ili9341/issues/40, but the initialization sequence seems to be different. Was just going to and follow that initialization sequence - but they seem to indicate its a MPI3501 which I can"t find any spec sheet on - others seem to think it may be a 9486 - oh well.

Reading some more on this thread: https://www.raspberrypi.org/forums/viewtopic.php?f=44&t=124961&start=200 . They reference a driver for our display that uses wiringPi: https://github.com/cnkz111/RaspberryPi_KeDei_35_lcd_v62, If you look at his LA shots looks similar to what you got.

I now have it at least crawling on T4... The problem was that tft.begin() was never called, and as such the stuff was never initialized like the _csport and _cspinmask

T_CS - Chip select for xpt2046, you need this in order to make display work! nasty �� manually yank this line(pull low) when finish sending data through SPI

@mjs513 - Hopefully your screen is not damaged so you can play :D I do see the Touch CS pin being manipulated after each write of 4 bytes... My guess is it is tied to the shift registers or the like and tells it to update the output bits... I am seeing in the earlier capture about 90 nano-seconds, so the Delay 1us is still maybe 10 times more than it needs.

Unfortunately it sort of neuters the usage of the FIFO otherwise it might make sense to try using 32 bit writes from FIFO, but that would only gain sligthly...

@mjs513 - Hopefully your screen is not damaged so you can play :D I do see the Touch CS pin being manipulated after each write of 4 bytes... My guess is it is tied to the shift registers or the like and tells it to update the output bits... I am seeing in the earlier capture about 90 nano-seconds, so the Delay 1us is still maybe 10 times more than it needs.

Unfortunately it sort of neuters the usage of the FIFO otherwise it might make sense to try using 32 bit writes from FIFO, but that would only gain sligthly...

Guess what - T4 has a delayNanoseconds(uint32_t) function in the core - thought I remembered seeing this way back when: https://forum.pjrc.com/threads/54711-Teensy-4-0-First-Beta-Test?p=194243&viewfull=1#post194243 - surprised I was able to find it:) - page 10 of 145 pages of the other thread

This sounds like the classic issue with multiple SPI devices on the same buss. You might try setting all of the CS pins HIGH before trying to init either device.

Still doing identical to the version you posted... But removing all of the queue stuff except some simple stuff. Got me to now about 180ms to draw screen.

Cool change - so changing to 32bit transfers actually helped. That"s quite a speed performance you got over what we started with the RPI display. I know, its now become a challenge. Really can"t do much with my display out of action until I get a new one. Can"t wait to give it a try.

I actually bought 2 of them to test with. I can get one working but not both but I am not sure if its a power problem or not. If I have both connected the screens just remain black. If I remove one from the breadboard the other will work. Have to do some more testing. Was a bit distracted today - putting together my new breakout board with the tri-state buffer. It works like a charm on the ILI9488, even works with the ILI9341 which doesn"t have a problem with being tri-stated. Had to stop for the day - was not doing well - think I need to start watching what I am eating.

For the RPI display relatively easy hook - MOSI=11, L_CS=10, T_CS=6, CLK=13, Gnd=Ground, 5v=5v. No addition Libs necessary. Everything self contained.

SSD1351 - Only have one... So not much help yet on debugging two. I did add in a sendCommand into the other library, which I did not test out, but hopefully gives us hooks. Hopefully the owner will pull the changes in.

Progress on the SSD1351 UncannyEyes. Turns out the primary problem with running 2 LED displays is power. I added a external supply to supply power to the OLEDs and got the eyes to display. But still have some problems.

@mjs513 - Which library are you using? Adafruit? Or the one I have been modifying? I assume the later... Remember there are pieces of the uncannyEyes that I had #ifdefed out in the case of this library as did not find easy way to do so in the other library...

That is there was #if for the tft displays, then #elif for the adafruit OLED library and then #else for this one... As I did not see any good define to check directly for other library... it uses #pragma ONCE or the like...

Oops - sorry I misunderstood thought you were referring to the other sendcommands - sorry my bad. Will have to download the latest copy. Only problem now I am running into is that that after a few frames the animation stops sometimes. Resetting it a couple of times seems to get it working fully. Will try with your latest version

This sounds like the classic issue with multiple SPI devices on the same buss. You might try setting all of the CS pins HIGH before trying to init either device.

It may be that the display in use does not tri-state the LCD MISO pin and that prevents the TOUCH controller reading of the needed data from the shared MISO pin. The common one we got has that issue, either the LCD MISO must not be connected {my solution} - or it must have a tri-state buffer installed and controlled by the use of a CS pin - @mjs513 resolved that - on this thread?

For a given SPI bus - unless there is some magic here I missed - common signals go to a common pin. Placing the device wire to another inactive pin would be he same as not having it connected.

For a given SPI bus - unless there is some magic here I missed - common signals go to a common pin. Placing the device wire to another inactive pin would be he same as not having it connected.

Not sure what sketch I used except an example? Anyone with the right touchscreen XPT2046_Touchscreen driver [ili9341?] if none in that library was right for mine. Even if the display didn"t work - that returned valid info with touch on the SPI.

Lots of things not done (and/or maybe not doable...). Like I have not tackled rotation yet, nor DMA output Asynch... Not sure how doable that is as you need to change CS and TFT CS for each grouping of 3 or 4 bytes...

Lots of things not done (and/or maybe not doable...). Like I have not tackled rotation yet, nor DMA output Asynch... Not sure how doable that is as you need to change CS and TFT CS for each grouping of 3 or 4 bytes...

My Kedei displayed arrived today, same one as yours: https://www.ebay.com/itm/New-3-5-inch-TFT-LCD-320-480-Touch-Screen-Display-Module-for-Raspberry-Pi-3-B/263427102486?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2060353.m2749.l2649, it says version 6.3 on the back - hooked it up to the 3 T4b2s that I have and no dice nothing gets displayed with any of the sketches including your latest library. Have no idea why. Can"t have miss connected 3 times but then again you never know.

@mjs513 - Your LA dump looks screwy especially on the CS pins. As for wiring, I redid mine again today on T4 (my own breakout) this time with pins 10, 9

My first attempt to fix this was to play with the output of the MADCTL register 0x36, At least for the ili9351 and ili9488 one bit of this is supposed to control if RGB or BGR... At least that is how I read it?

Gave up the RPI display - cant get a damn thing displaying on it. Even tried it on the T3.6. Even tried using pin 9 for CS. I also reinstalled Arduino IDE 1.8.9 and the latest teensyduino from post #3 I think it was. No luck with that either - do you hook up miso to anything? I have no idea why it won"t work and my LA trace is so screwy. I did download the latest SPI with writeRect incorporated. Maybe try again later.

@mjs513 - Totally understand giving up on that display! I would post picture of setup, but... Out of curiosity you might try running one of the simple apps like the frame buffer test program posted above, and hook up your LA, but without display, and see if the SPI conversation is still screwed up (that is state of CS pins...)

@mjs513 - bummer on display not displaying. I felt that when I could not get proper connects on breakout. The rPi KeDei here did hook up with a 6" M<>F Dupont cable to bare T4 M_pins into 9488 F_headers:

Tried power to 3.3V and no go - needs 5V, LED is very bright and as noted seems washed out, not enough contrast from TFT colorizing/blocking with BLACK being light gray.

@mjs513 - ST7735 - Maybe upload a copy of your exact one that is still causing USB issues.. I might even put in my actual Adafruit display to try it.

You will need the latest core, Kurt"s modified Adafruit_GFX library and latest SPI with the writeRect PR (still open). The uncannyeye sketch is in post #353.

from post >>uncannyEyes0.Zip (https://forum.pjrc.com/threads/55735-ILI9488_t3-Support-for-the-ILI9488-on-T3-x-and-beyond?p=210168&viewfull=1#post210168)

NOT NEEDED :: from post >>debug_tt.zip (https://forum.pjrc.com/threads/55735-ILI9488_t3-Support-for-the-ILI9488-on-T3-x-and-beyond?p=209654&viewfull=1#post209654)

NOTE: Once it compiles to upload a failed repro build - to get back to working SerMon USB seems to take a SECOND Button push to get working SerMon back from USB. The SPI LED will blink - but USB stays corrupted until a second Button Push upload.

NOTE: It is not because the HardFault_HandlerC() is truncated - the copy in debug_tt is a full copy - and instead of the minimal copy below I did another FULL copy of the current version from CORES and the repro is the same. The problem seems to be in the linking or code placement in memory - even though in these cases the T4 is never faulting - so the code is never called or executed.

Edit: I am seeing two kinds of fail - the obvious one I removed debut_tt and made the config.h change - T4 not running - no SPI LED and this on SerMon:

Back when debug_tt was first noted as having an impact it seemed the only thing it added was alternate code resource for the CORES "weak" FaultHandler - my testing seems to indicate that as adding that locally to the unCannyEyes sketch was the same as including the debug_tt. Both a nearly empty version - or a FULL copy of the PJRC version.

There is something very odd here - but not just for mjs513 this time. Typing this I just thought I should pack up my BUILD dir for working and failing - the issue might be something that shows in the leftover build files. Wil go Add those to that post.

Back when debug_tt was first noted as having an impact it seemed the only thing it added was alternate code resource for the CORES "weak" FaultHandler - my testing seems to indicate that as adding that locally to the unCannyEyes sketch was the same as including the debug_tt. Both a nearly empty version - or a FULL copy of the PJRC version.

There is something very odd here - but not just for mjs513 this time. Typing this I just thought I should pack up my BUILD dir for working and failing - the issue might be something that shows in the leftover build files. Wil go Add those to that post.

I now have it so it builds and crawls on Teensy LC... it uses SPI.transfer and SPI.transfer16 to do the work. Might be able to more on it, but it aint worth it!

Ready to do 3d graphics on the T4 and adding to the libs: http://crawlingrobotfortress.blogspot.com/2015/12/, Better 3D graphics on the Arduino: avoiding flickering and tearing or how about ray tracing: https://hackaday.com/2014/11/25/ray-tracing-on-an-arduino/

@Frank B - haven"t done 3d graphics since my college days and that was on Apollo computers, IBM360 and PDP11"s and of course TRS80 - yes I am old :) So with the T4 going to have some fun. Found a very simple Ray Tracing example with the usual test case of sphere"s that runs pretty much out of the box and takes about a sec to run using a ILI9341 using @KurtE ILI9341_t3n library:

Freaky … I turned it off to hit the uncannyEyes again on another T4 - then this T4 back on - the color bar NOW matches p#381 pic of MJS513 - including two greens in middle though FAR RIGHT (before last I see as WHITE) Dark Gray looks darker - though my leftmost YELLOW is more washed out.

Playing around with the simple kedei sketch in post #386 the colors are still off so I put in a wait for input loop so I can try to match the colors to screen. I got this, it looks like the bits need to be flipped when being sent. The colors with a c next to it I think make it colors maybe @defragster can check:

@mjs513 @defragster - Interesting. I am wondering if maybe the MADCTL values are incorrect for your display. This is the thing that controls things like change directions of bits and the like.

And was getting strange results when I tried to define your version of CL something like (~(CL(r, g, b))) or (CL(r,g,b)^0xffff) probably what the compiler did with it. Now I did it with variables, not sure if I just did it with constants yet... will try that next... But got different results if I stored the CL first into variable and then did the not operation or xor...

That is as mentioned before I do have an Logic analyzer capture of a startup on RPI... I have also had the LA output a CSV file of the SPI transfers. That starts off like:

I took another look at the data. First thing is I wondered if maybe looking at the wrong edge of the clock in the capture, so I changed it. (Go to SPI Analyzer click on the thing choose settings).

I am as bad as you. I did some massaging of the txt file and added a column for lcd_cmd and lcd_dat, a lot of duplicates ( I did in it excel using if statement). Tell me what you think:

The nerd that I am I tried to make it work without a lot of manual conversion. If do the delay etc and then do a mass copy and past of all 201K lines work load into the T4 - out of memory. To make it work you have to take all those dup lines and make them for loops I tried but just to get through 11K lines is took forever - don"t know if there is a shorter way.

Didn"t even look their - was busy checking the conversions. Any loaded it up with the correction and it ran but my colors are still off - screen is white raspberry is like an orange and leafs are a light pink. They are in the upper right corner of the display. Look like the screen colors are the same before we did the negate of the colors. Not sure what else you want to do with the lib you created.

Will be interesting to hear what your new display does. If it is still screwed up color wise, then one of the next things I would probably do with one of these display with different colors is to, try running it on an RPI with their Raspian image with the driver already installed. I did this with my display to verify it would output something. It came up with the complete Raspberry PI(linux) desktop on the display.

a) reconnect it to teensy and see if this (or one of the other sketches) now shows the correct colors. Which might imply that the KeDei driver somehow updated the display

Ok. What image did you use and how do you install it - or point me in the right direction - I do have a raspberry pi 3 sitting around I can test it on.

Also another possibly interesting thing involved with this startup sequence is there is the SPI stuff talking to what we think is only the touch display. There is a conversation that happens before we actually then do the init sequence which those other CSV files showed...

So reloaded my saved away logic output, and setup another SPI filter looking at the TouchCS as the CS pin. Had to also change defaults on idle cs high or low, and trailing edge...

Then dumped out the startup sequence to file. I then mucked with it with sublime text, to change the 4 8 bit transfers per logical transfer into one 32 bit transfer:

It could very well be. I got my third display and tested it on T4 - Ran the graphics test sketch and nothing - screen remained white. So I ran the kedei startup sketch and it displayed the 4 berries although colors still wrong but it was a lot clearer. Then I put it in the Pi and colors were correct and got a black background. There was one thing I did just since I noticed they had Touch on CS and LCD on the pin next to it. I swapped TS and CS pins without changing them in the sketch and it still worked...….

Also another possibly interesting thing involved with this startup sequence is there is the SPI stuff talking to what we think is only the touch display. There is a conversation that happens before we actually then do the init sequence which those other CSV files showed...

So reloaded my saved away logic output, and setup another SPI filter looking at the TouchCS as the CS pin. Had to also change defaults on idle cs high or low, and trailing edge...

Then dumped out the startup sequence to file. I then mucked with it with sublime text, to change the 4 8 bit transfers per logical transfer into one 32 bit transfer:

Since I don"t have the raw data what you would have to do is to lcd_cmd(MOSI) and LCD_DAT(MISO)? or do I have it backwards - please teach me master yoda :)

Hi @mjs513 - The raw data of the last posting, came from the RPI Logic Analyzer save file that I sent you awhile ago in a zip file... It is all in the very beginning of the data.

a) I know on our current boards the SPI transactions, with the Touch CS being asserted with SPI, I know works with the XPT2046 chip on the display as we have a working version of touchpaint that uses this. Which is interesting as it does not go with these 4 byte outputs per command request.

Sorry - been distracted playing with this crazy display. Nothing seems to work to get it to right without negating the colors. I edited the kedei_simple sketch to pull in the startup from the other other sketch so been using that to play with. I did try mode3 and mode1 - no luck. Heres the sketch I was using - similar to what you just posted KurtE:

I think I mentioned that the new display wouldn"t work at all with the existing lib - screen stayed white. I changed the startup sequence to match what we have in the startup3 sketch, sans raspberries. So it works now but text is messed up - haven"t fixed that. Now I am tired - use rgb or bgr for color scheme in the .h file. Here is my modifications if you all want to test :)

Anyhow - one thing I see is a couple of the colors BLEED flicker running the vertical bars - in both versions … about a quarter inch of streaky bleed - about a half dozen of the bar sets - others are crisp and clean. Not ALL combo"s but some half on the my left edge of middle bar bleeding left across to the leftmost bar.

"T:\\Ard186t4b2\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=147 -DARDUINO=10809 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IT:\\TEMP\\arduino_build_647594/pch" "-IT:\\Ard186t4b2\\hardware\\teensy\\avr\\cores\\tee nsy4" "-IT:\\tCode\\libraries\\SPI" "T:\\TEMP\\arduino_build_647594\\sketch\\KeDei_star tup.ino.cpp" -o "T:\\TEMP\\arduino_build_647594\\sketch\\KeDei_star tup.ino.cpp.o"

T:\tCode\libraries\KeDeiRPI35_t3\examples\KeDei_st artup\KeDei_startup.ino:142:6: note: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without

As for the @KurtE"s latest startup sketch you should see 3 berries - yep - sort of green and top reddish/purplish on the bottom. I have two displays - both act a bit differently but the new startup seems to work on both now.

What I am seeing now is one display everything seems to work fine for graphicstest then on the other display its a mirror of the other - argh. I am using mode3 and mode1

That is for example the lcd_dat commands between about the range 290 and 8630 and likewise 8641-16647 are just screen data, i.e. a 2 byte version of screen data. so I would replace these groups of outputs, into a couple of: const uint16_t screen1[] = {

Start conversion - Channel 6 - Always powered on ... And I think 6 is whatever is connected to the AUX input to the chip... So wondering what they have may have connected?

Note: The values are now consistent from that touch request... What I noticed is I looked at the XPT2046 library and it was doing SPI at 2mhz, I was trying up to 30mhz... I then looked again at the captured SPI data and they were doing 8mhz.

Try.adding tft.setRotation (0).. Working from phone now, in bed about to crash. We may to add that to the begin function. Will te SD this tomorrow.

Try.adding tft.setRotation (0).. Working from phone now, in bed about to crash. We may to add that to the begin function. Will te SD this tomorrow.

- also noticed when I pick up the KeDei to manipulate touch - my finger hits the tft voltage regulator on the back - it is right at too hot to touch comfortably for very long. The LED backlight is VERY/too bright.

- also noticed when I pick up the KeDei to manipulate touch - my finger hits the tft voltage regulator on the back - it is right at too hot to touch comfortably for very long. The LED backlight is VERY/too bright.

The rotation array in the .cpp does that mapping for you - so don"t worry about it - just tried it on my display and once I remembered to change the mapping it worked fine. (see https://forum.pjrc.com/threads/55735-ILI9488_t3-Support-for-the-ILI9488-on-T3-x-and-beyond?p=210613&viewfull=1#post210613)

I #if 0 - the init code at the start that tried to talk to the XPT2046 and ask for that special value, as we do it later correctly. The earlier code had too fast of a SPI speed to work, and we did not look at the values anyway.

Went back to playing with ST7735 UncannyEyes sketch - really hard to debug a sketch when it just crashes. Any started taking out code and putting it back in and see what crashed on the T4. Think I isolated it down to this piece of code:

Got latest Github KeDei from KurtE. Ran TouchPaint - all looks good. Only thing is Maybe the pressure detection on touch - seem to get weird liftoff dots?

Same driver code indeed works - but wondering if the return values across the larger resistive layer have something unique - or maybe try it on a T_3.6 that runs a bit slower?

Also need to check on the SPI speed - when I pushed it higher beyond a point on ili9341 it got flakey. - is it still using the 2M in the XPT_Touch code?

Also a big diff in sample speed touched or not - bright pin_13_LED? I suppose the touch "bounce" timer is only reset on valid touch - not on a polled read with no touch?

With the Teensy 3.2-3.6, I mostly saw that it was the SSD1306 (OLED screens) that were problematical with higher SPI bus speeds. I don"t recall having to slow down the SPI bus for the ST7735, but it maybe at the faster Teensy 4 speeds you do.

I did try to change the SPI clock down to 12Mhz but still exhibited the same behavior. Even tried at lower CPU clocks with no luck. However, playing around a little more I got it working by adding a single print statement to the eye movement loop, and fixed the whole issue:

I did try to change the SPI clock down to 12Mhz but still exhibited the same behavior. Even tried at lower CPU clocks with no luck. However, playing around a little more I got it working by adding a single print statement to the eye movement loop, and fixed the whole issue

When I had neopixels and the prop shield hooked up together with uncanny eyes, I found I needed to add a small delay between switching pins 11/13 between SPI mode and normal pin mode or else the first neopixel LED would stick.

When I had neopixels and the prop shield hooked up together with uncanny eyes, I found I needed to add a small delay between switching pins 11/13 between SPI mode and normal pin mode or else the first neopixel LED would stick.

@KurtE and others - for now I am done with trying to figure out whats going on with uncannyeyes with the ST7735"s going to try SSD1351"s next. The fix may be above my pay grade :)

Yeah - was thinking about modifying my display breakout board to accommodate the Pi header but didn"t get there yet. Not really familiar with the Pi pinouts but for pwm - saw there are 3 PWM pins not sure which those would go to but there are several open pins that you could put a couple analog on as well as other serial?

Hardware: Some of these boards appear to probably have tristate on the MISO pin and some don"t, i.e. they don"t work well with other SPI devices. Which I believe includes the aliexpress. Some may have it. And of course some of them have different touch screen options.... So different libraries and the like would need to be used depending...

Software(https://github.com/mjs513/ILI9488_t3): I believe was working pretty well. It has most everything of my ILI9341_t3n, including frame buffer, Asynchronous updates, ... with some caveats.

a) There is no way (that I know of) to use 16 bit colors with these displays in SPI mode. So we map colors from 16 bits to 18 bits, when we do graphic operations. So while on ILI9341 when we output a color: it is 16 bits tha