|
MODULE gald69
TITLE 'TMS320C50 GAL16V8 D69'
D69 device 'P16V8R';
CLK PIN 1;
CLR PIN 2 ;
NMA7,NMA6 PIN 18,19 ISTYPE 'REG';
CI PIN 3 ;
AOMIN,AOMOUT PIN 14,13 ISTYPE 'REG';
NMA=[NMA7,NMA6];
AO=[AOMOUT,AOMIN];
C,X,Z,P=.C.,.X.,.Z.,.P.;
EQUATIONS
AOMIN=0;
NMA.CLK=CLK;
AOMIN.CLK=CLK;
AOMOUT.CLK=CLK;
WHEN (AO==2)#(AO==1) THEN {
WHEN CLR==0 THEN {NMA:= 0; AOMIN:=!AOMIN; AOMOUT:=!AOMOUT;}
WHEN (CLR==1)&(CI==1) THEN {NMA:=NMA+1; AOMIN:=!AOMIN; AOMOUT:=!AOMOUT;}
WHEN (CLR==1)&(CI==0) THEN {NMA:=NMA; AOMIN:=!AOMIN; AOMOUT:=!AOMOUT;}
}
ELSE
{AO=1;NMA=11;}
END
这是我写的一个关于GAL器件的程序,功能实现了,可是有一个不足,我想让他上电后AOMIN管脚为0。大虾帮忙。。
|
|