
DOCUMENT NUMBER :E-M-0001-00
C++ Sample Code Y-Series
10/18 E2
−
5008
−
00
4
Sample Command Sets
4.1 Displaying
Characters
4.2 Blinking
Characters
Fig. 4-1
The VFD module contains three font sizes: a 1×1 regular
font size (5×8 pixel), a 1×2 magnified font size (5×16 pixel)
and a 2×2 magnified font size (10×16 pixel). A character is
displayed at the current cursor position, and the position
is set by using ‘Cursor set’ command. The cursor position
is incremented after each character is displayed. Refer to
your specific module specification “Display Area-End of
Line Behavior”. The following command set displays
characters shown in Fig. 4-1.
The VFD module features an individual matrix (character)
blinking function. The following command set displays
characters shown in Fig. 4-2.
Fig. 4-2
void displaying_characters( )
{
const int command_set [60] = {
0x31, 0x78, 0x31,
//Character Code
0x1F, 0x28, 0x67, 0x40, 0x01, 0x02, //Character Size
0x31, 0x78, 0x32,
//Character Code
0x1F, 0x28, 0x67, 0x40, 0x02, 0x02, //Character Size
0x32, 0x78, 0x32,
//Character Code
0x1F, 0x24, 0x0C, 0x00, 0x02, 0x00, //Cursor Position
0x1F, 0x28, 0x67, 0x40, 0x02, 0x02, //Character Size
0x32, 0x78, 0x32,
//Character Code
Example 4-1
void blinking_characters( )
{
const int command_set [41] = {
0x1F, 0x24, 0x05, 0x00, 0x00, 0x00, //Cursor Position
0x43, 0x52, 0x55, 0x49, 0x53, 0x45, 0x20, 0x43, 0x4f,
0x4E, 0x54, 0x52, 0x4f, 0x4C,
//Character Code
0x1F, 0x24, 0x05, 0x00, 0x02, 0x00, //Cursor Position
0x1B,
0x42,
//Blink
Character
0x4F,
0x4E,
//Character
Code
Example 4-2
0x1F, 0x28, 0x67, 0x40, 0x01, 0x02, //Character Size
0x31, 0x78, 0x32,
//Character Code
0x1F, 0x24, 0x15, 0x00, 0x03, 0x00, //Cursor Position
0x1F, 0x28, 0x67, 0x40, 0x01, 0x01, //Character Size
0x31, 0x78, 0x31};
//Character Code
for(n = 0; n < 60; n++)
{
data = command_set [n];
parallel_out (data);
}
}
0x1F, 0x24, 0x10, 0x00, 0x02, 0x00, //Cursor Position
0x1B,
0x41,
//Blink
Character
0x4F, 0x46, 0x46};
//Cursor Position
for(n = 0; n < 41; n++)
{
data = command_set [n];
parallel_out (data);
}
}