/****************************************************************/
/*
* Inputs: define inputs to build simple gates from
*/
Pin 3 = a;
Pin 2 = b;
/*
* Outputs: define outputs as active HI levels
*
*/
Pin 12 = inva;
Pin 13 = invb;
Pin 14 = and;
Pin 15 = nand;
Pin 16 = or;
Pin 17 = nor;
Pin 18 = xor;
Pin 19 = xnor;
/*
* Logic: examples of simple gates expressed in CUPL
*/
inva = !a; /* inverters */
invb = !b;
and = a & b; /* and gate */
nand = !(a & b); /* nand gate */
or = a # b; /* or gate */
nor = !(a # b); /* nor gate */
xor = a $ b; /* exclusive or gate */
xnor = !(a $ b); /* exclusive nor gate */
以上是ATMEL WINCUPL软件自带的一款程序,编译和软件仿真都正常,用WELLON的烧写器烧到GAL16V8后却工作不正常,如PIN2,PIN3都接低电平时,12pin,13pin也输出低电平,哪位对此比较了解,请给予指导,万分感谢。(本人由项目所迫,刚搞GAL器件) |