Smart module PIP keyboard to set real time clock
[Copy link]
Hello everyone, I haven't posted for a long time, today I bring some useful information. I hope everyone can discuss more and learn from each other.
Setting the real-time clock using TOPWAY Smart LCD (HMT050CC-C) PIP keyboard
The first step is to create a project
The second step is to create 2 pages and import 2 background images
① In the resource window, right-click Pages, select New Page , and create two pages , PG0000 and PG0001.
② In the Resource window, right-click Background Image and select Import Background
|
Step 3: Associate the page with the background image
① Click the PG0000 and PG0001 work areas respectively , and the page properties will be displayed on the right.
② In the properties, select the page background image for Background Image . For PG0000, select " DP0000 PIP _RTC display background", and for PG0001 , select " DP0001 PIP_KEY background"
Step 4: Import the font library
① Menu bar Tools-->Options-->Font Setting.
② Click No. 44 , right-click and select " Select "
③ Select " 64_NUM_SevenSegment(40x64)" font
④ Click " Select " to select, click " OK " to complete
Step 5: Create a custom keyboard and key properties
① Select PG0001 and click the touch key icon on the menu toolbar
② Create 13 touch key elements on the page
③ 1 In the On Press Down properties of the 3 buttons , select: Inverse Color
④ Select Call in the properties of the digital 0~9 buttons: ( VP:=Concatenate(VP,Value) The other 3 buttons are set as follows : “ Del ” button Call=vp:=DelLastchar(vp); “ESC” button Call=Esc; “OK” button Call=Enter
⑤ Set the corresponding values in Title/Value of the number 0~9 button properties ( as shown in the following table )
Step 6: Create a date clock element
① Select PG0000 and click the date clock element icon on the menu toolbar
② Drag a rectangular area in the page workspace to create three date clock elements on the page.
③ Font Color in Properties : 0x00FFFF
④ Select “ True ” for Transparent in the properties
⑤ In the properties, select font size 44 : 64_NUM_SevenSegment(40x64)
⑥ In the properties, select Date/Time Format : YYYY-MM-dd HH:mm:ss ,
YYYY-MM-dd and HH : mm:ss
Step 7: Establish the touch key and associate it withthe RTCkeyboard
① Select PG0000 and click the touch key icon in the menu toolbar
② Drag a rectangular area in the page workspace to create a touch key element on the page
③ Select Call in Properties : PIP RTC
④ In the properties, select On Press Down : Inverse Color
Step 8: Setthe PIP KeyBoardwindow property values
① In the PIP Title properties, select Font Color : 0xFF0000
② In the PIP Title property, select Transparent : True
③ In the PIP Title properties, select Font : 32_ASCII_SysBold
④ In the PIP WIN properties, the X/Y Pop Position are : 474 , 187
⑤ In the PIP WIN properties, select Pop Area of Page : PG0001
(Note: TPK is selected and the PIP window is displayed. " Ctrl+ left mouse button " can move the PIP window content )
Step 9: Compile and download
Step 10: Power-on display
① Disconnect the USB connection from the module
② Provide 5V power to the module
③ Power-on display
④Press the touch key on the screen, a keyboard pops up, enter the VP value, and click " OK "
|
⑥ Click "Confirm" to complete
|
This content is originally created by EEWORLD forum user Cijian Dare Not Be the First . If you want to reprint or use it for commercial purposes, you must obtain the author's consent and indicate the source
|