SmartGPU2-LCD480X320Touch-CommandSet
SMART GPU 2 3.5” TOUCH
Command Set
Vizic Technologies ©2014 122
2.10.2 RTC Set/Get Time and Date –50hex – ‘P’ ascii
*This command is divided in 2 sub-commands, each one is explained next:
Commands (host)
X bytes
Set RTC Time and Date:
1.- 0x52 (hex), R (ascii). *RTC command.
2.- 0x50 (hex), P (ascii). (RTC Parameters)
3.- 0x53 (hex), S (ascii). (Set)
4.- Hours 0-23(dec).
5.- Minutes 0-59(dec).
6.- Seconds 0-59(dec).
7.- Day 1-31(dec).
8.- Month 1-12(dec).
9.- Year upper byte 1980-2107(dec).
10.- Year lower byte
Get RTC Time and Date:
1.- 0x52 (hex), R (ascii). *RTC command.
2.- 0x50 (hex), P (ascii). (RTC Parameters)
3.- 0x47 (hex), G (ascii). (Get)
Responses (device)
X bytes
Set RTC Time and Date:
1.- 0x4F (hex), O (ascii) – success ACK.
0x46 (hex), F (ascii) – fail NAK.
Get RTC Time and Date:
1.- Hours 0-23(dec).
2.- Minutes 0-59(dec).
3.- Seconds 0-59(dec).
4.- Day 1-31(dec).
5.- Month 1-12(dec).
6.- Year upper byte 980-2107(dec).
7.- Year lower byte
8.- 0x4F (hex), O (ascii) – success ACK.
0x46 (hex), F (ascii) – fail NAK.
Description
The RTC Set/Get Time and Date command
simply Sets or Gets the RTC current Time and
Date data.
Default RTC values are:
-Time “05:05:05”
-Date “19 March 2013”
Note that if a “RTC Set/Get Time and
Date” command is called when the RTC is
stopped or hasn’t been initialized, retrieved
data will be invalid and must be discarded.