Appendix A

Optional Software Protocols

E271-2210 Controller

SmartSet ASCII Mode
E271-140 and E281A-4002 Emulation
Binary Output Data
ASCII Output Data
E261-280 Emulation
Output Formats
Software Setup

2500S Controller

E281A-4002 Emulation

E271-2201 Controller

E271-141 Emulation
I/O Port Assignments
Coordinate Data Format
Polled vs. Interrupt Mode
Polling Considerations
Polled Programming Example

E271-2210 CONTROLLER

The E271-2210 controller can be jumpered or configured with software setup for optional software protocols. Emulation can be full or partial.

If J2 is jumpered for ASCII Mode, the standard Touch packet is replaced with the SmartSet ASCII Mode packet, described in the following section. All other communication remains the same.

If J10 and J11 are jumpered to select an Emulation Mode, (full emulation), the controller will no longer respond to the SmartSet protocol. (See this section in chapter 2.) When emulating the AccuTouch E271-140, IntelliTouch E281A-4002 controller, or the DuraTouch E261-280 controller, only one-way communication is possible.

When E271-140 emulation is jumpered, the TouchFlag in the Emulate command is forced to 0. When E281A-4002 emulation is jumpered, Z-axis scaling is enabled, with a constant value of 15 being returned. When E261-280 emulation is jumpered, the scaling range is set to 2-255, and Scaling, Range Checking, and Trim Modes are enabled. All other jumpers and NVRAM settings, (except the Key byte), remain available within each emulation mode.

The controllers may also be programmed through software setup for Output Format Emulation (partial emulation). In this mode, the controller will still respond to the SmartSet protocol, but the Touch packet will be replaced with a packet defined by the selected output format. See the Emulate command for details on selecting the output format.

Emulation modes are only documented here for purposes of completeness. It is not recommended that new applications use an emulation mode, as the controller being emulated may no longer be manufactured by Elo. Backwards compatibility can not be guaranteed indefinitely.

In the following sections describing each protocol, jumper settings are given followed by the equivalent TouchFlag and Format values for the Emulate command. For example, J2-Y, J10-N, J11-N; 0/1,5.

SmartSet ASCII Mode

J2-Y, J10-N, J11-N; 0/1,5

In this mode, coordinate data is formatted as three ASCII decimal numbers for X, Y, and Z. The range of the coordinates is determined by the calibration and scaling options of the controller. Coordinate values of less than 1000 are padded with leading zeroes so each number will have at least four digits. Scaling may require the addition of an additional digit for values greater than 9999. Scaling may also add a leading minus sign ("-"). Plus signs are suppressed.

The Z coordinate is followed by an optional status indicator. A "T" indicates initial or stream touch, a "U" indicates untouch. In the example below, optional characters are underlined.

<->XXXXX<space><->YYYYY<space><->ZZZZZ<space><T|U><CR><LF>

E271-140 and E281A-4002 Emulation
Binary Output Data

Transmission of a single touch packet in Binary Mode requires 4 bytes, or 6 bytes if Z data is enabled in E281A-4002 mode. The beginning of a packet is uniquely identified by the two most significant bits being 1.

Z-Data Disabled (E271-140 Mode) J2-N, J10-Y, J11-N; 0,0

Byte

MSB

LSB

1

1

1

X11

X10

X9

X8

X7

X6

2

1

0

X5

X4

X3

X2

X1

X0

3

0

1

Y11

Y10

Y9

Y8

Y7

Y6

4

0

0

Y5

Y4

Y3

Y2

Y1

Y0

Z-Data Enabled (E281A-4002 Mode) J2-N, J10-N, J11-Y; 0/1,6

Byte

MSB

LSB

1

1

1

X11

X10

X9

X8

X7

X6

2

1

0

X5

X4

X3

X2

X1

X0

3

0

1

Y11

Y10

Y9

Y8

Y7

Y6

4

0

0

Y5

Y4

Y3

Y2

Y1

Y0

5

0

0

Z11

Z10

Z9

Z8

Z7

Z6

6

0

Z5

Z4

Z3

Z2

Z1

Z0

Since the Z coordinate is only a 4-bit number, bit positions Z11-Z4 will be 0. This includes all of byte 5.

If jumpered for E281A-4002 emulation mode, or TouchFlag is 1, the Z value will be zero on untouch.

After a driver receives a complete packet, it typically masks off the upper two bits by logically ANDing each byte with 3Fh, shifts the most significant byte of each coordinate left 6 bits, then ORs it with the least significant byte.

ASCII Output Data

Transmission of a single touch packet in ASCII Mode requires 11 bytes, or 16 bytes if Z data is enabled. The packet is identified by leading carriage return and line feed characters. The coordinates are separated by a space character. The coordinate range may be for 0 to 9999.

Z Data Disabled without Untouch Flag (E271-140 Mode)

J2-Y, J10-Y, J11-N; 0,1

<CR><LF>XXXX YYYY

Z Data Disabled with Untouch Flag (E271-140 Mode) N/A; 1,1

<CR><LF>XXXX YYYY <T|U>

Z Data Enabled without Untouch Flag (E281-4002 Mode) N/A; 0,7

<CR><LF>XXXX YYYY ZZZZ

Z Data Enabled with Untouch Flag (E281A-4002 Mode)

J2-Y, J10-N, J11-Y; 1,7

<CR><LF>XXXX YYYY ZZZZ

The Z value is zero on untouch.

E261-280 Emulation
Output Formats

The E271-2210 controller supports a variety of E261-280 output formats, including ASCII or Binary, Single-Point or Stream Mode, and untouch reporting. The default depends on the Output Format and Mode jumpers, J2 and J4 respectively. The Untouch Flag is included by default.

Software Setup

The E271-2210 SmartSet controller does not support software setup when in E261-280 emulation mode.

2500S Controller

E281A-4002 Emulation

The 2500S controller can be jumpered for emulation of the E281A-4002 controller with J2 in Binary Mode with Z data enabled. Click here for details of the protocol. In Emulation Mode, the controller will no longer respond to the SmartSet protocol.

E271-2201 Controller

When selecting an Emulation Mode, all other jumpers and NVRAM settings are still available.

E271-141 Emulation
I/O Port Assignments

When in emulation mode, the E271-2201 only has four registers available for communication with the host processor. Each register is addressed by its offset from the Base I/O Port address as selected by jumpers J0 and J1 (see Selecting the Base I/O Port). The functions and formats of these registers are defined below:

Base Port

8-Bit Mode Contains the X coordinate

12-Bit Mode Contains the high-order byte of the X or Y coordinate

Base Port+1

8-Bit Mode Contains the Y coordinate

12-Bit Mode Contains the low-order byte of the X or Y coordinate

Base Port+2

Contains controller status as defined below:

Bit

Hex

 
 

0

01

1=8-Bit Mode

0=12-Bit Mode

1

02

always 0

2

04

1=Stream Mode

0=Single-Point Mode

3

08

always 0

4

10

always 0

5

20

always 0

6

40

1=X data

0=Y data

7

80

1= data ready

0= not ready

Base Port+3

Coordinate Data Format

The coordinate data is formatted as follows:

 

8-Bit Mode

two-byte transfer

Base Port XXXX XXXX X coordinate data

Base Port+1 YYYY YYYY Y coordinate data

12-Bit Mode

first two-byte transfer

Base Port XXXX XXXX X high order byte

Base Port+1 XXXX 0000 X low order byte

second two-byte transfer

Base Port YYYY YYYY Y high order byte

Base Port+1 YYYY 0000 Y low order byte

 

Note

The 8-bit data is the same as the highest-order 8 bits of the 12-bit data.

Polled vs. Interrupt Mode

The host processing can be performed by polling the controller or by using interrupts when in E271-141 emulation mode. Polling consists of constantly checking the status of the controller for data to become ready, and then retrieving that data. Polled or Interrupt Mode is selected by jumpers J2 and J3 (see Selecting the Interrupt (IRQ)).

Polling Considerations

In Polled Mode, bit 7 (data ready) of the emulated status register (see page 116) must be checked continuously. If it is a 1, the data registers contain the coordinates of a touch and can be read. If it is a 0, no data is ready.

Bit 0 of the status register indicates whether the controller is in 8 or 12-Bit Mode. A 1 indicates 8-Bit Mode; a 0 indicates 12-Bit Mode.

In 8-Bit Mode, a single two-byte transfer will read both the X and Y coordinates. The application program must read X before Y because reading Y signals the controller to transmit new data as soon as it becomes available.

In 12-Bit Mode, two separate two-byte transfers are required to read the X and Y coordinates. The first two-byte transfer returns the high and low-order bytes of X. You must poll a second time to obtain the second two-byte transfer, which returns the high and low-order bytes of Y. Bit 6 of the status register indicates whether X or Y is being read. If bit 6 is 1, it is X data; if it is 0, Y data. In both cases, you must read the high-order byte before the low-order byte because reading the low-order byte signals the controller to transmit new data as soon as it becomes available.

Polled Programming Example

The following program polls the E271-2201 controller in E271-141 emulation mode. The code supports both 8 and 12-Bit Modes.

Here is typical output:

C:>bpgettch
Touch screen for polled coordinate output.
Press any key to abort...
X=1408 Y=1104
X=1424 Y=1120
X=1424 Y=1136
X=1440 Y=1152
X=1456 Y=1152
X=1456 Y=1136
X=1440 Y=1120
X=1424 Y=1136
X=1408 Y=1120
X=1408 Y=1136
X=1424 Y=1152

And here is the program: