cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
lotustree
Visitor
Visitor
3,750 Views
Registered: ‎05-04-2008

Why my TFT-controller displays one pixel twice on screen?

I have a Virtex 5 ML505 Board with included Chrontel CH7301C Controller Chip for the DVI Interface. I'm building a system with EDK with a Microblaze and 2 MB of SRAM with the Base Ssystem Builder. Then I'm adding the IP-Core  XPS_TFT out of the IP-Catalog and i connect it to the PLB-Bus. Afterwards i made most of the tft-ports external and added the corresponding lines in the UCF-file to connect them to the FPGA-Pins. I used as well the clock generator to generate a 25 MHz clock and connected it to SYS_TFT_CLK since the dataseet mentioned a 25 Mhz clock for this module. Afterwards I'm configuring the IP Core and i write in the base-address of the SRAM because in the datasheet of the XPS_TFT is mentioned a Video memory.

After synthesising I Import  C-Code for drawing one 10*10 pixels square on screen. But it shows two square on screen!!

 

It looks like as the upper an the lower video  memory MB is the same, because if i only draw 1 pixel square  there are again 2.

It just like this showing in below.

 

----------------------------------------

 

-

 

 

 

-

 

-----------------------------------------

 

 

Now I'm trying to get this example work for nearly a week and I can't think of any other idea to try. So if you have experience with TFT-Controll or if you know how to get this done?

 

BTW, someone said that I need to enable Burst and cacheline of DDR controller in MPD file. So I add C_SPLB_SUPPORT_BURSTS = 1, but it doesn't work.

 

Please save me.........

 

Regards

Jing

 

0 Kudos
3 Replies
tonyzg
Visitor
Visitor
3,551 Views
Registered: ‎10-12-2010

Hello

 I have the same board and the same problem .I'm trying to show an image and on the screen appears 2 images, one from the upper corner of the display and the second begins on the middle .

 

Can someone help us ?

 

Thanks

0 Kudos
Anonymous
Not applicable
3,528 Views

Hi,

What is your image buffer size and colour depth?

 

This problem can be caused by not having enough memory to hold the entire image.  The duplicate pixels is caused by the external memory address range wrapping around.

 

Cheers

Lachlan.

0 Kudos
tonyzg
Visitor
Visitor
3,508 Views
Registered: ‎10-12-2010

Hi

 

My buffer size is 1920 and colour depth is 24 bit

i read the bmp image row by row with this code :

 unsigned char readBuffer[1920];

.

.

for (j=infoheader.height-1;j>=0;j--) {
numread = sysace_fread(readBuffer, 1, 1920, infile);
for (i=0;i<infoheader.width;i++) {
temp = ((((readBuffer[i*3+2] << 8) | readBuffer[(i*3)+1]) << 8) | readBuffer[(i*3)]);
writeaddr = baseaddr+(j*1024+i)*4;
XIo_Out32(writeaddr, temp);

 

the baseaddr  is XPAR_MPMC_0_MPMC_HIGHADDR-0x02FFFFFF and i tried baseaddr=XPAR_SRAM_MEMO_BASEADDR  but nothig happened

the baseaddress for the tft video memory is  XPAR_SRAM_MEMO_BASEADDR

 

to show the image i've used :

 

for(j=480-1;j>=0;j--)

for(i=0;i<640,i++)

pixel=baseaddr+(4096*j)+4*i;

color=XIo_In32(pixel);

xtft_SetPixel(&TftInstance,i,j,color);

 

the maximum size of the image is 640x480

 

Thank you very much

0 Kudos