How to create the menu using the highlight effect

advertisement
How to create the menu using the highlight effect
In this tutorial, we will show you how to create the menu using the highlight effect on the
Y Series modules CU24063-Y1A. The menu using the highlight effect will look like the
image below:
Step 1 - Initialization
Send the following codes to the Y Series module CU24063-Y1A:
1
//Initialized display
2
1Bh 40h
3
//Turn off the cursor
4
14h
5
//Increase the screen brightness to 200%
6
1Fh 58h 08h
7
//Reduce the character brightness to 29% of the screen brightness
8
1Fh 28h 67h 50h 03h 00h 00h
Noritake Co., Inc.
Phone: (847) 439 – 9020
www.noritake-elec.com
Page 1 of 6
E-M-0026-00
Codes breakdown
Line #2
1Bh 40h
1
Line #4
14h
2
Line #6
1Fh 58h
3
Line #8
08h
4
1Fh 28h 67h 50h
5
03h
6
00h 00h
7
1.
2.
3.
4.
Set the display to default settings.
Turns off cursor.
Set the screen brightness.
Parameter for the screen brightness.
08h: 200%
Default value is 04h: 100%.
5. Set the character brightness.
6. Parameter for the character brightness.
03h: 29% of the screen brightness.
Default value is 08h: 100%.
7. Reserved
Step 2 - Display the menu content
We will display the menu content.
Noritake Co., Inc.
Phone: (847) 439 – 9020
www.noritake-elec.com
Page 2 of 6
E-M-0026-00
Exception of moving the cursor, all codes used below to create the menu are ASCII-based.
Send the following codes to the Y Series module CU24063-Y1A:
09
//Set cursor to x=7, y=0
10
1Fh 24h 07h 00h 00h 00h
11
//MAIN MENU
12
4Dh 41h 49h 4Eh 20h 20h 4Dh 45h 4Eh 55h
13
//Line feed + Carriage return
14
0Ah 0Dh
15
//CHANNELS
16
43h 48h 41h 4Eh 4Eh 45h 4Ch 53h
17
//Set cursor to x=16, y=1
18
1Fh 24h 0Fh 00h 01h 00h
19
//SWITCHES
20
53h 57h 49h 54h 43h 48h 45h 53h 20h
21
//AMPLITUDE
22
41h 4Dh 50h 4Ch 49h 54h 55h 44h 45h
23
//Set cursor to x=16, y=2
24
1Fh 24h 0Fh 00h 02h 00h
25
//FREQUENCY
26
46h 52h 45h 51h 55h 45h 4Eh 43h 59h
27
//PRESSURE
28
50h 52h 45h 53h 53h 55h 52h 45h
29
//Set cursor to x=16, y=3
30
1Fh 24h 0Fh 00h 03h 00h
31
//SIGNALS
32
53h 49h 47h 4Eh 41h 4Ch 53h
33
//Line feed + Carriage return
34
0Ah 0Dh
35
//PUMPS
36
50h 55h 4Dh 50h 53h
37
//Set cursor to x=16, y=4
38
1Fh 24h 0Fh 00h 04h 00h
39
//FLOW
40
46h 4Ch 4Fh 57h
41
//Line feed + Carriage return
Noritake Co., Inc.
Phone: (847) 439 – 9020
www.noritake-elec.com
Page 3 of 6
E-M-0026-00
42
0Ah 0Dh
43
//OPTIONS
44
4Fh 50h 54h 49h 4Fh 4Eh 53h
45
//Set cursor to x=16, y=5
46
1Fh 24h 0Fh 00h 05h 00h
47
//EXIT
48
45h 58h 49h 54h
Codes breakdown
Line #10
1.
2.
3.
4.
5.
1Fh 24h
1
07h
2
00h
3
00h
4
00h
5
Set cursor position from the parameter 2 and 4.
Sets the horizontal character position.
00h: required.
Sets the vertical character position.
00h: required.
Noritake Co., Inc.
Phone: (847) 439 – 9020
www.noritake-elec.com
Page 4 of 6
E-M-0026-00
Step 3 - Add the highlight effect
We will now add the highlight effect to the word "FREQUENCY".
Send the following codes to the Y Series module CU24063-Y1A:
49
//Set cursor to x=16, y=2
50
1Fh 24h 0Fh 00h 02h 00h
51
//Change the character brightness to 100% of the screen brightness
52
1Fh 28h 67h 50h 08h 00h 00h
53
//FREQUENCY
54
46h 52h 45h 51h 55h 45h 4Eh 43h 59h
Codes breakdown
08h
2
00h 00h
3
Line #52
1Fh 28h 67h 50h
1
Line #54
46h 52h 45h 51h 55h 45h 4Eh 43h 59h
4
1. Set the character brightness.
2. Parameter for the character brightness.
08h: 100% of the screen brightness
3. Reserved
4. ASCII-based codes for "FREQUENCY".
Noritake Co., Inc.
Phone: (847) 439 – 9020
www.noritake-elec.com
Page 5 of 6
E-M-0026-00
Step 4 – Move the highlighted area
In this example we will remove the highlight from the word "FREQUENCY" and highlight
the word "AMPLITUDE".
Send the following codes to the Y Series module CU24063-Y1A:
55
//Set cursor to x=16, y=2
56
1Fh 24h 0Fh 00h 02h 00h
57
//Change the character brightness to 29% of the screen brightness
58
1Fh 28h 67h 50h 03h 00h 00h
59
//FREQUENCY
60
46h 52h 45h 51h 55h 45h 4Eh 43h 59h
61
//Set cursor to x=0, y=2
62
1Fh 24h 00h 00h 02h 00h
63
//Change the character brightness to 100% of the screen brightness
64
1Fh 28h 67h 50h 08h 00h 00h
65
//AMPLITUDE
66
41h 4Dh 50h 4Ch 49h 54h 55h 44h 45h
This tutorial is based on "Initialize Display", "Cursor set", "Brightness (screen)", and
"Brightness (character)" in the specification.
Download the Y Series spec ►
Noritake Co., Inc.
Phone: (847) 439 – 9020
www.noritake-elec.com
Page 6 of 6
E-M-0026-00
Download