550 635 03

 

 

Display channel

 

Registers on Display channel:

RegNo

Identifier

Memory type

Read Out

Type

0

KeyboardBuffer

RAM Read only

-------

Buffer

1

CharacterModeWrite

RAM Read Write

-------

Record

2

GraphicModeRec

RAM Read Write

-------

Array

3

CursorVariable

RAM Read Write

-------

Record

4

FlagReg

RAM Read Write

Binary

Bit8

5

BeepOnOff

RAM Read Write

Binary

Boolean

6

WDText

RAM Init EEPROM

-------

Record

7

LEDIntensity

RAM Init EEPROM

Decimal

Byte

8

BeepOnTime

RAM Init EEPROM

Decimal

Real

9

BeepVolume

RAM Init EEPROM

Decimal

Byte

10

VideoControl

RAM Init EEPROM

-------

Record

11

 

 

 

 

12

ChConfig

EEPROM RPW

-------

Record

13

Characterset

FLASH Read Write

-------

Array

14

ChType

PROM Read only

-------

Record

15

ChError

RAM Read only

-------

Record

 

 

RegNo 0: KeyboardBuffer

 

 

KeyboardBuffer:

Buffer[10] of Byte;

 

 

The keyboard is scanned and the key number (1-28) is placed in the KeyboardBuffer.

If a key is pressed when another key was already pressed, the 'Second Key' bit is set (bit 6).

If a key is pressed more than 1 sec., the repeat bit is set (bit 7) and a new scan code is inserted in the buffer every 0,25 sec.

 

 

RegNo 1: CharacterModeWrite

In character mode, data is written on the display using the character set defined in register 13.

The four strings in the CharacterModeWrite record will be shown on the display.

If Graphic mode is selected (Reg12), the record GraphicTextRec can be used to place text on the display.

The text can be positioned by using GraphicText Xpos and GraphicText Ypos. The Y-position is defined in the range 0-7, because of the way the screen is addressed (see RegNo 2).

It is possible to choose between normal or doubled text height by writing 0 or 1 to GraphicText .Characterset.

GraphicText.Colour is used to choose between black text on a white background (0) and white text on black background (1).

The text that has to be written to the display is placed in GraphicText.GraphicString.

To have an effect, the GraphicTextRec has to be written in one transmission.

GraphicTextRec is a Write-only record.

 

If the boolean ClearScreen is set to true, the screen is cleared.

 

Record

 

 

 

Line1:

String[33];

 

 

Line2:

String[33];

 

 

Line3:

String[33];

 

 

Line4:

String[33];

 

 

GraphicText:

GraphicTextRec;

 

 

ClearScreen:

Boolean;

 

End

 

 

 

GraphicTextRec = Record

 

 

Xpos:

Byte;

 

 

Ypos:

Byte;

 

 

Characterset:

Byte;

 

 

Colour:

Byte;

 

 

GraphicString:

String[50];

 

End

 

 

 

 

RegNo 2: GraphicModeRec

In graphic mode, any screen pixel can be set or reset within this array.

 

 

GraphicModeRec:

Array[0..999] of Byte;

 

 

The LCD screen is structured as a matrix of 33 lines of 200 pixels (6600 dots)

The complete array can be regarded as being divided into 5 groups of 200 bytes, each dealing with up to 8 lines, where each particular bit represents one of the 200 pixels on a specific line.

 

The first horizontal line is represented by the Array group [0..199].  The least significant bit (bit 0) of each of the 200 bytes determines whether each associated pixel on line 1 is showing (bit = 1) or not (bit = 0). This array group only applies to the first line of 200 pixels, so bits 1-7 in each byte are not used.

 

The next 8 lines (lines 2 to 9) are represented by the array group [200..399], so all bit 7s within each of the 200 bytes determines whether the associated pixel on line 2 is showing or not. All bit 6s take care of line 3, bit 5s – line 4, bit 4s – line 5…… bit 0s – line 9.

 

Lines 10 to 17 are controlled by array group [400..599] with bit 7s dealing with line 10….and bit 0s dealing with line 17.

 

Lines 18 to 25 are controlled by array group [600..799] with bit 7s dealing with line 18….and bit 0s dealing with line 25.

 

Lines 26 to 33 are controlled by array group [800..999] with bit 7s dealing with line 26….and bit 0s dealing with line 33.

 

Generally speaking, the best way to handle screen graphics is by means of a Process-Pascal program in a DPI, using the line and box functions provided. Please refer to the Process-Pascal Manual for further details.

 

 

RegNo 3: CursorVariable

In CharacterMode a cursor can be enabled.

 

Record

 

CursorX:

Byte;

 

 

CursorY:

Byte;

 

 

CursorWidth:

Byte;

 

 

CursorOn:

Boolean;

 

End

 

CursorX :             Cursor X character position (1-33)

 

CursorY:              Cursor Y character position (1-4). In case Double Height

                             (RegNo10, Code, bit6) is selected, the CursorY positioning options 

                             are reduced from 4 to 2.

 

CursorWidth:      Width of the cursor (number of characters)

 

CursorOn:           Cursor visible / not visible

 

 

RegNo 4: FlagReg

This register controls the two LEDs on the front of the device.

 

7

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0: LED_1    (Green - On/Off)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1: LED_2    (Red - On/Off)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3: Control (Note Ή)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6: InFlag (Note Ή)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7: OutFlag (Note Ή)

 

 

 

 

 

 

 

 

 

 

Note Ή: In the previous version of the Display Module - PD 680, these flags controlled the digital input and output. For compatibility reasons, the flags have been kept in this register although they really belong to the RegNo0 in the Digital I/O Channel. So, these flags have been mirrored in both registers. Therefore, to switch off the Red and Green LEDs, this should be done using the individual bits rather than resetting the complete byte. This will avoid any unintentional change in the state of the digital I/O. It is also recommended that the I/O flags in the Digital I/O channel, RegNo0 are used, instead of the flags in this register.

 

RegNo 5: BeepOnOff

When set true, a beep will be produced for a period as defined in

BeepOnTime, after which BeepOnOff will be automatically set false. During

the period when the beep is active, pressing any key on the keyboard will

immediately set BeepOnOff to false.

 

 

RegNo 6: WDText

If the WDTimer reaches zero before it is preset again, data from this register is written on the display using the character set defined in Register 13.

Record

 

Line1: 

String[33];

 

 

Line2: 

String[33];

 

 

Line3:

String[33];

 

 

Line4:

String[33];

 

End

In case Double Height (Reg10, Code, bit6) is selected, only the first two lines of the WDText are visible.

 

RegNo 7: LEDIntensity

The intensity of the two LEDs at the front of the display is specified in this register. (0-255). Default value: 255.

 

 

RegNo 8: BeepOnTime [s]

The length of the beep is specified in this register. Default value: 3 seconds.

 

 

RegNo 9: BeepVolume

The volume of the beep is specified in this register. (0-255) Default value: 8.

 

 

RegNo 10: VideoControl

 

Record

 

 

 

Code:

Bit8;

 

 

Light:

Byte;

 

 

Contrast:

Byte;

 

End

 

 

 

Code

 

7

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4: DisplayBackLight   (On/Off)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6: DoubleCharacterHeight

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7:

 

 

 

 

 

 

 

 

 

 

Double character height can be used in CharacterMode as a kind of zoom. It reduces the number of lines from 4 to 2. Default value: 00000000 (No DisplayBackLight, 4 lines).

 

Light

The strength of the display backlight can be controlled by this register (0-255). Default value: 255.

 

 

Contrast

The display contrast can be controlled by this register (0-63). Default value: 31.

 

 

RegNo 12: ChConfig

The ChConfig variable is a record of the following type:

 

Record

 

 

Enablebit:

Bit8;

(* Offset = 0 *)

 

Functions:

Byte;

(* Offset = 1 *)

 

Notification:

Bit8;

(* Offset = 2 *)

 

User:

Byte;

(* Offset = 3 *)

End

 

 

 

Where each field has the following interpretation:

 

Enablebit

Not used.

 

Functions:         

= 0

=>

Graphic mode

 

= 1

=>

Character mode

Default value: 1

 

If the mode is changed, the display is cleared.

 

Notification

7

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7: New data in KeyboardBuffer

 

 

 

 

 

 

 

 

 

 

Default value: 0 (no notification). When notification is selected, the NotificationOnCh_1 will be set in the Service Channel RegNo2 in two different cases: When data is actually added to the KeyboardBuffer, and when attempting to write data to a full buffer.

 

User

This field is available for the user. Default value: 0

 

RegNo 13: Characterset

 

 

Characterset:

Array[0..255] of Smallbitmap[6];

 

 

The Characterset array can be used for downloading a new character set to the module. The character set can be created in, and downloaded from, the program BitmapEditor, which is included in the VIGO installation.

It is not possible to download one character at a time; you have to download the entire array in a long-store transmission. The size of each bitmap must be 6 x 8 pixels (including blank rows), otherwise download cannot take place. Proportional spacing is only possible when text is written to the display from a DPI, not when the display is controlled autonomously.

The memory type used is FLASH and therefore quite slow, which means that the number of retries for the P-NET and its participants must be set to 10. This will be sufficient for downloads at single (76,800) as well as triple (230,400) P-NET speed.

The endurance of the FLASH memory is about 10.000 Write/Erase cycles.

 

 

RegNo 14: ChType

For the Display channel, ChType is of the following type:

 

Record

 

 

ChannelType:

Word;

(* Offset = 0 *)

 

Exist:

Bit16;

(* Offset = 2 *)

 

Functions:

Bit16;

(* Offset = 4 *)

End

 

 

 

ChType has the following value:

 

ChannelType = 16

 

Exist =

 

15

 

 

 

 

 

 

 

7

 

 

 

 

 

 

0

1

1

0

1

0

1

1

1

0

0

1

1

1

1

1

1

 

Functions =

 

15

 

 

 

 

 

 

 

7

 

 

 

 

 

 

0

 

 

0

0

0

0

0

0

0

0

0

0

0

0

0

0

1

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0: GraphicMode

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1: CharacterMode

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


RegNo 15: ChError

 

Record

 

 

His:

Bit8;

(* Offset = 0 *)

 

Act:

Bit8;

(* Offset = 2 *)

End

 

 

 

The 8 bits in ChError.His and ChError.Act have the following meaning. When an error occurs, the corresponding bit is set in both ChError.His and ChError.Act. When the error disappears, the bit is cleared in ChError.Act. The corresponding bit in ChError.His remains set until it is read, whereupon it is cleared automatically. See summary for how ChError.His can be cleared in particular M36 slave modules.

 

7

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7: ModuleError

 

 

 

 

 

 

 

 

 

 

Bit 7:  Module error. If this bit is set, the rest of the bits have no meaning because a module error can cause random error codes on the individual channels (see also "Service channel").