1
TFTs / y-axis of image is offset : SSD1963 for NHD-5.0-800480TF-ATXL#-CTP -
« on: August 28, 2016, 03:31:12 PM »
When I set the pixel write window its always -6 pixels on y-axis or the 479 axis.
This means when set a window of WindowSet(x1,x2,y1,y2) --> WindowSet(0,799,0,479)
The top 6 pixel rows are not visible(because its off screen) while the lowest 6 pixel rows at the bottom are not written to.
This would imply that the reference point of the image array is incorrect but window size was declared properly, and the starting locations appear to be correct also.
Is there some command I'm overlooking in the controller manual that would properly align my window?
Edit:
After experimenting, I've simply expanded the window size from 479 to 491 and added a offset of +7 for the window to make everything line up with the display window.
There is no issue with the x-axis, I don't know why the y-axis has a issue.
This means when set a window of WindowSet(x1,x2,y1,y2) --> WindowSet(0,799,0,479)
Code: [Select]
void WindowSet(unsigned int s_x,unsigned int e_x,unsigned int s_y,unsigned int e_y)
{
TFT_Write_Command(0x2a); //SET column address
digitalWrite(RS, HIGH);
TFT_Write_Data((s_x)>>8); //SET start column address
TFT_Write_Data(s_x);
TFT_Write_Data((e_x)>>8); //SET end column address
TFT_Write_Data(e_x);
TFT_Write_Command(0x2b); //SET page address
digitalWrite(RS, HIGH);
TFT_Write_Data((s_y)>>8); //SET start page address
TFT_Write_Data(s_y);
TFT_Write_Data((e_y)>>8); //SET end page address
TFT_Write_Data(e_y);
}
The top 6 pixel rows are not visible(because its off screen) while the lowest 6 pixel rows at the bottom are not written to.
This would imply that the reference point of the image array is incorrect but window size was declared properly, and the starting locations appear to be correct also.
Is there some command I'm overlooking in the controller manual that would properly align my window?
Edit:
After experimenting, I've simply expanded the window size from 479 to 491 and added a offset of +7 for the window to make everything line up with the display window.
There is no issue with the x-axis, I don't know why the y-axis has a issue.