BT81x in micropython for ESP32 #43
Replies: 14 comments 50 replies
-
I am entry level bad with Python. Do you have a Logic-Analyzer? First make sure the first steps are working correctly, like getting the bytes in the correct order and sending all of them.
The first one has to go, this also is ACTIVE.
This is seconds, this could be changed to time.sleep_ms(50).
And now my Python left me, maybe. Why is this not: while(0x7c != rd8(REG_ID): ?
And this could be changed to time.sleep_ms(1). And now I am curious what the SPI actually looks like up this point. |
Beta Was this translation helpful? Give feedback.
-
best Thank you very much for your prompt reply. I have modified the code and also send the result through the logic analyzer. Kind regards |
Beta Was this translation helpful? Give feedback.
-
best Now I see the problem. I am now getting further with REG_ID and REG_CPURESET. Can you please check if the WR32 , WR16 and WR8 are okay? Kind regards |
Beta Was this translation helpful? Give feedback.
-
This is starting to look good on the Logic Analyzer, my Python is still not good. :-) |
Beta Was this translation helpful? Give feedback.
-
I am a small step ahead now. Now I would like to do the getting started (see photo). But unfortunately, I get nothing on the screen. Maybe I am doing something wrong when shifting. I am not very good at shifting. Thank you for taking the time. Kind regards |
Beta Was this translation helpful? Give feedback.
-
is it also possible that you can send the program code? That way I can also look at the recordings of your logic analyzer and also your program code side by side. Maybe I will then see my mistake? Thanks again very much for your time Kind regards |
Beta Was this translation helpful? Give feedback.
-
It's not like Python and I are friends anytime soon, but I dug in a little deeper and have test-code for you. All this does is go thru basic initialization while assuming there is a BT81x as target with an external crystal. Well, the basic functionality is there but as much fun as this exercise provided, I rather stick with C. :-) |
Beta Was this translation helpful? Give feedback.
-
The initialisation seems to work now thanks to your code. But when I want to do the getting started (see attachment) as it says on the datasheet, I can't do it. Am I still doing the wrong thing in shifting or not? You are really helping me here. Thank you very much. Kind regards |
Beta Was this translation helpful? Give feedback.
-
best of luck I have now been able to set up my first test display. But when I switch off my display and switch it on again a little later, my panel display no longer works. If I turn off my display a little later. At the moment it goes off I see that the panel display goes on and off for a moment. What can be wrong? Kind regards |
Beta Was this translation helpful? Give feedback.
-
Hello I have now bought a new screen and have been working on my test function. The indicated place when I press on something and displays the coordinates works well. I would now like to try my first test function. On the screen should be a red dot with text. I have done it this way (see appendix line 250). But unfortunately nothing appears on the screen. Am I doing something wrong? Kind regards |
Beta Was this translation helpful? Give feedback.
-
Best I have set a current limiter on my lab power supply at 0.440A. But I forgot about the current peaks that cause my display to go on and off very quickly and therefore my display stopped working at some point. Is it possible to repair this or not? Kind regards |
Beta Was this translation helpful? Give feedback.
-
I'm almost done with what I would like to have. I am currently writing function from CMD_text, apparently something is still wrong with the private_string_write and I don't see direct the error. Thank you for taking the time to do this. Kind regards |
Beta Was this translation helpful? Give feedback.
-
I played with it some more: It has more of everything, more commands, display-list commands, some things are faster. The touch-tag is read but somehow touch is not working so far, maybe because I did not write calibration values. |
Beta Was this translation helpful? Give feedback.
-
Thank you very much. It works very well now. I make my own PCB for my display and test if it works. the communication works well, the panel display turns on nicely, I can also use the touch, but... I get no display (No text and a background color) on the screen. The code is excactly the same and when I use without my own PCB it works very well. With my PCB it doesn't do so well. I managed to put it on a yellow background once, but after that, no more. What could possibly go wrong? The code now works 99% of the time. Only the display sleep mode and display wake up does it sometimes weird. Sometimes when it wakes up I get a white image and sometimes it is not a white image and I get to see the menu nicely. Your code is really well done. I learned a lot about bit shifting there. Now I am starting to understand a little bit about the bit shifting of that Kind regards |
Beta Was this translation helpful? Give feedback.
-
hello
I am currently writing micropython for bt81x. i am using ESP32 as microcontroller. I got the code based from RudolphRiedel. I have already written a piece of code, but I cannot get past the REG_ID. Can you help me with this or do you have a micropython librarie?
Kind regards
Thompie2000
Riverdi_library.zip
Beta Was this translation helpful? Give feedback.
All reactions