As the BT817 / BT818 are officially released now, let's talk about it. :-)
https://github.com/RudolphRiedel/FT800-FT813These are the new registers:
#define REG_UNDERRUN 0x0030260c
#define REG_AH_CYCLE_MAX 0x00302610
#define REG_PCLK_FREQ 0x00302614
#define REG_PCLK_2X 0x00302618
#define REG_ANIM_ACTIVE 0x0030902C
This are the new commands:
#define CMD_ANIMFRAMERAM 0xFFFFFF6D
#define CMD_ANIMSTARTRAM 0xFFFFFF6E
#define CMD_APILEVEL 0xFFFFFF63
#define CMD_CALIBRATESUB 0xFFFFFF60
#define CMD_CALLLIST 0xFFFFFF67
#define CMD_ENDLIST 0xFFFFFF69
#define CMD_FLASHPROGRAM 0xFFFFFF70
#define CMD_FONTCACHE 0xFFFFFF6B
#define CMD_FONTCACHEQUERY 0xFFFFFF6C
#define CMD_GETIMAGE 0xFFFFFF64
#define CMD_HSF 0xFFFFFF62
#define CMD_LINETIME 0xFFFFFF5E
#define CMD_NEWLIST 0xFFFFFF68
#define CMD_PCLKFREQ 0xFFFFFF6A
#define CMD_RETURN 0xFFFFFF66
#define CMD_RUNANIM 0xFFFFFF6F
#define CMD_TESTCARD 0xFFFFFF61
#define CMD_WAIT 0xFFFFFF65
The first thing to note for me was that the BT817 / BT818 do have a second PLL now for the pixel clock.
The easiest way to setup the second PLL is using CMD_PCLKFREQ.
I have this in my code-library now:
#if EVE_GEN > 3
uint32_t frequency;
#if defined (EVE_PCLK_FREQ)
frequency = EVE_cmd_pclkfreq(EVE_PCLK_FREQ, 0);
if(frequency == 0) /* this failed for some reason so we return with an error */
{
return 0;
}
#endif
#endif
EVE_memWrite8(REG_GPIO, 0x80); /* enable the DISP signal to the LCD panel */
EVE_memWrite8(REG_PCLK, EVE_PCLK); /* now start clocking data to the LCD panel */
Note, EVE_PCLK has to be defined to "1" to use PLL2.
With a define like this:
#define EVE_PCLK_FREQ (51000000L)
The resulting pixel-clock is 51MHz and the 1024x600 display I configured this for runs at 60Hz.:-)
What also got my attention is CMD_NEWLIST, CMD_ENDLIST, CMD_RETURN and CMD_CALLLIST.
Looks like we can expand display list now. :-)
And now I go on reading. :-)