Hi all!
I have a device that I develop, set in the TFT controller RA8875.
All functions and commands work fine.
But! I can not read from the memory. I do so:
short GetPixel (short x, short y)
{
short RGB;
- Adr_TFT_Command = 0x40; Graph mode
*Adr_TFT_Command = 0x4a;
*Adr_TFT_Data = x;
*Adr_TFT_Command = 0x4b;
*Adr_TFT_Data = x >> 8;
*Adr_TFT_Command = 0x4c;
*Adr_TFT_Data = y;
*Adr_TFT_Command = 0x4d;
*Adr_TFT_Data = y >> 8;
*Adr_TFT_Command = 0x02;
RGB = * Adr_TFT_Data; Dummy read
RGB = * Adr_TFT_Data;
return (RGB);
}
The function always returns 0!
What am i doing wrong? Help me please!
Hi all! I have a device that I develop, set in the TFT controller RA8875. All functions and commands work fine. But! I can not read from the memory. I do so:
short GetPixel (short x, short y) { short RGB;
*Adr_TFT_Command = 0x4a; *Adr_TFT_Data = x; *Adr_TFT_Command = 0x4b; *Adr_TFT_Data = x >> 8;
*Adr_TFT_Command = 0x4c; *Adr_TFT_Data = y; *Adr_TFT_Command = 0x4d; *Adr_TFT_Data = y >> 8;
*Adr_TFT_Command = 0x02; RGB = * Adr_TFT_Data; Dummy read RGB = * Adr_TFT_Data; return (RGB); }
The function always returns 0! What am i doing wrong? Help me please!