------------------------------------------------------------------------------ Stepper Motor Controller for Parallel Interface GAL design specification ------------------------------------------------------------------------------ Paddy Strebel, 25-JAN-1996 ********** ********** * *** * STRB ** 1 20 ** VCC * * D0 ** 2 19 ** X0 (red) * * D1 ** 3 18 ** X1 (brown) * * D2 ** 4 17 ** X2 (yellow) * * D3 ** 5 16 ** X3 (blue) * * (D4) A0 ** 6 15 ** Y0 * * (D5/6) CS0 ** 7 14 ** Y1 * * (D6/5) CS1 ** 8 13 ** Y2 * * (D7) CLR ** 9 12 ** Y3 * * GND ** 10 11 ** ENA_B * STEP_0 * *********************** Connections: STROBE and D0..D7 from Parallel Interface. X0..X3 and Y0..X3 to Stepper Motor Drivers. ENA_B to driver enable. Data D0..D1 are clocked to outputs with positive edge of STRB. A0 selects the output port: 0=X, 1=Y. Data are latched only if CS0=0 and CS1=1. If more than 2 output ports are needed, two chips may be used in parallel if CS0 and CS1 are crossed on one chip. To prevent the drivers from beeing enabled accidently, if CLR is 1 or if CS0 and CS1 are both the same 0 or 1, all outputs are cleared on STRB regardless of A0 and D0..D3. fullstep halfstep half only disabled D0 ----____ D0 ---_____ D0 --______ D0 ________ D1 ____---- D1 ____---_ D1 ____--__ D1 ________ D2 --____-- D2 -_____-- D2 ______-- D2 ________ D3 __----__ D3 __---___ D3 __--____ D3 ________ *IDENTIFICATION STEP_0; *TYPE GAL16V8; *PINS % inputs % D0 = 2, D1 = 3, D2 = 4, D3 = 5, A0 = 6, CS0 = 7, CS1 = 8, CLR = 9, % output registers % X0.r = 19, X1.r = 18, X2.r = 17, X3.r = 16, Y0.r = 15, Y1.r = 14, Y2.r = 13, Y3.r = 12; *BOOLEAN-EQUATIONS X0 = /CLR*CS1*/CS0*/A0*D0 + /CLR*CS1*/CS0*A0*X0 + /CLR*/CS1*CS0*X0; X1 = /CLR*CS1*/CS0*/A0*D1 + /CLR*CS1*/CS0*A0*X1 + /CLR*/CS1*CS0*X1; X2 = /CLR*CS1*/CS0*/A0*D2 + /CLR*CS1*/CS0*A0*X2 + /CLR*/CS1*CS0*X2; X3 = /CLR*CS1*/CS0*/A0*D3 + /CLR*CS1*/CS0*A0*X3 + /CLR*/CS1*CS0*X3; Y0 = /CLR*CS1*/CS0*A0*D0 + /CLR*CS1*/CS0*/A0*Y0 + /CLR*/CS1*CS0*Y0; Y1 = /CLR*CS1*/CS0*A0*D1 + /CLR*CS1*/CS0*/A0*Y1 + /CLR*/CS1*CS0*Y1; Y2 = /CLR*CS1*/CS0*A0*D2 + /CLR*CS1*/CS0*/A0*Y2 + /CLR*/CS1*CS0*Y2; Y3 = /CLR*CS1*/CS0*A0*D3 + /CLR*CS1*/CS0*/A0*Y3 + /CLR*/CS1*CS0*Y3; *END