Page 9 of 14
Re: GLCD and Touchpad Library
Posted: Mon Jul 23, 2012 8:47 pm
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.
Re: GLCD and Touchpad Library
Posted: Tue Jul 24, 2012 10:24 am
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
Re: GLCD and Touchpad Library
Posted: Tue Jul 24, 2012 5:30 pm
by mobyfab
here's what i've done so far
http://pastebin.com/WmHzd4hHI will test/fix it tonight.
Re: GLCD and Touchpad Library
Posted: Tue Jul 24, 2012 5:36 pm
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!)
Re: GLCD and Touchpad Library
Posted: Tue Jul 24, 2012 5:39 pm
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.
Re: GLCD and Touchpad Library
Posted: Tue Jul 24, 2012 5:52 pm
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.
Re: GLCD and Touchpad Library
Posted: Tue Jul 24, 2012 7:56 pm
by Tectu
nice work mobyfab. I guess I can expect a pull request containing the two new driver files wich are fully tested?

~ Tectu
Re: GLCD and Touchpad Library
Posted: Tue Jul 24, 2012 9:57 pm
by mobyfab
Badger, did you do any modifications on the PCB for the FSMC to work?
Re: GLCD and Touchpad Library
Posted: Tue Jul 24, 2012 10:01 pm
by Badger
I removed 3 resistors that were on the control lines and the audio chip. I'm not sure if that was necessary..
Re: GLCD and Touchpad Library
Posted: Wed Jul 25, 2012 8:59 am
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