Chapter 6 Command Reference

Introduction

Terms
Notation
Reserved Bytes

Command Descriptions

Acknowledge ('a')
Report ('B','b')
Calibration ('C','c')
Setting the Calibration Points Acquired by a Host-Driven Calibration Program
Querying the Calibration Parameters
Setting the Calibration Parameters as Offset, Numerator, and Denominator
Initiating a Controller-Driven Two-Point Calibration Sequence
Host-Driven Calibration Sequence
Z-Axis Calibration
Setting or Querying the Swap Axes Flag
Diagnostics ('D','d')
Emulate ('E','e') - Serial Controllers Only
Filter ('F','f')
AccuTouch Filtering
IntelliTouch Filtering
Configuration ('g')
Timer ('H','h')
ID ('i')
E271-2210 vs. E271-2200 Controllers
Jumpers ('j')
PC-Bus Controllers
Serial Controllers
Key ('K','k') - Serial Controllers Only
Low Power ('L','l')
Mode ('M','m')
Nonvolatile RAM ('N')
Owner ('o')
Parameter ('P','p')
PC-Bus and Micro Channel Controllers
Serial Controllers
Checksum Bit
Software Handshaking Bit
Hardware Handshaking Bit
Invert Hardware Handshaking Bit
Full-Duplex Bit
Other Communication Parameters
Quiet ('Q','q')
Reset ('R')
Scaling ('S','s')
Setting the Scaling Points from the Host
Querying the Scaling Parameters
Setting the Scaling Parameters as Offset, Numerator, and Denominator
Z-Axis Scaling
Setting or Querying the Invert Axes Flags
Touch ('t')

Introduction

Terms

The following is a glossary of basic terms as they are applied in this chapter:

command

packet passed as a message from the host to the controller.

response

packet passed as a message from the controller to the host.

command byte

leading character in a command packet.

data bytes

The remaining seven bytes in a command packet.

set

A command issued by the host to the controller requesting the controller perform a specific action.

query

A command issued by the host to the controller requesting the controller send a response packet containing the requested data.

integer

A logical combination of two bytes to form a single 16-bit two's-complement signed number. Value range from -32768 to 32767. The bytes are ordered in Intel format, with the least significant byte (low order 8 bits) being first.

word

A 16-bit unsigned integer value. The byte ordering is identical to an integer but the value is interpreted to be in the numeric range 0-65535.

Notation

The following notation is used in this chapter:

When values are given for data bytes, they are noted as two-place hexadecimal numbers (denoted by a letter 'h' suffix) or as decimal numbers. When interpreted as a member of the ASCII character set, a byte is called a character and its value is shown in single quotes. For example, 49 or 31h is the same as '1'.

Bit values are defined to be either 1 or 0. The terms "true", "set", and "high" are equivalent to 1. "False", "clear", and "low" are equivalent to 0.

Reserved Bytes

All unused bytes should be null (binary zero). All unused bits should be 0.

Command Descriptions

The following sections serve as a reference for the command set of the SmartSet controller family.

Each section is titled with the command name and command byte(s). An upper-case command byte indicates a set command is possible. A lower-case command byte indicates a query is possible.

The packet contents are then given for all possible set and query versions of the command as well as the possible responses from the controller. The function of each command and data bytes in the packet are detailed.

Acknowledge ('a')

Function: Verifies that a command was received by the controller and no errors are pending.

An Acknowledge response is automatically sent to the host following each command received by the controller (with the exception of the Hard Reset and Quiet-all commands). Command-related errors are indicated in the Acknowledge response in the X positions. A query is not necessary to acknowledge the processing of a command.

However, an Acknowledge query is issued to retrieve any pending warnings that were not related to a command, indicated by the Warning-pending bit in the Touch packet. An Acknowledge query may also be used to interrupt a pending process (such as a calibration sequence).

The Acknowledge response contains any pending error codes (up to four), where any pending warnings appear in the positions denoted by the X's. The possible errors are given in the following table in both ASCII and hexadecimal notation.

Report ('B','b')

The Untouch byte specifies the number (0-15) of 10ms time increments to delay before reporting an untouch condition. Increasing this value allows the controller to filter out accidental untouches due to skips while sliding the finger. The factory default value is 0 on AccuTouch controllers and 3 on the 2500S controller.

The RepDelay byte specifies a delay (0-255) in 10ms time increments between the transmission of Touch packets. This is used to slow the output rate of the controller without changing other filtering or interface characteristics such as the baud rate. The factory default value is 2 on AccuTouch controllers and 1 on the 2500S controller.

Calibration ('C','c')

Calibration can be performed by a host-driven calibration program or a controller-driven calibration sequence. Calibration is discussed in the tutorial in Chapter 4, and an example is given in Chapter 5.

The Calibration command has several functions:

Setting the Calibration Points Acquired by a Host-Driven Calibration Program

Calibration is typically accomplished by a host-driven calibration program which determines the raw touchscreen coordinates at the extremes of the display image. These coordinates are then communicated to the controller, which converts them into an internal Offset, Numerator, and Denominator format.

AXIS specifies the coordinate axis to calibrate by using upper-case ASCII characters 'X','Y', or 'Z'.

LowPoint and HighPoint are unsigned words specifying an axis range. For example, if two calibration points are specified as (XLow,YLow) and (XHigh,YHigh), LowPoint = XLow and HighPoint = XHigh for the X-axis. If a HighPoint value is greater than a LowPoint value, hardware axis inversion is performed.

Querying the Calibration Parameters

axis specifies the coordinate axis by using lower-case ASCII characters 'x','y', or 'z'. Calibration parameters are returned in the controller's internal Offset, Numerator, and Denominator format. These values can be saved and later restored directly in this format.

Note there is no way to directly query the LowPoint and HighPoint values. These values can be calculated by the following formulas:

LowPoint=Offset
HighPoint=LowPoint + Denominator
Setting the Calibration Parameters as Offset, Numerator, and Denominator

This command is used to restore calibration parameters previously queried from the controller.

axis specifies the coordinate axis to calibrate by using lower-case ASCII characters 'x','y', or 'z'.

Initiating a Controller-Driven Two-Point Calibration Sequence

(Not supported on the 2500S or future controllers.) The sequence of events is as follows: The 'C2' command is sent to the controller. The controller responds with an Acknowledge packet. The host should then display a target associated with a 0,0 coordinate and instruct the user to press the target. After the user presses the target, the controller responds with another Acknowledge packet. The host should then display a target associated with the XHighPoint,YHighPoint position and instruct the user to press the target. Once this is accomplished, the controller responds with a final Acknowledge packet and normal processing resumes. The required calibration values are then calculated by the controller. The 'C2' command temporarily disables the Calibration and Scaling Modes so raw data is used for the two calibration points. The modes are automatically restored upon exiting this procedure. If the host wishes to terminate the calibration procedure prematurely,any command packet may be sent to the controller. This will interrupt the sequence and an Acknowledge packet will be returned with a "calibration terminated" warning.

Host-Driven Calibration Sequence

Alternatively, a host-driven calibration sequence may be performed. It must first disable the Calibration and Scaling Modes, acquire the low and high calibration points, transmit them to the controller with the CX and CY commands, then restore the modes. Host-driven calibration sequences are more flexible in that calibration points can be extrapolated to the edges, multiple samples acquired and averaged, etc. For an example of a host-driven calibration sequence, see EXAMPLE2.C.

Z-Axis Calibration

Z-axis calibration is typically not required as no Z data is available with AccuTouch touchscreens. The controller defaults to 0-255, but always returns the HighPoint value.

Z-axis calibration is supported on the IntelliTouch 2500S controller. It can be used in combination with Trim mode to push in the extremes of the coordinate range (see Mode command).

Setting or Querying the Swap Axes Flag

Swapped axes can be detected by a three-point host-driven calibration sequence. This can correct inverted cabling or touchscreens rotated 90°. If the coordinates of the third corner change in what should be the constant axis, then the axes are swapped. The controller can then be informed to swap the axes through the Swap Axes Flag. See EXAMPLE2.C.

Enable is a byte value where the least significant bit is 1 to swap axes or 0 for normal operation.

Calibration and Axis Swapping are disabled by factory default.

Diagnostics ('D','d')

When the set Diagnostic command is sent to the controller, the MaskC and MaskT bitmaps specify the individual tests to run. A 1 bit will run the corresponding test while a 0 bit will skip the test. Exceptions to this rule are bits MaskC.7, MaskC.5, MaskT.1, and MaskT.0 (see below). None of these bits has any effect in a set command.

The results of the diagnostics are returned as a response packet before the Acknowledge packet. MaskC and MaskT will have bits set where the corresponding test failed and bits cleared where the tests passed or were not run.

NOTE

This command does an implicit Query after a Set command is issued, retrieving the results of the tests run by the Set.

The results of the previous diagnostics can be queried at any time. Since the controller executes its on-board diagnostics at power-on, the results can be queried without running them again.

MaskC byte has the following bit positions:

Bit

Test

Description

0

ID Test

Checks to see that the firmware and hardware are compatible.

1

CPU Test

Exercises the CPU to verify that the instruction set and registers are working.

2

ROM Test

Verifies the checksum for the ROM.

3

RAM Test

With AccuTouch controllers, performs an extensive read/write RAM test. Checks for and tests optional external RAM. Testing may take up to 45 seconds depending on the memory configuration of the controller. Test is ignored on IntelliTouch controllers.

4

NVRAM Test

Verifies the checksum of the nonvolatile RAM.

5

Drive Test

Verifies the touchscreen drive hardware. A failure may indicate the touchscreen is not connected.

6

CHOP Test

If a controller expansion board is installed via the controller's CHOP connector, this test allows the expansion board to perform its diagnostics.

7

Drive Test

Drive Test incomplete.

MaskT byte has the following bit positions:

Bit

Test

Description

0-2

Drive Test

Checks to see that the firmware and hardware are compatible.

3

ADC Test

Tests the controller's Analog to Digital Converter.

4

PROM Test

Verifies the checksum of the PROM.

5

External RAM Test

Performs an extensive read/write test on External RAM.

6

Internal RAM
Test

Performs an extensive read/write test on Internal RAM.

7

CPU Test

Always returns 0.

The three least significant bits of MaskT comprise the error code resulting from the Drive Test (MaskC.5). This field is interpreted as a numeric value, and has the following significance:

Bits

Value

Description

2-0

0

Test passed (this test always passes)

1

X axis failure

2

Y axis failure

3

X receive channel failure

4

Y receive channel failure

5

X transmit channel failure

6

Y transmit channel failure

7

General failure-analog electronics and touchscreen

Note that upon running the tests, bits specified as zero in the test masks will cause corresponding bits in the result to be set to zero. This will effectively mask any failed values from previous tests.

Emulate ('E','e') - Serial Controllers Only

The SmartSet controllers can emulate other Elo controllers. Emulation can be partial or full.

When Touch Packet Emulation is enabled, only the touch data output format is changed to that of the selected controller (partial emulation). The SmartSet controllers will still respond to the SmartSet command set when Touch Packet Emulation is enabled. Other controller parameters may still be changed, such as the Touch Mode and Scaling.

Full Emulation can only be selected through jumper settings (see Emulation mode). In Full Emulation Mode, the SmartSet controllers will not respond to SmartSet commands. Instead, they will respond to the commands of the emulated controller (if applicable).

TouchFlag is an ASCII value of '1' to include touch/untouch information in some formats, and '0' to not include the information.

Format is a byte in the range of 0-7. ASCII '0' to ASCII '7' may also be used.

The following combinations of TouchFlag and Format specify the indicated output formats. A page reference is given within Appendix A where the output format is described.

TouchFlag

Format

Description

'0'

0

E271-140 Binary

'0'

1

E271-140 ASCII

'0'

2

E261-280 Binary*

'0'

3

E261-280 ASCII*

'0'

4

E271-22x0 Binary

'0'

5

E271-22x0 ASCII

'0'

6

E281-4002 Binary

'0'

7

E281-4002 ASCII

'1'

0

E271-140 Binary (same as '00')

'1'

1

E271-140 ASCII (Appends 'T' or 'U')

'1'

2

E261-280 Binary (81h flags untouch)*

'1'

3

E261-280 ASCII (Appends 'T' or 'U')*

'1'

4

E271-22x0 Binary (same as '04')

'1'

5

E271-22x0 ASCII (Appends 'T' or 'U')

'1'

6

E281A-4002 Binary (Z=0 on untouch)

'1'

7

E281A-4002 ASCII (Z=0 on untouch)

Partial Emulation is disabled by factory default (TouchFlag = '1', Format = '4').

* These formats force the axes scaling to be set from 2-255 to emulate the E261-280 controller's protocol. Any scaling currently in use will be lost if one of these formats is selected. Scaling Mode is also enabled automatically. No longer documented.

Filter ('F','f')

The Type byte indicates the touchscreen type as follows: an ASCII '0' for AccuTouch, '1' for DuraTouch, '2' for IntelliTouch, and '3' for CarrollTouch. The Type field cannot be changed.

AccuTouch Filtering

The SLen byte specifies the number of coordinate samples (1-255) to average before reporting the results. The factory default value is 4.

The Width byte specifies the allowable deviation (±1-255) in validating a touch coordinate measurement. All touches within an averaging cycle (number specified by SLen) must be within this specified window or the coordinate is discarded. The factory default value is 32 for the E271-2210 controller and 8 for all other controllers.

The States byte specifies the number (1-255) of valid touch detections (or untouch detections) to signify a change in the state of the touch event. For example, a value of 8 sets the state detection function to require that 8 contiguous touch measurements be made to cause the controller to process an initial touch. Similarly, 8 contiguous untouches must be measured to cause the controller to end the touch event. The factory default is 8.

The Control byte comprises two 4-bit numeric values:

The high order 4 bits specify a touch-down detection threshold (0-15), related to voltage. A value which is too low can cause the controller to report erroneous untouch coordinates. A value too high may prevent valid touches from being recognized. The factory default value is 9.

The low order 4 bits specify the number of additional 0.5ms delays to use when changing the drive signals to the touchscreen (0-15). A value of 0 specifies a delay of 0.5ms, with each increment specifying an additional 0.5ms delay. The factory default value is 1 for the E271-2210 controller and 0 for all other controllers.

IntelliTouch Filtering

The Rep word specifies the maximum number of times (1-65535) that a repeating coordinate value is permitted to be measured by the controller. If the number of times that a coordinate repeats in X, Y, and Z exceeds this value, then the controller relearns the touchscreen waveform. This parameter determines the tolerance of contaminants on the touchscreen. The factory default value is 12000 (2EE0h), which is 120 seconds.

The Ofs byte specifies the amount (0-255) of surface wave energy absorption that is recognized as a touch. A small value increases touch sensitivity. A large value increases noise rejection. The factory default value is 1.

The MinLen byte specifies the minimum width of a touch (0-255). As with the previous argument, a small value increases the sensitivity and a large value increases noise rejection. The factory default is 2.

The MaxLen byte specifies the maximum width of a touch (0-255). This parameter controls the rejection of multiple touches and splattered contaminants. The factory default is 22.

Configuration ('g')

The order and number of packets returned may change in future revisions of the controllers. Storage requirements may be queried with the ID command. The number of packets in the transfer is returned in the P byte.

The packets may be sent back to the controller as individual commands to restore (set) all controller parameters.

Timer ('H','h')

Enable is a byte value where the least significant bit is 1 to enable the Timer or 0 to disable the Timer. Timer packet transmission must also be Un-Quieted with the Quiet command, described on page 108. The factory default for the Timer is disabled.

The TMode byte determines the action taken upon the expiration of the Timer, either One-shot or Continuous. If the least significant bit is 1 (Continuous Mode), the Timer is automatically restarted using the specified Interval value. If it is 0 (One-shot Mode), the Timer is disabled when it expires. The factory default for the TMode is One-shot.

The Interval word specifies the number of Timer ticks (in 10ms increments) before the expiration of the Timer. The factory default is 100 (1 second).

The Current word contains zero when the Timer expires and a Timer packet is sent to the host. If queried prior to expiration or while the Timer is Quieted, Current will contain the amount of time remaining before expiration.

NOTE

Specifying an Interval of 0 (or 1 on slow computers) will flood the host with Timer packets so that communication with the controller may become impossible.

ID ('i')

The Type byte indicates the touchscreen type as follows: an ASCII '0' for AccuTouch, '1' for DuraTouch, '2' for IntelliTouch, and '3' for CarrollTouch.

The IO byte indicates the type of communication interface that is in use by the controller as follows: an ASCII '0' for serial, '1' for PC-Bus, '2' for Micro Channel, '3' for ADB, and '4' for USB.

The Features byte indicates installed features of the controller and has the following bit positions:

Bit

Feature

0

Reserved

1

Reserved

2

Reserved

3

Reserved

4

External A/D converter

5

RAM is 32K bytes

6

RAM available

7

Z-axis available

The Minor byte reports the minor firmware revision level. The Major byte reports the major firmware revision level. These bytes may be treated as an integer.

The P byte reports the number of packets to expect when querying the configuration with the 'g' command, not including the Acknowledge packet that follows. P may change with future firmware revisions.

The Class byte indicates the model of the controller as follows:

Value

Controller

00h

E271-2200

01h

E271-2210

03h

E281-2310

04h

Reserved

05h

E281-2310B

06h

2500S

07h

2500U

08h

3000U

09h

4000U

0Ah

4000S

0Bh

Reserved

0Ch

Reserved

0Dh

Reserved

0Eh

COACh IIs™

E271-2210 vs. E271-2200 Controllers

The E271-2210 controller is software compatible with the obsolete E271-2200 with the following exceptions:

Jumpers ('j')

The Type byte indicates the touchscreen type as follows: an ASCII '0' for AccuTouch, '1' for DuraTouch, '2' for IntelliTouch, and '3' for CarrollTouch.

The IO byte indicates the type of communication interface that is in use by the controller as follows: an ASCII '0' for serial, '1' for PC-Bus, '2' for Micro Channel, '3' for ADB, and '4' for USB.

On AccuTouch controllers, the X1 Byte is an ASCII '0' if the controller's setup jumper (J7) is present and the controller is booting from the jumper settings. It is a '1' if the controller is booting from settings in NVRAM, and all jumper settings are ignored. AccuTouch controllers are shipped jumpered to boot from jumpers (J7 installed). The 2500S controller always boots from NVRAM.

On AccuTouch controllers, the X2 byte is an ASCII '0' if the controller is jumpered for Single-Point Mode on power-on. It is a '1' for Stream Mode. AccuTouch controllers are shipped jumpered for Stream Mode (J4 not installed). The 2500S controller is shipped with Stream Mode configured in NVRAM.

On the 2500S controller, X1 and X2 are bitmaps specifying which option jumpers are installed:

X1 Bit Position

Description

0

Always '0'

1

J1 installed

2

J2 installed

X2 Bit Position

Description

0

Jumper cross-connects J0 to J1

PC-Bus Controllers

The Bus1 byte indicates the Interrupt (IRQ) jumpered on a PC-Bus controller. A zero value indicates no Interrupt is jumpered (Polled Mode). PC-Bus controllers are shipped without an Interrupt jumpered.

The Bus2 integer indicates the Base I/O Port address jumpered on a PC-Bus controller. PC-Bus controllers are shipped jumpered for address 280h.

Serial Controllers

The S1 byte indicates the jumper-selected baud rate as follows:

Value

Baud Rate

00h

300

01h

600

02h

1200

03h

2400

04h

4800

05h

9600

06h

19200

07h

38400

AccuTouch serial controllers are shipped jumpered for 9600 baud. The 2500S controller is shipped with 9600 baud configured in NVRAM. The values for the S1 byte correspond to those used in the Parameter command (page 102). Not all of the above baud rates are available through jumper settings.

The S2 byte is an ASCII '0' if serial Hardware Handshaking is disabled by the J3 jumper on power-on. It is a '1' if Hardware Handshaking is enabled. AccuTouch serial controllers are shipped jumpered for Hardware Handshaking enabled (J3 not installed). The 2500S controller is shipped with Hardware Handshaking enabled in NVRAM, and S2 is undefined.

The S3 byte is an ASCII '0' if the SmartSet ASCII Mode is selected on power-on by the J2 jumper. A '1' indicates the SmartSet Binary Mode. AccuTouch serial controllers are shipped jumpered for Binary Mode (J2 not installed). The 2500S controller is shipped with Binary Mode enabled in NVRAM, and S2 is '1'.

Key ('K','k') - Serial Controllers Only

The KeyValue byte may be from 1-255. A null value disables this function.

When the Key command is issued, the Acknowledge packet and all subsequent packets will be in the new format.

Keyed packets are disabled by factory default.

Keyed packets are discussed in Chapter 5.

Low Power ('L','l')

During times when processing in the controller is minimal (no touch and no communications in progress), the controller can enter a Lower Power Mode. Upon receipt of data from the host or the event of a touch, the controller exits this mode and normal processing continues until the next idle period. Low Power Mode is useful with battery-powered computers.

The least significant bit of the Enable byte is 1 for Low Power Mode or 0 for normal mode.

Low Power Mode is disabled by factory default.

Mode ('M','m')

The Mode command offers two methods of setting the various operating modes. The binary method uses two bitmapped bytes to set the mode. The binary method is indicated by the presence of a null byte in position 1. The ASCII method uses a string of ASCII letters to set the mode, useful if the controller is connected to a terminal for evaluation purposes. Modes are discussed in the tutorial in Chapter 4.

The Mode1 byte has the following bit positions, corresponding to bit positions in the Status byte in the Touch packet.

Bit

Function

Description

0

Initial Touch Mode

If 1, a Touch packet will be transmitted on initial touch. Bit 0 in the Status byte of the Touch packet will be set indicating an Initial touch.

1

Stream Mode

If 1, Touch packets will be transmitted continuously while the touchscreen is being touched. Bit 1 in the Status byte of the Touch packet will be set indicating Stream touches. When Stream Mode is disabled, the controller is in Single-Point Mode.

2

Untouch Mode

If 1, a Touch packet will be transmitted on untouch (release). Bit 2 in the Status byte of the Touch packet will be set indicating an Untouch.

3

Reserved

4

Warning Pending

If 1, an Acknowledge query should be issued to receive non-command-related warning(s). This bit is only valid on a Mode query.

5

Reserved

6

Range Checking

If 1, Range Checking Mode is enabled. Bit 6 in the Status byte of the Touch packet will be set indicating a touch is outside the calibration points. Calibration Mode must also be enabled (bit 2 of Mode2 below) and Calibration Points set with the Calibration command. Range Checking Mode is typically combined with Trim Mode (bit 1 of Mode2 below). (Range Checking is not supported on the 2500S controller.)

7

Z-axis Enabled

If 1, Z-axis is Enabled, 0 for Disable. On AccuTouch controllers, Z-axis is always reported at maximum. 1 is the default for all controllers.

The Mode2 byte has the following bit positions:

Bit

Function

Description

0

Reserved

1

Trim Mode

If 1, Trim Mode is enabled. Touches outside the calibration points will have their coordinates adjusted to the edge of the calibrated area. This mode effectively expands all touch zones on the edge of the image to include the associated overscan area. Trim Mode requires Range Checking Mode to be enabled (bit 6 of Mode1 above).

2

Calibration Mode

If 1, Calibration Mode is enabled. Touch coordinates will be mapped to the display image using the calibration points acquired at the edges of the image. Coordinates will be scaled 0-4095 by default within the calibrated area unless Scaling Mode (bit 3 below) is also enabled and other Scaling Points defined. Coordinates will be scaled beyond these ranges if a touch is outside the calibration points and Trim Mode is disabled. Calibration Points must set with the Calibration command.

3

Scaling Mode

If 1, Scaling Mode is enabled. Touch coordinates will be scaled to the signed ranges specified with the Scaling command. If Scaling Mode is disabled, coordinates will be scaled 0-4095 by default. Scaling Mode is typically used with Calibration Mode. Scaling Mode may be used without Calibration Mode to emulate coordinate ranges returned by other controllers.

4

Reserved

5

Reserved

6

Tracking Mode

If 1, Tracking Mode is enabled. In Tracking Mode, Stream touches which repeat the same coordinate will not be transmitted to the host. This mode is only useful if coordinate scaling is set below the natural variation of coordinates for a constant touch. Tracking Mode requires Stream Mode (bit 1 of Mode1 above). (Tracking Mode is not supported on the 2500S controller.)

7

Reserved

The controller modes may also be configured with an ASCII packet (not supported on current controllers). XXXXXX represents any of the following values in string form.

'I' Report Initial Touches
'S' Report Stream Touches
'U' Report Untouches
'T' Enable Tracking Mode
'P' Enable Trim Mode
'C' Enable Calibration (automatic if 'P' selected)
'M' Enable Scaling
'B' Enable Range Checking (automatic if 'P' selected)

If an invalid character is present in the string, the remainder of the string is ignored.

When the ASCII version of the Mode command is received, it starts by disabling all modes and reporting options. The ASCII codes that follow then enable the specified modes and reporting options. Because the XXXXXXX string may be a maximum of 7 characters, and more than 7 modes are available, the 'P' character also enables the Calibration and Range Checking Modes.

If the Initial Touch, Stream, and Untouch Modes are disabled, no Touch packets will be transmitted unless a Touch query is issued. See Touch command.

The factory default mode has Initial Touches, Stream Touches, and Untouches enabled. The Single-Point Mode jumper (J4) disables Stream Touches and Untouches when installed.

Nonvolatile RAM ('N')

Power-on defaults are from NVRAM if the J7 jumper is installed. The use of NVRAM is discussed in Chapter 2 and in Chapter 4-SmartSet Tutorial.

The least significant bit of the Direction byte is 1 to save the settings in NVRAM, or 0 to restore the settings from NVRAM.

The Areas byte has the following bit positions:

Bit

Area

0

Setup Area

1

Calibration

2

Scaling

The Setup Area consists of all parameters except the Calibration and Scaling parameters. All three areas may be saved or restored in any combination by setting the appropriate bits.

The least significant bit of the Page byte is 0 for the primary area, or 1 for the secondary area. The Page is only required if setting the Calibration or Scaling parameters, as the controller only has one Setup Area.

Factory default settings in NVRAM are given in each command description.

Owner ('o')

The factory default value is shown above.

Parameter ('P','p')

When the parameters are set with this command, the Acknowledge packet is returned using the new communication parameters. Therefore, the host communication parameters must be changed immediately after issuing the Parameter command.

The IO byte indicates the type of communication interface that is in use by the controller as follows: an ASCII '0' for serial, '1' for PC-Bus, '2' for Micro Channel, '3' for ADB, and '4' for USB. The IO cannot be changed. On a set command, it must reflect the actual interface being used.

PC-Bus and Micro Channel Controllers

The Bus1 byte specifies the Interrupt number (IRQ) to use for bus communications. A value of zero indicates Polled Mode.

The Bus2 integer specifies the Base I/O Port address for the controller. The Base I/O Port address is always on an 8 byte boundary.

The factory defaults for PC-Bus controllers when booting from NVRAM are Base I/O Port 280h and no Interrupt (polled). These defaults may be overridden if the controller boots from jumper settings.

The Base I/O Port and Interrupt for Micro Channel controllers are selected by the System Configuration routine on the IBM Reference Disk.

Serial Controllers

(The 2500S controller does not support any of the following communication parameter changes other than 9600 and 19200 baud settings.)

The Ser1 byte has the following bit definitions:

Bit

Description

0

Baud Rate (see table below)

1

Baud Rate (see table below)

2

Baud Rate (see table below)

3

0 = 8 bit data, 1 = 7 bit data

4

0 = 1 stop bit, 1 = 2 stop bits

5

1 = parity enabled as per bits 6 7

6

Parity Type (see table below)

7

Parity Type (see table below)

The Ser2 byte has the following bit definitions:

Bit

Description

0

1 = Checksum required

1

1 = Software Handshaking enabled

2

1 = Hardware Handshaking enabled

3

1 = Invert Hardware Handshaking

4

Reserved

5

Reserved

6

Reserved

7

1 = Full Duplex (echo enabled)

Bits

Baud Rate

000

300

001

600

010

1200

011

2400

100

4800

101

9600

110

19200

111

38400 (E271-2200 only)

Bits

Parity Type

00

Even

01

Odd

10

Space

11

Mark

Checksum Bit

If the Checksum Bit is 0, the controller does not check the validity of received commands. If the Checksum Bit is 1, and the Checksum is incorrect in a received command, error code '3' will be returned in the Acknowledge packet. Checksums are always calculated and transmitted by the controller to the host. The host may choose to ignore the Checksum or request the controller to retransmit corrupted packets. See Checksum Byte.

Software Handshaking Bit

If the Software Handshaking Bit is 1, the controller will recognize the software flow control convention of XON/XOFF (ASCII 'Control Q' and 'Control S').

If the Software Handshaking Bit is 0, software flow control is disabled. The controller will not send ^S/^Q characters, and ^S/^Q characters received by the controller outside a packet will generate an error.

Software Handshaking is disabled by factory default. For more information, see Software Handshaking.

Hardware Handshaking Bit

If the Hardware Handshaking Bit is 1, the controller will support hardware handshake signals typically implemented in EIA RS-232 communications.

Hardware Handshaking is enabled by factory default. To ease troubleshooting of the initial installation, jumper J3 can be installed to force the controller to ignore Hardware Handshaking. For more information, see Hardware Handshaking.

Invert Hardware Handshaking Bit

If the Invert Hardware Handshaking Bit is 1, the senses of the handshaking signals are inverted (except DSR). This feature is provided as a tool for use in installations where the controller may be forced to share a serial link with another device.

Hardware Handshaking is not inverted by factory default.

Full-Duplex Bit

If the Full-Duplex Bit is 1, each character sent to the controller is echoed. When Half-Duplex Mode is selected (Full-Duplex Bit is 0), the controller does not retransmit each received character.

The factory default is Half-Duplex. For more information, see Duplex.

Other Communication Parameters

Setting the controller to 7-Bit Mode will make many commands unusable. As the SmartSet command set requires 8-bit binary data, 7-Bit Mode can only be used when the controller is in a Partial Emulation Mode and is transmitting ASCII data.

The total number of serial bits must be between 7 and 10 inclusive. For example, 8 Data Bits, 2 Stop Bits, and Even Parity is illegal.

The factory defaults for serial controllers when booting from NVRAM are 9600 Baud, 8 Data Bits, 1 Stop Bit, No Parity, normal Hardware Handshaking enabled, Software Handshaking disabled, Half Duplex, and correct Checksum not required. The Baud Rate and Hardware Handshaking options may be overridden if the controller boots from jumper settings.

Quiet ('Q','q')

The QMask byte specifies what packet types are to be enabled or Quieted (disabled from automatic reporting). The QMask byte has the following bit positions:

Bit

Function

0

Set to Quiet all outputs. In this mode, commands are not acknowledged but are processed. Commands cannot be queried either.

A Quiet-all command is not followed by an Acknowledge packet. With serial controllers, the host must wait for CTS to be asserted before sending another command. On PC-Bus and Micro Channel controllers, the Base I/O Port is 80h while the reset is being performed. The host must poll the Base I/O Port for C1h (ASCII 'A' plus the Not Ready Bit) before sending another command.

A Quiet-all command should be issued when finished using the E271-2202 Micro Channel controller so others may locate and use it through the POS registers. See BUS.C.

1

Set to Quiet Timer packets.

2

Set to Quiet Touch reports. No touch detection occurs, conserving power.

Touch and Timer packets are Quieted by factory default on PC-Bus and Micro Channel controllers. This prevents bus controllers from generating interrupts before the host software is ready to accept them.

Touch and Timer packets are not Quieted by factory default on serial SmartSet controllers. This allows serial controllers to be used with one-way communication only.

Reset ('R')

RType is one of the ASCII values '0', '1'and '2' and is used to specify the type of reset to use. If RType is '0' then a "hard" reset (cold boot) will occur. If RType is '1' then a "soft" reset (warm boot) will occur. Additionally on the 2500S controller, if RType is '2', then a hard reset occurs, and the NVRAM is reset to its default values (the internal serial number is not modified).

A Hard Reset causes the controller to reboot according to either the jumpers or the NVRAM, with AccuTouch controllers depending on the state of the setup jumper J7. Any software setup information in the controller which has not been saved to NVRAM will be lost.

On the AccuTouch controllers, a Soft Reset merely restarts the firmware and clears the output buffer. No diagnostics are run and no controller parameters are affected.

On the 2500S controller, a Soft Reset works like a Hard Reset with the exception that the diagnostics are not run. Any software setup information in the controller which has not been saved to NVRAM will be lost.

The 'R0' and 'R2' commands are not followed by an Acknowledge packet. With serial controllers, the host must wait for CTS to be asserted before sending another command. This may take about 5 seconds. On PC-Bus and Micro Channel controllers, the Base I/O Port is 80h while the reset is being performed. The host must poll the Base I/O Port for C1h (ASCII 'A' plus the Not Ready Bit) before sending another command.

Scaling ('S','s')

Scaling is discussed in the tutorial in Chapter 4, and an example is given in Chapter 5.

The Scaling command has several functions:

Setting the Scaling Points from the Host

Scaling is accomplished by the host transmitting a range of coordinates, typically equivalent to the display resolution. These coordinates are then converted by the controller into an internal Offset, Numerator, and Denominator format.

AXIS specifies the coordinate axis to be scaled by using upper-case ASCII characters 'X','Y', or 'Z'.

LowPoint and HighPoint are signed integers specifying an axis range. For example, if two scaling points are specified as (XLow,YLow) and (XHigh,YHigh), LowPoint = XLow and HighPoint = XHigh for the X-axis. If a HighPoint value is greater than a LowPoint value, software axis inversion is performed.

Querying the Scaling Parameters

axis specifies the coordinate axis by using lower-case ASCII characters 'x','y', or 'z'. Scaling parameters are returned in the controller's internal Offset, Numerator, and Denominator format. These values can be saved and later restored directly in this format.

Note there is no way to directly query the LowPoint and HighPoint values. These values can be calculated by the following formulas:

LowPoint = Offset

HighPoint = LowPoint + Numerator

Setting the Scaling Parameters as Offset, Numerator, and Denominator

This command is used to restore scaling parameters previously queried from the controller.

axis specifies the coordinate axis to be scaled by using lower-case ASCII characters 'x','y', or 'z'.

Z-Axis Scaling

On AccuTouch touchscreen controllers, Z-axis scaling is typically not required as no Z data is available. The controller defaults to 0-255, but always returns the HighPoint value.

Z-axis scaling is supported on the IntelliTouch 2500S controller.

Setting or Querying the Invert Axes Flags

Axes may be inverted by using these flags, or preferably, by swapping the LowPoint and HighPoint scaling values.

IMask is a byte value where the least significant 3 bits specify which axes to invert as follows:

Bit

Axis

0

Invert X Axis

1

Invert Y Axis

2

Invert Z Axis

Scaling and Axis Inversion are disabled by factory default.

Touch ('t')

(The query function is not supported on the 2500S controller.)

On serial controllers, the response may be altered if Partial Emulation is selected with the Emulate command.

Touch packets are generated automatically if Touch Reporting is enabled with the Quiet command. This is the default with serial controllers.

If automatic touch reporting is disabled by disabling Initial Touch, Stream, and Untouch Modes (see Mode command), the Touch command may be used to query for touch data. This feature is used primarily with multiple serial controllers sharing a serial line with keyed packets. See Key Byte.

The coordinates of the touch are signed numbers reported in the X, Y, and Z integers. The Z coordinate is always set to the maximum Calibration or Scaling value (default is 255).

The Status byte has the following bit positions. Touch packets will only be transmitted with the various bits set if the corresponding mode is enabled with the Mode command.

Bit

Status

Description

0

Initial Touch

If 1, the Touch packet is for an Initial touch. Initial Touch Mode is enabled by bit 0 in the Mode1 byte of the Mode command.

1

Stream Touch

If 1, the Touch packet is for a Stream touch, a coordinate transmitted continuously while the touchscreen is being touched. Stream Mode is enabled by bit 1 in the Mode1 byte of the Mode command.

2

Untouch

If 1, the Touch packet is for the point of untouch (when the finger is lifted). Untouch Mode is enabled by bit 2 in the Mode1 byte of the Mode command.

3

Reserved

4

Warning(s) Pending

If 1, an Acknowledge query should be issued to receive non-command-related warning(s).

5

Reserved

6

Out of Range

If 1, the Touch packet is outside the Calibration Points. Range Checking Mode is enabled by bit 6 in the Mode1 byte of the Mode command. (Range Checking is not supported on the 2500S controller.)

7

Z-axis Supported

If 1, the Z coordinate is measured, not simulated at the maximum value.