Model 600 GPIO Support

The function of the TransEra Model 600 General Purpose Input Output (GPIO) interface card is to provide a means of communication between a peripheral device and a computer.

Card Defaults
Base Address 380h
Interrupt 5

General Setup


The Model 600 card has three switches that are set to configure the card. An understanding of the GPIO interface is necessary to properly set the switches. If you have not previously used the GPIO interface please study the Interface Description section before proceeding with the installation. Switches labeled RES are reserved. The switch is ON when it is toward the PC board and OFF when it is away from the board.

I/O Address - Switch 1
This switch is used to select the I/O address of the board. The I/O address selected by this switch is the base address that the computer uses to communicate with the board. The GPIO board uses 16 address locations above the base address. The address space of the GPIO board cannot be used by any other peripheral. The default address of the GPIO board is 380h.

The following table shows the switch settings with the corresponding hexadecimal board address.

Address Selection for Model 600
Switches
I/O Address
Switches
I/O Address
A10 A4
(hex)
A10 A4
(hex)
0 0 0 0 0 0 0
0 0 0
0 1 0 0 0 0 0
2 0 0
0 0 0 0 0 0 1
0 1 0
0 1 0 0 0 0 1
2 1 0
0 0 0 0 0 1 0
0 2 0
0 1 0 0 0 1 0
2 2 0
0 0 0 0 0 1 1
0 3 0
0 1 0 0 0 1 1
2 3 0
0 0 0 0 1 0 0
0 4 0
0 1 0 0 1 0 0
2 4 0
0 0 0 0 1 0 1
0 5 0
0 1 0 0 1 0 1
2 5 0
0 0 0 0 1 1 0
0 6 0
0 1 0 0 1 1 0
2 6 0
0 0 0 0 1 1 1
0 7 0
0 1 0 0 1 1 1
2 7 0
0 0 0 1 0 0 0
0 8 0
0 1 0 1 0 0 0
2 8 0
0 0 0 1 0 0 1
0 9 0
0 1 0 1 0 0 1
2 9 0
0 0 0 1 0 1 0
0 A 0
0 1 0 1 0 1 0
2 A 0
0 0 0 1 0 1 1
0 B 0
0 1 0 1 0 1 1
2 B 0
0 0 0 1 1 0 0
0 C 0
0 1 0 1 1 0 0
2 C 0
0 0 0 1 1 0 1
0 D 0
0 1 0 1 1 0 1
2 D 0
0 0 0 1 1 1 0
0 E 0
0 1 0 1 1 1 0
2 E 0
0 0 0 1 1 1 1
0 F 0
0 1 0 1 1 1 1
2 F 0
0 0 1 0 0 0 0
1 0 0
0 1 1 0 0 0 0
3 0 0
0 0 1 0 0 0 1
1 1 0
0 1 1 0 0 0 1
3 1 0
0 0 1 0 0 1 0
1 2 0
0 1 1 0 0 1 0
3 2 0
0 0 1 0 0 1 1
1 3 0
0 1 1 0 0 1 1
3 3 0
0 0 1 0 1 0 0
1 4 0
0 1 1 0 1 0 0
3 4 0
0 0 1 0 1 0 1
1 5 0
0 1 1 0 1 0 1
3 5 0
0 0 1 0 1 1 0
1 6 0
0 1 1 0 1 1 0
3 6 0
0 0 1 0 1 1 1
1 7 0
0 1 1 0 1 1 1
3 7 0
0 0 1 1 0 0 0
1 8 0
0 1 1 1 0 0 0
3 8 0
0 0 1 1 0 0 1
1 9 0
0 1 1 1 0 0 1
3 9 0
0 0 1 1 0 1 0
1 A 0
0 1 1 1 0 1 0
3 A 0
0 0 1 1 0 1 1
1 B 0
0 1 1 1 0 1 1
3 B 0
0 0 1 1 1 0 0
1 C 0
0 1 1 1 1 0 0
3 C 0
0 0 1 1 1 0 1
1 D 0
0 1 1 1 1 0 1
3 D 0
0 0 1 1 1 1 0
1 E 0
0 1 1 1 1 1 0
3 E 0
0 0 1 1 1 1 1
1 F 0
0 1 1 1 1 1 1
3 F 0

I/O Address
The default I/O address for the Model 900 card is &H02B8. Addresses in the range &H02A0 to &H02BF are used. If these addresses conflict with other hardware installed in your computer, the address can be changed. It can be set to any address between &H0018 - &H03F8, in increments of &H20. The board uses 24 I/O addresses below and 8 above the specified address. This range is listed as the Address Range in the table below:


I/O Address Table

Chip
Switch Number
Address
Address
7
6
5
4
3
2
1
Range
18
on
on
on
on
on
on
on
000-01F
38
on
on
on
on
on
on
off
020-03F
58
on
on
on
on
on
off
on
040-05F
78
on
on
on
on
on
off
off
060-07F
98
on
on
on
on
off
on
on
080-09F
0B8
on
on
on
on
off
on
off
0A0-0BF
0D8
on
on
on
on
off
off
on
0C0-0DF
0F8
on
on
on
on
off
off
off
0E0-0FF
118
on
on
on
off
on
on
on
100-11F
138
on
on
on
off
on
on
off
120-13F
158
on
on
on
off
on
off
on
140-15F
178
on
on
on
off
on
off
off
160-17F
198
on
on
on
off
off
on
on
180-19F
1B8
on
on
on
off
off
on
off
1A0-1BF
1D8
on
on
on
off
off
off
on
1C0-1DF
1F8
on
on
on
off
off
off
off
1E0-1FF
218
on
on
off
on
on
on
on
200-21F
238
on
on
off
on
on
on
off
220-23F
258
on
on
off
on
on
off
on
240-25F
278
on
on
off
on
on
off
off
260-27F
298
on
on
off
on
off
on
on
280-29F
2B8
on
on
off
on
off
on
off
2A0-2BF
2D8
on
on
off
on
off
off
on
2C0-2DF
2F8
on
on
off
on
off
off
off
2E0-2FF
318
on
on
off
off
on
on
on
300-31F
338
on
on
off
off
on
on
off
320-33F
358
on
on
off
off
on
off
on
340-35F
378
on
on
off
off
on
off
off
360-37F
398
on
on
off
off
off
on
on
380-39F
3B8
on
on
off
off
off
on
off
3A0-3BF
3D8
on
on
off
off
off
off
on
3C0-3DF
3F8
on
on
off
off
off
off
off
3E0-3FF

If you change the I/O address, you must inform the software that uses the board. If you are using HTBasic, specify the new address in the LOAD BIN statement:

LOAD BIN "GPIO;BASE 3F0"

Interrupt Jumper
The Model 600 supports interrupts 2 through 7. The default interrupt is 5. Install the shorting block on the pins that corresponds to the desired interrupt number.

You may use another interrupt if it is not being used by another device. Move the jumper and inform the software using the board. If you are using HTBasic, you specify the interrupt in the LOAD BIN option. For example, to use interrupt 3, you would place the jumper on Interrupt 3 and use the following LOAD BIN statement in your AUTOST file:

LOAD BIN "GPIO;INT 3"

DOUT Clear Jumper
If the DOUT Clear jumper is set, the output data lines will be set low after a board reset. The location of the DOUT Clear jumper can be seen on the board diagram at the start of this section.

Model 600 Switch Two - Interface Settings
This switch selects the signal polarity and the type of handshaking that will be used. The chart below shows the switch settings for handshaking and polarity.

Name of Switch Position
PCTL PFLG PSTS HND DIN DOUT RES
Function Set Set Set Full/Pulse Set Set
Polarity of Polarity of Polarity of Handshake Polarity of Polarity of Reserved
PCTL PFLG PSTS Data In Data Out
ON Low = Set Low = Rdy Low = OK Full Low = 1 Low = 1
High = Clr High = Bsy High = OK High = 0 High = 0
OFF Low = Clr Low = Bsy Low = OK Pulse Low = 0 Low = 0
High = Set High = Rdy High = OK High = 1 High = 1


Model 600 Switch Three - Input Clock Source
This switch selects the latch source that will clock the data into the input data buffers. The switch for the desired clock should be off with the other two on. The clocks for the high and low bytes do not need to be the same.

The RD clock source causes the computer to clock the input buffers whenever it is reading the data. The BSY clock source causes the input buffers to be loaded on the ready-to-busy transition of PFLG. The RDY clock source uses the busy-to-ready transition of PFLG.

For more information on GPIO input clocking, refer to the Interface Description section for a more detailed explanation.

GPIO Driver for the Model 600

The driver is loaded by including a line like the following in your AUTOST file:

LOAD BIN "driver;options"

If the card was installed using the default settings, the driver is loaded by simply typing:

LOAD BIN "GPIO"

This loads the driver for a Model 600 board at base address 0x380, ISC 12 and interrupt 5. If any of the settings have been changed on the board then these will have to be reflected in the options of the LOAD BIN command. The legal options for the GPIO driver are:

BASE address
INTERRUPT I
ISC n

One or more options can be specified, and each are separated by a space. The option may be abbreviated as long as the abbreviation is unique.

BASE Option
The address set with the I/O Address switch must match the BASE address value used for LOAD BIN. If these do not agree, the LOAD BIN statement will return a device not found error.

An example of a LOAD BIN statement for a Model 600 card set to address 2F0h is:

LOAD BIN "GPIO;BASE 2C0"

INTERRUPT Option
Interrupts may be disabled by using a 0 as the interrupt value. If interrupts are disabled, the board will not support TRANSFER commands and ENTER and OUTPUT commands could be slower.

Extending the example above, suppose the same board was also set with IRQ jumpers to 6. The LOAD BIN statement would appear as follows:

LOAD BIN "GPIO;BASE 2C0 INT 6"

ISC Option
The default ISC for the GPIO board is 12. This is the same ISC number assigned to the second parallel port. If the computer has a second parallel port the ISC of the GPIO board should be changed.

To change the ISC on the board from the default 12 to 17:

LOAD BIN "GPIO;BASE 2C0 INT 6 ISC 17"

Troubleshooting

"Error 167":
Loading the GPIO drivers is the most common error returned when using the LOAD BIN statement to load HTBasic drivers. Fortunately, the cause of the error is almost always the same: disagreement between driver parameters and actual card settings.

Nine times out of ten , when fielding this call, the answer is found in a discrepancy between the BASE and INT values loaded in the LOAD BIN statement and the BASE and INT values setup on the card (jumper switches or software settings).

To properly deduce the source of " Error 167," check the following areas.

  1. Determine the base address setting and interrupt setting on the card itself.
  2. Make sure that these values agree with those specified in the LOAD BIN statement.

If the value of the jumper switches on the card were set to a base address of 2B8 and an interrupt of 5, you would need to assure that the LOAD BIN statement agrees. For example:

LOAD BIN "GPIO;BASE 380 INT 5"

  1. Make sure that no other hardware devices in your computer are set to use this same interrupt.

(Note: On most new motherboards, Interrupt 2 is taken by the motherboard so do not use it. Other major offenders of conflicts are network and video cards)

IRQ Conflict with Plug & Play

If your plug and play Windows is using the interrupt or base address you would like your Model 600 card to use, you must reserve these resources for the card from inside of Windows. To reserve resources, go to the System Control Panel, then get the properties of the Computer. Then, click on the Reserve Resources Tab. You may now add the resources that you want to assign to the Model 600 card. It is best to check the View Resources Tab first to find possible available resources. If you find available resources, you will not necessarily have to reserve them. Once these resources are reserved, other plug & play devices will find other available resources, leaving your 600 card's resources for you to assign from HTBasic. Note that Windows 9x will not recognize your Model 600 card, however, HTBasic will.

Installation

Before installing the board into the machine, check the IRQ and address settings on the card. It is necessary to check that these settings will be compatible with the systems resource settings. See the previous section "IRQ Conflict with Plug & Play" to learn how to avoid this problem.

Physically install the board by doing the following:

  1. Turn off and unplug the computer.
  2. Remove the computer cover.
  3. Locate an empty slot and take off the slot cover by removing the screw.
  4. Eliminate any static electricity by touching the metal computer case.
  5. Remove the GPIO board from the static protection pouch and insert it into the selected slot. The board should be handled by its edges only.
  6. Replace the screw to hold the board in place.
  7. Replace the computer cover.

Multiple GPIO Cards

Any combination of up to four GPIO interfaces may be active at one time. Each GPIO interface is associated with an Interface Select Code (ISC) by the LOAD BIN command. To use more than one GPIO interface, each interface must have a unique ISC, BASE address, and IRQ. Therefore, a separate LOAD BIN command is required for each interface. However, you cannot use the same driver file name in more than one LOAD BIN command.

To use more than one GPIO interface that uses the same driver, you must load copies of the driver with altered names. Here is an example that uses one GPIO card with ISC 12 and a second card with ISC 13.

  1. Before installing the boards in the machine, the jumper settings must be changed. Examine the system settings to determine if there will be any resource conflicts and adjust switches and jumpers accordingly. In this example, we will set the GPIO board with ISC 12 to address 2F0h and leave the default IRQ 5. The GPIO board with ISC 13 will be set to address 310h and IRQ 7. See the section above entitled "General Setup" for more information on changing the board settings. Once the hardware is set to be compatible with the system, the card may be physically installed into the computer.

  2. Next, a second copy of the GPIO driver will need to be made. Open the HTBasic folder. By default the installation process copies this directory to c:\HTBWIN or c:\Program Files\HTBWIN. Make a copy of the GPIO driver and rename the new copy. The copy can have any arbitrary base name but must end with the .DW6 suffix, i.e.,

GPIO2.DW6

You now have two copies of the same driver named GPIO.DW6 and GPIO2.DW6.

  1. Finally, run HTBasic for Windows. To load the device drivers, add the following lines to the AUTOST file. Notice that each LOAD BIN statement reflects the settings that were changed in step 1 above.

LOAD BIN "GPIO; ISC 12 BASE 2F0"
LOAD BIN "GPIO2; ISC 13 BASE 310 INT 7"

Differences Between Model 600 and Model 650

The Model 600 and 650 are both designed to provide the same interface for communication with digital peripherals. All interaction with the peripherals are essentially the same. The differences come from the interaction between the GPIO board and the host computer. There are also some configuration differences.

The Model 650 has a 16-bit interface with the host computer and can use DMA to transfer data. The Model 600 uses an 8-bit interface and does not support DMA. The wider data path and the available DMA can allow the Model 650, using fast peripherals, to transfer data significantly faster than the Model 600.

Since the Model 650 has a 16-bit interface, it has access to the high numbered interrupt sources. These higher sources, greater than 9, are more available than the lower sources making it easier to locate a free interrupt channel.

The input clock source is set on both boards with a dip switch, but on the Model 650 the software can override these settings.

The PCTL delay time is modified on the Model 600 by soldering in a capacitor or a resistor. The PCTL delay time for the Model 650 is selected from software. This limits the maximum delay on the Model 650 to 1.5ms while the Model 600 can be extended to hundreds of microseconds with the use of a large capacitor.

The DOUT clear jumper on the Model 600 and switch on the Model 650 clears the DOUT lines on reset. With the Model 600, this forces the output lines low regardless of the polarity set for the output lines. The Model 650 sets the lines to a logical 0. This allows the lines to be set low or left high impedance depending on the polarity set for the lines.




Copyright 2007 © TransEra Corp.