background image

VK202-25 rev. 05 

29

7.6  Bar Graphs and Special Characters 

The commands in this section are used to define and display bar graphs and special characters. 

Table 7-3 Bar Graph and Special Character Commands 

Command Syntax 

Notes 

Initialize thick vertical 
bar graph 

FE 76 
254 118 
254 'v' 

Initializes the user character set to make wide vertical bar 
graphs. 

Initialize thin vertical 
bar graph 

FE 73 
254 115 
254 's' 

Initializes the user character set to make narrow vertical bar 
graphs. 

Initialize horizontal 
bar graph 

FE 68 
254 104 
254 'h' 

Initializes the user character set to make horizontal bar 
graphs. 

Define custom 
character 

FE 4E [c][8 bytes] 
254 78 [c][8 bytes] 
254 'N' [c][8 bytes] 

Defines one of 8 custom "user" characters. Character 
number is [c] between 0x00 and 0x07. The 8 bytes are 
described in section 5.1.6. 

Draw vertical bar 
graph 

FE 3D [col][length] 
254 61 [col][length] 
254 '=' [col][length] 

Draws a vertical bar graph at column [col] of length [length]. 
Length is measured in pixels (0x00 to 0x14). User must first 
use the 'v' or 's' command to initialize characters. 

Draw horizontal bar 
graph 

FE 7C [c][r][d][length] 
254 124 [c][r][d][length]
254 '|' [c][r][d][length] 

Draws a horizontal bar graph starting at column [c] on row [r] 
with direction [d] (0 is right, 1 is left) of length [length]. Length 
is measured in pixels (0x00 to 0x64 if starting in column 1). 
User must first use the 'h' command to initialize characters. 

 

Downloaded from 

Elcodis.com

 

electronic components distributor

 

Содержание VK202-25

Страница 1: ...VK202 25 rev 05 1 VK202 25 User Manual Downloaded from Elcodis com electronic components distributor ...

Страница 2: ...scroll on 254 81 15 3 4 4 Auto scroll off 254 82 15 3 4 5 Set cursor position 254 71 column row 15 3 4 6 Send cursor home 254 72 15 3 4 7 Turn on underline cursor 254 74 15 3 4 8 Turn off underline cursor 254 75 16 3 4 9 Turn on block blinking cursor 254 83 16 3 4 10 Turn off block blinking cursor 254 84 16 3 4 11 Cursor left 254 76 16 3 4 12 Cursor right 254 77 16 4 Keypad Interface 17 4 1 Genera...

Страница 3: ...e output off 254 86 gpo 23 6 1 8 General purpose output on 254 87 gpo 23 6 1 9 Set I2 C address 254 51 address 23 6 1 10 Read module type 254 55 24 6 1 11 Set RS232 port speed 254 57 speed 24 6 1 12 Set Serial Number 254 52 byte1 byte2 24 6 1 13 Read Serial Number 254 53 24 6 1 14 Read Version Number 254 54 25 6 2 Flow Control 25 6 2 1 Enter Flow Control Mode 254 58 full empty 25 6 2 2 Exit Flow C...

Страница 4: ...nd use standard ASCII mapping Provision is made for up to 8 user defined characters The screen is luminous for low light situations Display may be turned on or off under program control Brightness is adjustable to compensate for differing lighting conditions General purpose outputs allow the controller to switch up to six electronic or electro mechanical devices by issuing commands to the display ...

Страница 5: ... between the RS 232 ground and the power supply ground 4 Connect the power connector making sure that the 5V goes to V as shown in Figure 2 2 Turn on the power the display should come on Now you re ready to try it out 1 5 Trying Out your VK202 25 The unit is connected to power and the PC and the display is on You re ready to make sure it s working properly To experiment with typing text run a PC t...

Страница 6: ...e on the VK202 25 converts a row column connection to an ASCII character By default a keypress is transmitted as serial data immediately Keypad buffering can be selected using the appropriate commands 1 6 1 Here s what to do 1 Your PC should be running a terminal program such as Hyperterm as in the previous section 2 With the VK202 25 connected to the PC plug in your keypad If your connector has f...

Страница 7: ...ould follow this simple procedure 1 Turn off the display 2 Put a jumper on pins 5 and 6 of the keypad connector C5 and R1 3 Power up the display The baud rate is now set to 19 200 4 Remove the jumper and change the RS 232 port settings to the desired baud rate 5 Turn off the display 6 Power up the display Refer to the Set RS 232 Port Speed command section 6 1 10 for acceptable baud rates Downloade...

Страница 8: ...ons Power is applied via pins 1 and 4 as shown in Figure 2 1 Power requirement is 5 VDC 0 25V Power may also be supplied via the RS 232 connector as described in the next section Warning Do not apply any power with reversed polarization Do not apply any voltage other than the specified voltage Do not use any cables other than the cables supplied by Matrix Orbital unless you are aware of the modifi...

Страница 9: ...able designed to use with the VK202 25 when it s installed in a PC The cable is wired as shown in Figure 2 4 below Note that this connector does not provide connections for I2 C Figure 2 4 Power Adapter Cable 2 1 1 2 Wide Voltage Range Modules Note Do not use this cable unless your display module has the wide voltage range option option V Use of the 12 volt power cable with 5 volt modules will dam...

Страница 10: ...DB 9F is provided for RS 232 communications Power may also be supplied via this connector if desired See Figure 2 7 for pin connections Figure 2 7 RS 232 and power connector The RS 232 connector on the PC cable is wired so that a standard straight through 9 pin D sub cable may be used to connect the module to a standard serial port such as COM ports on PCs Note that this device complies with the E...

Страница 11: ... this situation in deference to situations you might be familiar with i e memory chips etc is that the Matrix Orbital module employs a microprocessor to perform these data storage functions A memory chip takes care of these things entirely with in hardware subsystems that operate at the same speed as the transmission themselves The VK202 25 uses a standard Phillips 7bit address as defined by Phill...

Страница 12: ... be shorted Solder a small jumper wire wirewrap wire is good from the feedthrough hole to the corresponding negative pin for the GPO in question Jumper wire Figure 2 9 Bypassing 240 ohm resistor Note The GPOs do not have any over current or over under voltage protection so care must be taken when using them For instance if the external device is a relay it must be fully clamped using a diode and c...

Страница 13: ...VK202 25 rev 05 13 10 100 uF 1N4001 Relay coil GPO Figure 2 10 Clamping a Relay Downloaded from Elcodis com electronic components distributor ...

Страница 14: ... Text is displayed on the VK202 25 using the built in 5 x 7 dot matrix font plus up to 8 user defined characters 3 2 The Built In Character Font The VK202 25 includes a built in 5 x 7 dot matrix font with the full range of ASCII characters plus a variety of extended characters as shown in Figure 3 1 Figure 3 1 Character Set Downloaded from Elcodis com electronic components distributor ...

Страница 15: ...ables automatic line wrapping Note that this is not word wrapping and wraps may occur in the middle of a word 3 4 2 Auto line wrap off 254 68 Disables automatic line wrapping Characters beyond the end of a line will be lost 3 4 3 Auto scroll on 254 81 When auto scrolling is on it causes the VK202 25 to shift the entire display s contents up to make room for a new line of text when the text reaches...

Страница 16: ... cursor 3 4 11 Cursor left 254 76 Moves the cursor one position to the left but does not erase any character that may be in that position Note that this command moves the text insertion point even if the cursor is turned off Note A destructive backspace which erases the character to the left of the original position may be done by issuing the following sequence cursor left space cursor left 3 4 12...

Страница 17: ...lows but note that your keypad may be laid out in a different pattern If this is the case you will need to interpret the key codes differently The diagram 1 shows the logical layout row 1 column 1 in upper left The connector for the keypad is a 10 pin 0 1 spacing male header Pin 1 is indicated in Figure 2 1 Pins 1 through 5 are columns and pins 6 through 10 are rows The keypad is scanned whenever ...

Страница 18: ...7 2 and 7 3 4 5 1 Auto repeat mode on 254 126 mode mode 0x00 gives Resend Key Code mode mode 0x01 gives Key down Key up code mode Two Modes of auto repeat are available and are set via the same command 1 Resend Key Code This mode is similar to the action of a keyboard on a PC In this mode when a key is held down the key code is transmitted immediately followed by a 1 2 second delay After this dela...

Страница 19: ...n resets for whatever reason 4 5 6 Poll keypad 254 38 This command returns any unbuffered keypresses via the RS 232 interface The host system must be set up to receive the key codes When the VK202 25 receives this command it will immediately return any unbuffered keypresses which may have not been read already If there is more than one keypress buffered then the high order bit MSB of this returned...

Страница 20: ...n issued any number of vertical bar graphs may be drawn unless the characters are redefined by another command 5 1 3 Draw vertical bar graph 254 61 column height Draws a vertical bar graph in column having a height of height pixels The height may range from 0 to 20 0x00 to 0x14 pixels The necessary characters must first be initialized by either of the commands shown in section 5 1 1 or 5 1 2 which...

Страница 21: ...9 10 Data Byte 2 11 12 13 14 15 Data Byte 3 16 17 18 19 20 Data Byte 4 21 22 23 24 25 Data Byte 5 26 27 28 29 30 Data Byte 6 31 32 33 34 35 Data Byte 7 36 37 38 39 40 Data Byte 8 A 1 bit indicates an on black pixel a 0 bit indicates an off clear pixel Once defined a character is displayed simply by issuing a value 0x00 to 0x07 corresponding to the character number The character will be laid out as...

Страница 22: ...ighting conditions will affect the actual value used for optimal viewing Brightness is set to 100 by default 6 1 3 Display on 254 66 minutes This command turns on the display for a time of minutes minutes The maximum value of minutes is 100 If minutes is zero 0 the display will remain on indefinitely 6 1 4 Backlight off 254 70 This command turns the display of the VK202 25 off 6 1 5 Load startup s...

Страница 23: ...o is 1 to 6 ON means that the output is pulled low ground via 240 ohms 6 1 8 Set I 2 C address 254 51 address This command sets the I C write address of the module This value must be an even number and the read address is one higher For example if the I C write address is set to 0x50 then the read address is 0x51 The change in address is immediate This address is 0x50 by default and is reset tempo...

Страница 24: ...eed can be manually reset to 19 200 baud in the event of an error during transmission including transmitting a value not listed below by setting the manual override jumper on the module during power up see section 1 7 This command is ignored until this jumper is removed again Speed Value Speed FF Hex 1200 baud 81 Hex 2400 baud 20 Hex 9600 baud 0F Hex 19200 baud 6 1 11 Set Serial Number 254 52 byte...

Страница 25: ...mpty message 0xFF to the controller The VK202 25 will return the almost full message for every byte sent to the VK202 25 until the used buffer space once more drops below the full level Whether the user is in Flow Control Mode or not the module will ignore display or command bytes which would overrun the buffer While in Flow Control Mode the unit will return 0xFE when buffer is almost full even th...

Страница 26: ...t setup you could issue the command to clear the screen on the VK202 25 by including the line PRINT 1 chr 254 chr 88 in your BASIC program Or with C you could using Zcomm serial library ZComm1 WriteCommByte 0xfe ZComm1 WriteCommByte X 7 3 On Numbers Like all computerized devices the VK202 25 operates with commands and values in the form of binary numbers These binary numbers are arranged in 8 digi...

Страница 27: ...uch parameters must use numeric values i e the actual byte values If we send the ASCII number 0 by mistake it will actually give the value 48 decimal 30 hex to the parameter which is wrong In the tables given in the following sections ASCII characters are shown as A with single quotes 7 4 Text Commands See Chapter 3 for command descriptions Syntax in the tables below is given in hex decimal and de...

Страница 28: ... Table 7 2 Keypad Interface Commands Command Syntax Default Notes Auto repeat mode on FE 7E 0x00 0x01 254 126 0 1 254 0 1 off Applies to keypad only 0x00 200 ms typematic 0x01 key down key up codes sent Auto repeat mode off FE 60 254 96 254 off Applies to keypad only Auto transmit key presses on FE 41 254 65 254 A on Sets auto transmit mode for keypad Key presses are transmitted to host without po...

Страница 29: ...haracter FE 4E c 8 bytes 254 78 c 8 bytes 254 N c 8 bytes Defines one of 8 custom user characters Character number is c between 0x00 and 0x07 The 8 bytes are described in section 5 1 6 Draw vertical bar graph FE 3D col length 254 61 col length 254 col length Draws a vertical bar graph at column col of length length Length is measured in pixels 0x00 to 0x14 User must first use the v or s command to...

Страница 30: ... General purpose output on FE 57 gpo 254 87 gpo 254 W gpo off Turns a general purpose output ON gpo may be from 1 to 6 See section 2 2 for further details Set I 2 C address FE 33 address 254 51 address 254 3 address 0x50 Value is write address and must be even read address is 1 higher Read module type FE 37 254 55 254 7 see table Reads the module type See table in section 6 1 9 This will return a ...

Страница 31: ...efault Notes 254 full empty display will return 0xFE to host When buffer reaches empty display will return 0xFF Exit flow control mode FE 3B 254 59 254 Turns off flow control Downloaded from Elcodis com electronic components distributor ...

Страница 32: ...on 593 m S 10 mS Electrical Specifications Supply Voltage 4 75 5 25 Vdc optional 8 15 VDC Supply Current all dots on 130 mA typical Supply Current power off 9 mA typical Supply Current power up Up to 250 mA inrush Optical Characteristics Number of Characters 40 20 characters by 2 lines Matrix format 5 x 7 with underline Display Area 70 8 x 11 5 mm XxY Character Size 2 4 x 4 7 mm XxY not including ...

Страница 33: ...VK202 25 rev 05 33 Figure 8 1 Physical Layout 8 2 Options Options Available on VK202 25 Extended Temperature E Wide Voltage V Downloaded from Elcodis com electronic components distributor ...

Страница 34: ...n of both Contrast The ratio of luminance between the light state of the display to the dark state of the display Controller The microcontroller or PC used to control the Matrix Orbital display unit DB 9 The designation of a connector used in the RS232 interface 9 pin connector Firmware Software programs or data that has been written onto read only memory ROM Firmware is a combination of software ...

Страница 35: ...ndard 232C a standard interface approved by the Electronic Industries Association EIA for connecting serial devices Scroll To view consecutive lines of data on the display screen The term scroll means that once the screen is full each new line appears at the bottom edge of the screen and all other lines move up one position Serial Number A number that is one of a series and is used for identificat...

Отзывы: