home *** CD-ROM | disk | FTP | other *** search
- module MOTORDRV
-
- title' MOTOR DRIVER PAL1 '
-
- U1 device 'P16R4';
-
- A,B,C pin 14,15,16;
- P pin 2;
- CLK pin 1;
- E pin 11;
-
- "Counter States
- S0=^B001;S1=^B011;S2=^B010;
- S3=^B110;S4=^B100;S5=^B101;
- S6=^B111;S7=^B000;
-
- State_diagram [A,B,C]
- State S0: case (P==1) : S1;
- (P==0) : S5;
- endcase;
- State S1: case (P==1) : S2;
- (P==0) : S0;
- endcase;
- State S2: case (P==1) : S3;
- (P==0) : S1;
- endcase;
- State S3: case (P==1) : S4;
- (P==0) : S2;
- endcase;
- State S4: case (P==1) : S5;
- (P==0) : S3;
- endcase;
- State S5: case (P==1) : S0;
- (P==0) : S4;
- endcase;
- State S6: case (P==1) : S3;
- (P==0) : S3;
- endcase;
- State S7: case (P==1) : S1;
- (P==0) : S1;
- endcase;
-
- test_vectors ([CLK,P,E]->[A,B,C])
- [.C.,1,0]->[1,1,0];
- [.C.,1,0]->[1,0,0];
- [.C.,1,0]->[1,0,1];
- [.C.,1,0]->[0,0,1];
- [.C.,1,0]->[0,1,1];
- [.C.,1,0]->[0,1,0];
- [.C.,1,0]->[1,1,0];
- [.C.,1,0]->[1,0,0];
- [.C.,1,0]->[1,0,1];
- [.C.,1,0]->[0,0,1];
- [.C.,0,0]->[1,0,1];
- [.C.,0,0]->[1,0,0];
- [.C.,0,0]->[1,1,0];
- [.C.,0,0]->[0,1,0];
- [.C.,0,0]->[0,1,1];
- [.C.,0,0]->[0,0,1];
- end MOTORDRV