P
Pete Harrison
Guest
I guess the combination of Wincupl and a 16V8 will be pretty much steam
technology for most of you but it is a real mystery to me.
I blew up some 16V8 stepper sequencers the other day and I have to
program up some replacements. All I have is some software to program the
ATF16V8B chips and wincupl.
This is my first try at this game but I have the state machine working
after many hours of searching and puzzling and it behaves the same as
the original chips. BUT...
The driver board has an enable input which should turn off the motors.
In the current design, that is done by setting the outputs all high when
ENABLE is active. unfortunately, this only happens if a clock pulse is
applied as (I suppose) it has to get clocked through the output registers.
Is there a way to make the ENABLE input force the outputs to a
predetermined state with or without a clock pulse?
I would also be grateful for any other assistance you could give.
Here is the CUPL file as it stands:
Name JSMOTOR ;
PartNo 00 ;
Date 13/07/2004 ;
Revision 01 ;
Designer Engineer ;
Company Helicron ;
Assembly None ;
Location ;
Device g16v8a ;
/** Inputs **/
Pin 1 = clk ;
Pin 2 = DIR;
Pin 3 = ENA ;
Pin 9 = FULL;
pin 11 = !OE;
/** Outputs **/
Pin [12..15] = [Q3..0]; /** **/
field stpctrl = [Q3..0];
$Define S0 'b'0000
$Define S1 'b'1000
$Define S2 'b'1010
$Define S3 'b'0010
$Define S4 'b'0110
$Define S5 'b'0100
$Define S6 'b'0101
$Define S7 'b'0001
$Define S8 'b'1001
$Define S9 'b'1111
field mode = [ENA,FULL,DIR];
up = mode:7;
hup = mode:5;
down = mode:6;
hdown = mode:4;
clear = mode:[0,1,2,3];
Sequence stpctrl {
present S9
if up next S2;
if down next S2;
if hup next S1;
if hdown next S1;
present S0
if up next S2;
if down next S2;
if hup next S1;
if hdown next S1;
present S1
if up next S2;
if down next S8;
if hup next S2;
if hdown next S8;
present S2
if up next S4;
if down next S8;
if hup next S3;
if hdown next S1;
present S3
if up next S4;
if down next S2;
if hup next S4;
if hdown next S2;
present S4
if up next S6;
if down next S2;
if hup next S5;
if hdown next S3;
present S5
if up next S6;
if down next S4;
if hup next S6;
if hdown next S4;
present S6
if up next S8;
if down next S4;
if hup next S7;
if hdown next S5;
present S7
if up next S8;
if down next S6;
if hup next S8;
if hdown next S6;
present S8
if up next S2;
if down next S6;
if hup next S1;
if hdown next S7;
}
Pete Harrison
http://micromouse.cannock.ac.uk/
technology for most of you but it is a real mystery to me.
I blew up some 16V8 stepper sequencers the other day and I have to
program up some replacements. All I have is some software to program the
ATF16V8B chips and wincupl.
This is my first try at this game but I have the state machine working
after many hours of searching and puzzling and it behaves the same as
the original chips. BUT...
The driver board has an enable input which should turn off the motors.
In the current design, that is done by setting the outputs all high when
ENABLE is active. unfortunately, this only happens if a clock pulse is
applied as (I suppose) it has to get clocked through the output registers.
Is there a way to make the ENABLE input force the outputs to a
predetermined state with or without a clock pulse?
I would also be grateful for any other assistance you could give.
Here is the CUPL file as it stands:
Name JSMOTOR ;
PartNo 00 ;
Date 13/07/2004 ;
Revision 01 ;
Designer Engineer ;
Company Helicron ;
Assembly None ;
Location ;
Device g16v8a ;
/** Inputs **/
Pin 1 = clk ;
Pin 2 = DIR;
Pin 3 = ENA ;
Pin 9 = FULL;
pin 11 = !OE;
/** Outputs **/
Pin [12..15] = [Q3..0]; /** **/
field stpctrl = [Q3..0];
$Define S0 'b'0000
$Define S1 'b'1000
$Define S2 'b'1010
$Define S3 'b'0010
$Define S4 'b'0110
$Define S5 'b'0100
$Define S6 'b'0101
$Define S7 'b'0001
$Define S8 'b'1001
$Define S9 'b'1111
field mode = [ENA,FULL,DIR];
up = mode:7;
hup = mode:5;
down = mode:6;
hdown = mode:4;
clear = mode:[0,1,2,3];
Sequence stpctrl {
present S9
if up next S2;
if down next S2;
if hup next S1;
if hdown next S1;
present S0
if up next S2;
if down next S2;
if hup next S1;
if hdown next S1;
present S1
if up next S2;
if down next S8;
if hup next S2;
if hdown next S8;
present S2
if up next S4;
if down next S8;
if hup next S3;
if hdown next S1;
present S3
if up next S4;
if down next S2;
if hup next S4;
if hdown next S2;
present S4
if up next S6;
if down next S2;
if hup next S5;
if hdown next S3;
present S5
if up next S6;
if down next S4;
if hup next S6;
if hdown next S4;
present S6
if up next S8;
if down next S4;
if hup next S7;
if hdown next S5;
present S7
if up next S8;
if down next S6;
if hup next S8;
if hdown next S6;
present S8
if up next S2;
if down next S6;
if hup next S1;
if hdown next S7;
}
Pete Harrison
http://micromouse.cannock.ac.uk/