|
|
View previous topic :: View next topic |
Author |
Message |
Ttelmah
Joined: 11 Mar 2010 Posts: 19591
|
|
Posted: Tue Sep 01, 2020 6:46 am |
|
|
OK. Sounds as if you have the low level stuff working well. The most complex
thing then is getting your head round how the 'display list' management
has to work. Basically for every drawing, you have the begin' a
CoProList, by sending the addressforWr, followed by a CMD_DLSTART.
Then for every command that is sent, you have to keep track of the
offset this adds. (so increment by 4 after the CMD_DLSTART). You then
follow with the drawing commands you want (set colours, select fonts, draw
text and lines. Then you have to send the 'DISPLAY' command, followed
by writing the offset to the display. Then the swap command to have this
be swapped into the execution buffer.
The display does not show anything till this sequence is correctly completed. |
|
|
handixx
Joined: 01 Jul 2010 Posts: 12
|
|
Posted: Tue Sep 01, 2020 6:47 am |
|
|
yes I was thinking about that so now I power by a converter of 3A That I found in my mess ><.
Still have nothing.. how I can know if my display settings are goods ? when I am looking my datasheet I have a big range bettewen the min an max...
https://www.distec.de/fileadmin/pdf/produkte/TFT-Displays/Disea/ZW-T050QWH-03P_Datasheet.pdf
If I understood good that code should provide a red screen isn't it ?:
Code: |
lcdWidth = 800; // Active width of LCD display
lcdHeight = 480; // Active height of LCD display
lcdHcycle = 840; // Total number of clocks per line
lcdHoffset = 20; // Start of active line
lcdHsync0 = 8; // Start of horizontal sync pulse
lcdHsync1 = 4; // End of horizontal sync pulse
lcdVcycle = 504; // Total number of lines per screen
lcdVoffset = 20; // Start of active screen
lcdVsync0 = 8; // Start of vertical sync pulse
lcdVsync1 = 4; // End of vertical sync pulse
lcdPclk = 2; // Pixel Clock
lcdSwizzle = 0; // Define RGB output pins
lcdPclkpol = 1; // Define active edge of PCLK
EVE_MemWrite16(REG_HCYCLE, lcdHcycle);
EVE_MemWrite16(REG_HOFFSET, lcdHoffset);
EVE_MemWrite16(REG_HSYNC0, lcdHsync0);
EVE_MemWrite16(REG_HSYNC1, lcdHsync1);
EVE_MemWrite16(REG_VSIZE, lcdHeight);
EVE_MemWrite16(REG_VCYCLE, lcdVcycle);
EVE_MemWrite16(REG_VOFFSET, lcdVoffset);
EVE_MemWrite16(REG_VSYNC0, lcdVsync0);
EVE_MemWrite16(REG_VSYNC1, lcdVsync1);
EVE_MemWrite8(REG_SWIZZLE, lcdSwizzle);
EVE_MemWrite8(REG_PCLK_POL, lcdPclkpol);
EVE_MemWrite16(REG_HSIZE, lcdWidth);
EVE_MemWrite16(REG_VSIZE, lcdHeight);
EVE_MemWrite32(ramDisplayList, 0x02000000); // Clear Color RGB sets the colour to clear screen to black
EVE_MemWrite32(ramDisplayList,CLEAR_COLOR_RGB (255,0,0));
ramDisplayList += 4; // point to next location
EVE_MemWrite32(ramDisplayList, CLEAR(1,1,1)); // Clear 00100110 -------- -------- -----CST (C/S/T define which parameters to clear)
ramDisplayList += 4; // point to next location
EVE_MemWrite32(ramDisplayList, DISPLAY()); // DISPLAY command 00000000 00000000 00000000 00000000 (end of display list)
EVE_MemWrite8(REG_DLSWAP, DLSWAP_FRAME); // Swap display list to make the edited one activeamDisplayList = RAM_DL; // start of Display List
//
delay_us(50);
EVE_MemWrite8(REG_PCLK, lcdPclk);
|
|
|
|
handixx
Joined: 01 Jul 2010 Posts: 12
|
|
Posted: Tue Sep 01, 2020 9:25 am |
|
|
I have my red dot and TEXT !!
My problem came from the GPIO addressing. I made like the example (send 0xffff) and i don't know why my low voltage of spi wasn't 0v. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9271 Location: Greensville,Ontario
|
|
Posted: Tue Sep 01, 2020 10:14 am |
|
|
progress, even small steps is GOOD, gives you a fighting chance to get 'Hello World' onto the screen....
if zero isn't zero, check for bad or questionable 'grounds'.
Jay |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|