GLCD and Touchpad Library

Locked
mobyfab
Posts: 484
Joined: Sat Nov 19, 2011 6:47 pm
Has thanked: 21 times
Been thanked: 31 times

Re: GLCD and Touchpad Library

Post by mobyfab »

Nice !

I will make the modifications for the SSD1963 and post the results as soons as it is working.

Should be only minor edits, as the FSMC config is identical.
User avatar
Tectu
Posts: 1225
Joined: Thu May 10, 2012 9:50 am

Re: GLCD and Touchpad Library

Post by Tectu »

Updates:

- Badger's console is now about 100 times faster, since lcdDrawRect() got replaced with the propper lcdFillArea().

- If you use lcdDrawRect() with parameter 'filled', it won't draw pixel by pixel using lcdDrawPixel() anymore, it uses lcdFillArea(),

- lcdDrawLine() is now much faster too, when you draw a vertical or horizontal line. it uses lcdFillArea() with one pixel thickness here.


~ Tectu
mobyfab
Posts: 484
Joined: Sat Nov 19, 2011 6:47 pm
Has thanked: 21 times
Been thanked: 31 times

Re: GLCD and Touchpad Library

Post by mobyfab »

here's what i've done so far

http://pastebin.com/WmHzd4hH

I will test/fix it tonight.
Last edited by mobyfab on Tue Jul 24, 2012 5:38 pm, edited 1 time in total.
User avatar
Badger
Posts: 346
Joined: Mon Apr 18, 2011 6:07 pm

Re: GLCD and Touchpad Library

Post by Badger »

Nice progress.

A good way to check if you have implemented the different orientations correctly is to print some text at 0,0 in all orientations. The text print will use writeStream functions, for these to work in each orientation it is important to get the lcd driver set correctly (on S6D1121 and SSD1289 you have to position the cursor, set the window and set the read order, probably your driver is very similar!)
mobyfab
Posts: 484
Joined: Sat Nov 19, 2011 6:47 pm
Has thanked: 21 times
Been thanked: 31 times

Re: GLCD and Touchpad Library

Post by mobyfab »

Actually I planned to try displaying squares in different colors for each orientation, starting for 0, 0 as you said :)

On the SSD1963 there is no cursor, but an area ranging from 1x1px to the whole screen.
User avatar
Badger
Posts: 346
Joined: Mon Apr 18, 2011 6:07 pm

Re: GLCD and Touchpad Library

Post by Badger »

showing squares wont check the write order is correct; if you print some text you can easily see if you messed something up!

see the attached image, it should give you some hints for each mode.

If inverted landscape does not work, try the setting to the left of it in the picture.

There might be more work required to set inverted mode. On SSD1289 and S6D1121 I had to change 'shift direction of gate driver'. I couldn't find a similar option for your driver! if text is backwards then try option 4 for inverted.
Attachments
lcd.gif
lcd.gif (42.59 KiB) Viewed 5754 times
User avatar
Tectu
Posts: 1225
Joined: Thu May 10, 2012 9:50 am

Re: GLCD and Touchpad Library

Post by Tectu »

nice work mobyfab. I guess I can expect a pull request containing the two new driver files wich are fully tested? :D


~ Tectu
mobyfab
Posts: 484
Joined: Sat Nov 19, 2011 6:47 pm
Has thanked: 21 times
Been thanked: 31 times

Re: GLCD and Touchpad Library

Post by mobyfab »

Badger, did you do any modifications on the PCB for the FSMC to work?
User avatar
Badger
Posts: 346
Joined: Mon Apr 18, 2011 6:07 pm

Re: GLCD and Touchpad Library

Post by Badger »

I removed 3 resistors that were on the control lines and the audio chip. I'm not sure if that was necessary..
mobyfab
Posts: 484
Joined: Sat Nov 19, 2011 6:47 pm
Has thanked: 21 times
Been thanked: 31 times

Re: GLCD and Touchpad Library

Post by mobyfab »

Only D2 and D3 are doing something on my board...

I guess I need to dig into board.h, maybe the pin mode has to be set to push pull.
I will check my logic analyser wiring as well. (I got the same)

Also I removed the USB current sensing resistor on PD5.
I guess I will have to remove those other resistors like you did.

did you connect it this way? http://www.element14.com/community/groups/development-tools/blog/2012/05/26/stm32f4-discovery-hy32d-tft-lcd
Locked