• Keine Ergebnisse gefunden

HP-HIL SYSTEM OPERATION AND CONTROL DIAGRAM

Im Dokument Reference Manual HEWLETT-PACKARD (Seite 71-80)

This section describes the basic sequences of HP-HIL commands required to in.itialize the Link, collect data from input devices, request the devices to perform diagnostics, and perform error recovery. All System implementations of HP-HIL must include these capabilities, and all HP-HIL devices must support these command sequences.

The control of the Link by the System is shown graphically in Figure

4-1.

This diagram is not a state diagram, but is intended to show how the System deals with configuration, error recovery, polling, adding devices, and special commands. The notation used in Figure 4-1 follows:

UP-HIL Protocol connecting lines between ovals) becomes true. Control will then transfer to the oval indicated by the true

INT ... ERR

(TO·DC~1)

INT

ERR ... TO

DELAY200mS

INT --~I....-­

.... - - - f

Figure

4-1.

ERR + (TO·DC<1)

ERR + TO

ERR + TO

System Control Diagram

HP - HIL Protocol

HP-HIL Protocol

Referring to Figure

4-1,

the control process for HP-HIL can be broken up into four major areas of operation. These are configuration aIid error recovery, polling (data collection), adding devices to the Link, and handling special commands. Note that control of HP-HIL from the System is based upon timing or interrupts which cause the System to take action. Because of this, the controlling software will generally not be running continuously, but will be part of a larger interrupt driven environment. Thus, after an action has been taken, during the waiting for a condition to become true and cause the next action to be taken, the host processor will generally be doing other unrelated tasks.

Configuration begins with the System testing the MLC. This is done by setting the MLC in Test Mode, and writing frames into registers WO and Wl. If the frames are received in the FIFO, an interupt is generated. If the frames in the FIFO match the frames transmitted, then the MLC has passed the test. If an error or a timeout occurs, then something is wrong wi th the MLC. Before proceeding, the cause of the error must be cleared. At this point, a message to the console is usually necessary to encourage user participation.

Note that the control diagram relies on timeouts. A timeout occurs when a response to an action is expected, but does not occur. Thus a timeout allows the System to interceed and take appropriate action rather than allow control to come to a halt. Timeouts durations vary depending upon the command and the expected response. Appendix A gives timeout information for all of the HP-HIL commands. The typical response to a command being issued is the command (or data) returning to the MLC and an interrupt being generated.

When the MLC has passed its test, control passes to the next oval and a DHR (Device Hard Reset) is sent. The device count (DC) is cleared at this point.

Because DHR should not be received by the MLC, the correct action will be a timeout occurring. An interrupt indicates a frame was received which is not expected. For an interrupt or an error, the action repeats by issuing another DHR. A stop point could inserted here if additional DHRs do not correct the problem. All devices on the Link should now be in Loop-Back Mode, Power-Up Mode (PUP Mode), and have a cleared match address (=0). Graphically, the condition of the Link is shown in Figure

4-2.

A more detailed discussion of PUP Mode can be found later in this section under "HP-HIL Device Operation and Control Diagrams. II

4-14

so

HP-HIL Protocol

Figure

4-3.

Link Configuration, First Device Configured

HP-HIL Protocol command (universal address). Device 1 maintains address 1t increments the opcode to OAht then transmits the command to Device 2. Device 2 assumes match

Figure

4-4.

Link Configuration, First and Second Devices Configured

HP -HIL Protocol

This process continues, Pas s -Thru command to a additional devices are shown in Figure

4-5.

so

..

~

SI

-

-SYSTEM

configuring N devices onto the Link, until the Enter specific device is not returned, indicating no attached, and the Link configuration appears as

51 - - - . SO

RO 4 0 0 - RI

DEVICE 1 ADDRESS: 1 POWER·UP: CLEAR PASSTHRU MODE

-- --

-51 - - - . SO ~

RO 4 - - - - RI ~

DEVICE2 ADDRESS: 2 POWER·UP: CLEAR PASSTHRU MODE

SI - - - . so

DEVICEN ADDRESS: N POWER·UP: CLEAR PASSTHRU MODE

Figure

4-5.

Link Configuration, Last Device Configured

When the EPT command is not returned, a timeout occurs transferring control to the ELB (Enter Loop-Back Mode) oval. The System transmits the Enter Loop-Back command (opcode 02h) to Device N, which places its SLC back into Loop-Back Mode, and returns the command to the System. The Link, now fully configured, is illustrated in Figure 4-6.

4-18

Polling

Figure 4-6. Link Configuration, All Devices Configured

Once the Link has been fully configured as described above, the input devices are ready to be Polled. The System may initiate HP-HIL Polls either by manually transmitting the Poll command or by configuring MLC to perform Auto Polling.

Since in either case the transmitted opcode remains the same, the Polling method used is transparent to the attached devices. Auto Polling generally requires less time from the System processor for continuous operation, and is therefore the choice of most Systems. In addition, the use of Auto Polling guarantees a regular Poll interval, which may be required for optional device features such as Keyswitch AutoRepeat.

Typical input devices should be polled for data approximately 60 times per second to maintain acceptable performance levels. Significantly slower poll rates may result in lost key transitions or unacceptably coarse cursor movement;

while quicker poll rates may result in false keyswitch transitions due to keyswitch bounce being reported, along with a general degradation of input device performance (due to the increased time spent servicing the HP-HIL

interface) .

HP-HIL Protocol configuration process is complete and device polling has begun. However,

Im Dokument Reference Manual HEWLETT-PACKARD (Seite 71-80)