Replies: 8 comments 1 reply
-
|
@tdhoward When you get a backlight but nothing else, it's almost always a wrong pin or state (such as While creating the board_config.py for the T-Display-S3 Pro, I saw conflicting information about the interface for the touch controller. The webpage shows the touch controller as SPI, but the schematic shows it as I2C. I trust the schematic more, so that's what I put in the board_config.py. The trouble is, the I2C pins from the schematic are GPIO5 and GPIO6. The webpage shows LCD_CS as GPIO6, but the schematic shows LCD_CS as "MTLK", without a GPIO number. The LCD_CS / MTLK pin on the schematic is between GPIO38 and GPIO40, and MTCK (with a C, not an L) on a google search shows it as GPIO39, so that's what I put in the board_config. I'd try setting cs=6 in the board_config and see what happens. You may have to comment out all of the touchscreen setup in board_config since it is also referencing GPIO6.
I80 is faster, but, with the bus drivers written in MicroPython, they aren't significantly different. When the drivers are written in C, the I80 is noticeably faster. I wrote some C drivers, mostly modified from russhughes work, back in December, but they no longer work with the project as it is. I'm focusing on the Python code now, and will go back to them later, probably after the first of the year. I'm focused on using stock MicroPython and CircuitPython for now. |
Beta Was this translation helpful? Give feedback.
-
|
@bdbarnett I saw that you had changed the SPI frequency from 60MHz to 40MHz to match the TFT_eSPI configuration. I didn't notice any problems at 60MHz, but who knows, maybe it becomes glitchy? I'm guessing either would work fine for speed, since that's not likely the limiting factor for getting the data across. I've now tried this config with tiny_toasters and alien, and both are working. The drawing is fairly slow, though. Do you know of any way to do profiling in MicroPython to figure out where the bottlenecks are? I'd be happy to help out with that, if possible. The S3-Pro doesn't have a parallel bus, just the SPI bus, so it's never going to be blazing fast. But it seems like there would be room for improvements. Also, I'm curious what I can do to get some scrolling going. It seems like scrolling uses a special set of LCD commands, unless I'm reading it wrong. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @tdhoward. I had changed the baudrate to 40Mhz while trying to help you get a display. When you submitted the PR, my recent change overrode that line in your PR. I have changed it back to 60MHz, added No, I don't know how to profile in MicroPython. I'm a middle-aged IT guy with an electronics degree. I code for fun, so there's a lot I don't know about programming. Here are some bottlenecks that come to mind:
The moral of the story: Disable byte swapping and use a DisplayBuffer when you can, but be sure to keep track of the dirty area so you can .blit_rect(dirty). You asked about scrolling. That's going to take some changes to busdisplay.BusDisplay to make it work for boards where either colstart or rowstart is not 0. That is to say, when the GRAM and the display aren't the same dimensions. Give me this weekend to work on it and I'll start a new thread about scrolling Sunday or Monday. In the meantime, will you please test out on-the-fly screen rotations, such as in the binfont tests above as well as russhughes's rotations.py? By the way, I know I get long winded with my answers. My intention is to at some point turn these informational posts into documentation, so I'm taking the time to try to clarify each topic as much as possible. You may get a little more information than you were asking for. Please bear with me. |
Beta Was this translation helpful? Give feedback.
-
|
@bdbarnett Okay, I did some testing with the ST7796 (T-Display-S3 Pro), and here's what I found:
|
Beta Was this translation helpful? Give feedback.
-
|
@bdbarnett I now have a working T-Display-S3 Pro device, with a CST226 touch driver that seems to be working beautifully. I tried scroll_touch_test.py, and it works really nicely. I made a few PRs for bugfixes and adding this touch driver. I might take a look at the non-rotating binfont_simpletest3.py this weekend, but for now I'm feeling pretty happy with how this is all working. We can likely close this discussion thread unless you have any info you want to add to it. |
Beta Was this translation helpful? Give feedback.
-
|
@tdhoward Great work! Thanks for contributing it to the project. It sounds like the "double scrolling" caused by implementing colstart and rowstart in both fill_rect and blit_rect was the problem. I'm glad you found it. I'm glad you found scroll_touch_test.py. I'm going to start another thread discussing scrolling now. I meant to do it sooner. |
Beta Was this translation helpful? Give feedback.
-
|
@tdhoward The reason binfont_simpletest3 isn't rotating is because I have not implemented the To implement rotations in DisplayBuffer, the object would need to be re-inited with a new buffer that is the correct shape. Whether to copy the current buffer to the new, rotated buffer, is optional. Copying it would give the same results as rotating a BusDisplay object, but isn't necessarily required. Since DisplayBuffer is a subclass of FrameBuffer, I think rotating would require creating a whole new object, not just the underlying memoryview buffer. If you can think of a better way to do it, please let me know. I'm fine with leaving rotations out of DisplayBuffer, for now at least. |
Beta Was this translation helpful? Give feedback.
-
|
@bdbarnett That makes sense to me. The only reason I could think of for rotation would be if someone wanted to place two pieces of text, one horizontal and one vertical. But that could probably be accomplished using other means. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @bdbarnett , thanks for your help with getting started on the board_config.py file for the T-Display-S3 Pro. I have a ton of questions, so I apologize in advance! I'm trying to get framebuf_simpletest to run on it, using "mpremote mount ."
Display
The display doesn't show anything, but you can tell that the display backlight comes on. That's encouraging, I think. I have a datasheet for the st7796 driver chip, so I'll take a look at that. Any recommended next steps?
I was looking at the schematics, and noticed that the S3-Pro uses the SPI bus (which you put in the board_config) instead of the i80 bus, like the S3. Just out of curiosity, which of these buses are faster?
Touch driver
The touch chip for the S3-Pro is the CST226SE, not the CST8xx. I'm working on getting a driver going for this, based on the CST8xx code and the info here.
Beta Was this translation helpful? Give feedback.
All reactions