MEMO-3-83 EIGEN LINK to VAX J. L. Turney September 1983 CENTER FOR ROBOTICS AND INTEGRATED MANUFACTURING Robot System Division COLLEGE OF ENGINEERING THE UNIVERSITY OF MICHIGAN ANN ARBOR, MICHIGAN 48109

MEMO-3-83 The Eigen Link to the VAX The eigen link is a software/hardware interface which allows the user to control the Eigen Video video disc recorder from the VAX. The eigen link consists of a simple software driver on the VAX, a 9600 baud serial line, and a small gray box located near the Eigen Video controller which contains the hardware interface from the VAX to the Eigen Video controller. The eigen link functions as follows. The software driver accepts single charascter commands with disc track numbers or disc track offsets from the user. It translates these commands to a 9600 baud serial command signal to the hardware interface. The hardware receives the 9600 baud serial command signal, decodes the command, and loads offsets into a set of counters. Hardware Description Fig. 1 displays a schematic for the hardware in the eigen link. The heart of design is the Intersil IM6403 UART, "Universal Asynchronous Receiver and Transmitter". L3 initializes the UART on power up. L1 converts the input serial signal from the VAX into a TTL level input into the UART. The signal is received serially at 9600 baud, 7 bits per frame, with the parity bit ignored. The UART has its own internal baud rate clock. When a frame of data has been received, DR at pin 19 of the UART goes high triggering the one shot L4 and reseting the receive buffer through L2. L7 decodes the upper three bits of the frame. The decoded signal from L7 either loads one of the three 4-bit counters, L9, L10, or Lll, or to sends a command to the eigen controller. The counting mechanism is armed by setting L6. If L6 is not set, the eigen controller will run until stopped by the stop command. The counters L9-L11 are set to count down, so 2

MEMO-3-83 that once they are loaded, they will accept clock pulses from the one shots L8 and L15 and count down to zero. Once they hit zero they send a stop command through L14 if L6 is armed. The two one shots L8 and L15 are used to trigger off the leading and trailing edge of the clock output from the eigen controller. 3

c3 fr~~~~t F s - F~cl)V~VU~;li~eIt L? 2~~~~~~~o 33-4^-0^ ----- i J nL At L4 13 P er 14 Nai23 T -- is I Ea lwc LB 1 Ct,Z it 7%sR3 13 Li I L - c J - _______a _LL I q - 1 —----------- -- I FK —-— n13 3 fFI 7~c/LS/3 8 a~~~lI ll A hig rE comL! 7:l 6 tJ f. - T -~ ^ i^''- - i' ~r? _?k I' ^ I*I'I Is I'"I' ~. * C,__ _t t 10S- ^ S? loa [S -0 S9> U Io ^ I ^t-c - 5 - ^' 7^ //,i,, 71/7 ~ -ii ~4 _ 7 /j o5 ^-\ 7, -^ ^/iw.c~m - - - - -i-_________*fe 6 —--'^-c.'.. ^~~~~~~~~~~rerC 1 ------ - I —--------------— J U —----------------------------------------------— ^ j 2..

MEMO-3-83 Software Description A description of the software is presented in the standard manual form for UNIX on the next page. 5

EIGEN ( ) UNIX Programmer's Manual MEMO-3-83 NAME eigen - invoke the eigen software interface SYNOPSIS elgen DESCRIPTION eigen invokes the software interface to the Eigen Video controller. The software interface accepts single character commands followed by either absolute track locations on the video disc or by track offsets. The syntax for a command is simply: < command character> [< offset> I < track>j where the square brackets "I ]" indicate that the enclosed items are optional, and the "1" separates the options. <command character> is one of the command characters, {+|-lrlsltlhlq}, If the "Q" character is included, <track> which must follow refers to an absolute track location, if the "0" character is absent then < offset> refers to a relative track location. No spaces are allowed between characters. Below are displayed the commands and their actions. =+t forward +< offset> forward for < offset> tracks g+ < track> forward until < track> location backward -< offset> backward for <offset> tracks -0 < track> backward until < track> location r record r< offset> record for <offset> tracks r < track> record until <track> location s stop t display current track t< track> set internal track count to < track> h help by displaying command summary q quit BUGS When the Eigen Video video disc is powered up, it does not initialize to the same starting point so that an absolute track position is not really absolute, but only absolute with respect to the current session. 6

MEMO-3-83 Appendix #include <stdio.h> #define WRITEMODE 1 #define ENDOFSTRING 0 #define TRUE 1 #define FALSE 0 #define SUCCESS 1 #define FAILURE 0 #define PROCEDURE #define DOINDEFINITELY while(l) char loadlow = 0x00, loadmiddle = 0x20, load.high = 0x40, stop = 0x60, forward = 0x80, reverse = OxAO, record = OxCO, reset = OxEO; int eigenjine, i; PROCEDURE main() { int number_track, attempt, track, count, nargs, sync, temp, absolute; char commandline(20], inputchar; 7

MEMO-3-83 /***************************************** ttyl8 is the line dedicated to the eigen link ******************************************/ eigen_line = open( /dev/ttyl8", WRITE_MODE ); /**************************** Zero the counter of the eigen write( eigen_line, &reset, 1); track = 0; sync = TRUE; /*** eigen is synchronized ***/ DOINDEFINITELY { next_command: printf("Oigen: "); i=0; while( (input_char = getchar())!=' && i< 19 ) command_line[i++] = input_char; command_line[il = 0; numbertrack - 0; count - FALSE; absolute = FALSE; /*** input track numbers can be for absolute addresses or relative addresses ***/ Input eigen command c4i*********e*********/ 8

MEMO-3-83 if( (command_linel]!='' ) && (command_line[ll!=' )) { nargs = sscanf( commandline, "%*lc%d", &number_track ); if( nargs<= ) /*** If command line did not fit above format try a different format with an absolute address for the track number specified ***/ { nargs =sscanf( command_line,"%*lcSd",&number_track ); /*** look only for the track number ***/ if( nargs== ) { if( sync == FALSE ) /*** if an absolute track number is specified but the eigen link has lost count of where it is, then report that a new absolute address must be loaded ***/ printf("Orror: track count lost, must reinitO); goto next_command; } absolute = TRUE; /*** an absolute address has been specified ***/ if( commandline[O] =='+' II commandline[Ol =='-' II command_line[O] =='r' ) { if( absolute ) /*** if an absolute address was specified then find the difference between the current location and the desired absolute location and load this to the 12 bit down counter on the eigen link ***/ { temp = number_track; switch( command_line[O]) { case'+': case'r': number_track = ( number_track - track 9

MEMO-3-83 + 600 )%600; break; case'-': number_track = (track - numbertrack + 600)%600; break; } } attempt = load_count( number_track ); /*** load count here ***/ if( attempt == FAILURE ) goto next_command; count = TRUE; switch( command_line[0] )/*** adjust the track address appropriately **/ case'+': case'r' if( absolute ) track = temp; else track = (track + number_track )%600; break; case -': if( absolute ) track = temp; else track = (track - number_track + 600 )%600; break; } } if( command_line[l] =='' ) command_line[0 -'?'; Command handler. Send eigen commands to the eigen link ********* *******************4***********/ switch( command_line[O0 ) 10

MEMO-3-83 { /*********************************************** If no count is specified for the "+", "-" or "r" command, or if the s command is executed, this program loses the correct track address and must be recalibrated with the "t" command. *****************************************4**/ case'+': write( eigen_line, &forward, 1 ); if( count == FALSE ) sync = FALSE; break; case'-: write( eigenline, &reverse, 1); if( count == FALSE ) sync = FALSE; break; case'r': write( eigenline, &record, 1 ); if( count == FALSE ) sync = FALSE; break; case's': write( eigen_line, &stop, 1); if( count — == FALSE ) sync = FALSE; break; /************************************************ Print current track number if the command has no number specified. Set the track address if a count is specified case't': if(commandline[l]=='') { if( sync == FALSE ) { printf("Orror: track count lost, must reinitO); goto nextcommand; } printf("Ourrent track: %3d0, track ); 11

MEMO-3-83 else { track = number-track; printf("0rack reinitializedO); sync = TRUE; break; case'h': printf(" + forward"); printf(" +CNT forward for CNT tracks"); printf(" +QTRACK forward to TRACK"); printf(" - reverse"); printf(" -CNT reverse for CNT tracks"); printf(" -QTRACK reverse to TRACK"); printf(" r record"); printf(" rCNT record for CNT tracks"); printf(" rQTRACK record to TRACK"); printf(" s stop eigen"); printf(" t print current track number"); printf(" tTRACK set track number to TRACK"); printf(" h help"); printf(" q quitO); break; case'q': exit(O); default: printf("0rror: unrecognizable command, type h for helpO); } } 12

MEMO-3-83 int PROCEDURE load_count( numbertrack ) int number_track; { char high_byte, middle_byte, lowbyte, count; int i; if( (number_track < 0) [1 (number_track >= 4096) ) { printf("Orror: argument out of range, 0-40950); return( FAILURE ); if( numbertrack = 0 ) return(FAILURE); i**************************************** 4E*****$*** The number of tracks to be skipped is broken into three nibbles. These are combined with commands which allow three 4-bit counters to be loaded with the number of tracks to be skipped. The counters will be decremented to zero. When the count goes negative the eigen will be stopped by the counters. The number of tracks is therefore loaded with one less than the desired number of tracks. $***********************4******$*$******$*$ ***/ number_track-; count = numbertrack/256; highbyte = load_high I count; number_track -= count*256; count = number_track/16; middlebyte = load_midde I count; numbertrack -- count*16; count =- number_track; 13

MEMO-3-83 lowbyte = loadlow | count; /*4*c***4c **t~c~c***4c****** ******* The three 4-bit counters are loaded. ***********************************/ write( eigen_line, &low_byte, 1); i=O; while(i++ <1000); write( eigen_line, &middle_byte, 1 ); i-0; while(i++ <1000); write( eigenline, &highbyte, 1); i=0; while(i++ < 1000); return( SUCCESS ); } 14