vsync on NHD‐3.12‐25664UCW2
Hi,
I'm currently using an NHD-3.12-25664UCW2 with a Raspberry Pi, and it works as expected. However, I can't figure out how to perform dynamic rendering without screen tearing. I do double-buffered rendering by using the fact that the internal buffer is 480x256, so I use the 256x256 section and write to one of the 256x64 buffers while displaying the other, and then I switch them. So far, so good.
The problem is that I really don't know when to switch them. When programming on more computer-like systems, you would wait for the vertical sync to be at the end of the screen and then switch the buffer so that at the next frame, the hardware will read from the buffer. If I switch now, the hardware might be in the middle of a refresh, which causes "tearing" somewhere on the screen.
I have read that there are some clock registers in the hardware, but I have failed to figure out how to use them to solve the issue above, so any insights on how to solve this problem would be great.
Cheers!
Daniel
-
Hi Daniel,
Apologies for the late response. Unfortunately, the SSD1322 IC used in this display does not have vsync or frame sync signals that can be used to time the buffer swap. The best solution we can suggest is to use the 0xB3 command to adjust the clock divider/oscillator frequency to better align with your rendering. You may also use the frame frequency of the display to estimate a safe time to switch buffers. The frame frequency can be calculated using the formula on page 23 of the SSD1322 datasheet. Please let us know if this helps resolve your issue.0
Please sign in to leave a comment.
Comments
1 comment