/****************************************************************/
/*
* 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的烧写器烧写芯片后,工作却不正常,如2pin,3pin都是低电平时,12pin,13pin也是低电平,请各位高手指点,错误出在哪里,不胜感谢!!! |