sipeed / Longan_GD32VF_examples

example project for Longan Nano (GD32VF)
Apache License 2.0
85 stars 36 forks source link

Issue with LCD Output #6

Open dwestbury opened 3 years ago

dwestbury commented 3 years ago

I'm able to upload the code successfully, but the video appears split on my screen? I've tried several LCD screens, they all have the same problem?

https://youtu.be/9k1GHhkrCzw

tuupola commented 3 years ago

Your video is set to private.

dwestbury commented 3 years ago

@tuupola Thanks. I had intended to set the video to unlisted. You should be able to see it using the link above now.

It looks like I may actually have two issues: 1) the LCD colors are inverted and 2) The screen is split horizontally, about midway down.

I'm guessing that the gd32v_lcd code is initializing my screen incorrectly? Perhaps I have a slightly different model than the one typically used? Although my LCD looks identical to the standard and it's clearly pin compatible.

The Lcd_init function in src\lcd.c doesn't appear to take any arguments or input parameters, so I'm not sure how to fix the issue.

Thanks and appreciate the willingness to take a look.

Cheers

thinhx2 commented 3 years ago

i have same problem with you

tuupola commented 3 years ago

Sorry I had totally forgotten this.

To me it looks like there are two problems. Skewed image suggests there is off by one error somewhere. I had a similar problem with my driver. The line of noise on top and left edges is because LCD_Address_Set() in the example does not handle offsets. Sometimes 0,0 in GRAM is not 0,0 in the actual display. It can be fixed by adding fixed offsets to x and y coordinates.

If you are using Nuclei SDK you could also try testing the Longan Nano with some old school demo effects.

tuupola commented 3 years ago

Actually now I see they do handle the offsets. They just probably should be 25 and 0 for your board.

thinhx2 commented 3 years ago

Trên thực tế, bây giờ tôi thấy họ xử lý các khoản bù đắp . Chúng có lẽ chỉ nên là 25 và 0 cho bảng của bạn.

Thank mate, no more display split problem, but color inverted still exitsm i swapped and it work fine, not enough

thinhx2 commented 3 years ago

https://user-images.githubusercontent.com/16272934/112166094-eb095980-8c21-11eb-8fae-8d382fb4526a.mp4