Digital clock display, users can customize the display mode, the TGUS screen has RTC function, it can automatically display the clock, through the 'RTC settings' touch control to calibrate. The displayed time data is saved in the 0X20-0X26 address of the control register, the user can read it by the 0x80 command .

Location: The control displays area.
'X', 'Y' is the upper-left corner coordinate of the touch area.
'W', 'H' is the width and height of the touch area, and the unit is a pixel point.
Name: Default RTC Display, can be reset.
DescibePointer: Fixed to 0xFFFF.
Color: Character color, 16-bit color, RGB565 format.
WordStock: Font location, 0=Default use the system 1 font.
XLatticeNum: font x direction lattice, calculate according to the font lattice divided by 2.
TimeFormat: Encoded string, default “Y-M-D H:Q:S W” it also be customizable, no more than 16 characters..
RTC encoded table
Description | encoding | display format |
Year | Y | 2000-2099 |
Month | M | 01-12 |
Day | D | 01-31 |
Hours | H | 00-23 |
Minute | Q | 00-59 |
Second | S | 00-59 |
Week | W | SUN MON TUE WED THU FRI SAT |
For example: Suppose the current time is August 03, 2017 One o'clock , Thursday.
If the date format is M-D W H:Q, it will display as 2017-08-03 1:00:00.
If the date format is M-D W H:Q ,it will display as 08-03 THU 1:00.
Write RTC at serial port :
5A A5 0A 80 1F 5A 21 05 20 00 10 13 10
Y- M- D -H -Q -S -W
(“week” write “00”,system will calculate the week and display automatically)