本文目录一览:
- 1、pro e5.0 license request failed for feature PROE_200 -2
- 2、汇编语言程序设计,实现两个数组的合并.设数组a和b中均包含6个数据,要求合并后数据按照降序排列并显示。
- 3、求助:DS18B20单片机控温,导入学习板后没反应
pro e5.0 license request failed for feature PROE_200 -2
1.运行Setup.exe
2.记下PTC主机ID
3.复制破解目录内的"ptc_licfile.dat"到硬盘.并用记事本打开。将里面所有的"00-00-00-00-00-00"改为你的PTC主机ID后保存
4.开始安装软件到指定许可证服务器时选"锁定的许可证文件"后选修改后的"ptc_licfile.dat"
5.安装完成后将破解目录内"ptc.pro engineer.wildfire.4.0.win32-patch.exe"复制到"安装目录下\i486_nt\obj folder"目录内并运行
6.编辑“安装目录下\bin\proev.bat
改为以下的文本
change "%start_cmd% "%CGTECH_JRE%\bin\javaw" -Xms16m -Xmx64m -Xss4m -classpath "%CGTECH_CLASSES%;%CGTECH_CLASSES%\CGTech.jar" Vericut %argstr%" in
"%start_cmd% "%CGTECH_JRE%\bin\javaw" -Xms16m -Xmx64m -Xss4m -classpath "%CGTECH_CLASSES%;%CGTECH_CLASSES%\CGTech.jar" Vericut %argstr% PTC_KEY=0"
(add PTC_KEY=0)
7.运行软件即可
把下面文件复制到记事本 保存为DAT后缀名的文件 一下是proe4.0版本的许可证
###################################################################
#
# replace 00-00-00-00-00-00 in every-feature with your real ptc_hostid
# as shown in setup
#
###################################################################
INCREMENT PROE_DDiTy ptc_d 29.0 permanent uncounted \
VENDOR_STRING="VSVER=2.0 LO=(0,3,6,7,9,10,14,16,17,19,21,22, \
23,24,25,26,29,30,31,32,34,35,36,37,40,41,45,47,48,51,52,53, \
54,55,56,57,59,60,61,62,63,65,66,67,69,71,72,73,74,77,91,92, \
93,94,97,100,104,106,108,115,116,117,118,119,120,121,122,123, \
125,126,127,128, 131,133,134,135, 137,139,140,141,148,155,156, \
158,160,163,164,167,168,187,188,189,190,191,192,193,194,208,209,210, \
213,214,218,219,220,221,222,223,224,251,253,259,260,261,262,263,264,275)" SUPERSEDE \
HOSTID=PTC_HOSTID=00-00-00-00-00-00 vendor_info="VIVER=2.0 EXTERNAL_NAME=" ISSUER=ODT \
ISSUED=2-apr-2006 NOTICE=PTC SN=07071982 SIGN="092F DBD8 F7BA \
EC9D 51E5 453C 93A1 D63D 0BC7 3126 8493 2C23 32A9 A98F 8BC0 1BEB \
0F0F 5C63 6933 5B61 613F 0CFB 235B 9C1B B39E 274F 2E5A 60E1 1FEF \
DE6A" SIGN2="092F DBD8 F7BA EC9D 51E5 453C 93A1 D63D 0BC7 3126 \
8493 2C23 32A9 A98F 8BC0 1BEB 0F0F 5C63 6933 5B61 613F 0CFB 235B \
9C1B B39E 274F 2E5A 60E1 1FEF DE6A"
INCREMENT MECBASICUI_12345 ptc_d 29.0 permanent uncounted \
VENDOR_STRING="VSVER=2.0 LO=(19,157,211)" SUPERSEDE HOSTID=PTC_HOSTID=00-00-00-00-00-00 \
vendor_info="VIVER=2.0 EXTERNAL_NAME=" ISSUER=ODT \
ISSUED=2-apr-2006 NOTICE=PTC SN=07071982 SIGN="092F DBD8 F7BA \
EC9D 51E5 453C 93A1 D63D 0BC7 3126 8493 2C23 32A9 A98F 8BC0 1BEB \
0F0F 5C63 6933 5B61 613F 0CFB 235B 9C1B B39E 274F 2E5A 60E1 1FEF \
DE6A" SIGN2="092F DBD8 F7BA EC9D 51E5 453C 93A1 D63D 0BC7 3126 \
8493 2C23 32A9 A98F 8BC0 1BEB 0F0F 5C63 6933 5B61 613F 0CFB 235B \
9C1B B39E 274F 2E5A 60E1 1FEF DE6A"
INCREMENT MECBASICENG_12345 ptc_d 29.0 permanent uncounted \
VENDOR_STRING="VSVER=2.0 LO=(19,161,212)" SUPERSEDE HOSTID=PTC_HOSTID=00-00-00-00-00-00 \
vendor_info="VIVER=2.0 EXTERNAL_NAME=" ISSUER=ODT \
ISSUED=2-apr-2006 NOTICE=PTC SN=07071982 SIGN="092F DBD8 F7BA \
EC9D 51E5 453C 93A1 D63D 0BC7 3126 8493 2C23 32A9 A98F 8BC0 1BEB \
0F0F 5C63 6933 5B61 613F 0CFB 235B 9C1B B39E 274F 2E5A 60E1 1FEF \
DE6A" SIGN2="092F DBD8 F7BA EC9D 51E5 453C 93A1 D63D 0BC7 3126 \
8493 2C23 32A9 A98F 8BC0 1BEB 0F0F 5C63 6933 5B61 613F 0CFB 235B \
9C1B B39E 274F 2E5A 60E1 1FEF DE6A"
INCREMENT MECSTRUCUI_12345 ptc_d 29.0 permanent uncounted \
VENDOR_STRING="VSVER=2.0 LO=(19,81,157,159,161)" SUPERSEDE HOSTID=PTC_HOSTID=00-00-00-00-00-00 \
vendor_info="VIVER=2.0 EXTERNAL_NAME=" ISSUER=ODT \
ISSUED=2-apr-2006 NOTICE=PTC SN=07071982 SIGN="092F DBD8 F7BA \
EC9D 51E5 453C 93A1 D63D 0BC7 3126 8493 2C23 32A9 A98F 8BC0 1BEB \
0F0F 5C63 6933 5B61 613F 0CFB 235B 9C1B B39E 274F 2E5A 60E1 1FEF \
DE6A" SIGN2="092F DBD8 F7BA EC9D 51E5 453C 93A1 D63D 0BC7 3126 \
8493 2C23 32A9 A98F 8BC0 1BEB 0F0F 5C63 6933 5B61 613F 0CFB 235B \
9C1B B39E 274F 2E5A 60E1 1FEF DE6A"
汇编语言程序设计,实现两个数组的合并.设数组a和b中均包含6个数据,要求合并后数据按照降序排列并显示。
8086汇编代码:
a(array1)、b(array2)两数组均为降序排列,元素个数不限。
程序重点是如何使用字串的传送指令(lodsw、stosw、movsw),
对整数数据类型而言,比高级语言编制的程序简明太多了。
code segment
assume cs:code
org 100h
start: jmp bbb
array1: dw 89,67,56,45,34,23,12
n1 equ ($-array1)/2
num1 dw ($-array1)/2
array2: dw 167,156,80,78,60,50,40,30,20,10
n2 equ ($-array2)/2
num2 dw ($-array2)/2
array3 dw n1+n2 dup(?)
num3 dw ($-array3)/2
scx dw ?
sdx dw ?
ssi dw ?
sbx dw ?
bbb: push cs
pop ds
push cs
pop es
lea si,array1
lea di,array3
lea bx,array2
mov cx,num1
mov dx,num2
cli
@1:
cmp dx,0
je @3
lodsw
cmp ax,[bx]
jnc @2 ;无符号数,对有符号数改为 jg @2
mov ax,[bx]
stosw
inc bx
inc bx
dec dx
dec si
dec si
jmp @1
@2:
stosw
loop @1
@3: mov scx,cx
mov sdx,dx
mov ssi,si
mov sbx,bx
cmp word ptr scx,0
je @4
mov cx,scx
mov si,ssi
rep movsw
@4: cmp word ptr sdx,0
je @5
mov cx,sdx
mov si,sbx
rep movsw
@5:
lea si,array3
mov cx,num3
@6:
mov ax,[si]
call dispaxs
inc si
inc si
loop @6
mov ah,4ch
int 21h
;=========================================
DISPAXS PROC NEAR
PUSH AX
PUSH BX
PUSH CX
PUSH DX
PUSH SI
PUSH DI
PUSH BP
PUSH DS
PUSH ES
PUSHF
PUSH CS
POP DS
PUSH CS
POP ES
MOV CX,6
LEA DI,DISPAXSS
@DISPAXS:
MOV BYTE PTR [DI],32
INC DI
LOOP @DISPAXS
PUSH AX
MOV DL,32
MOV AH,2
INT 21H
POP AX
MOV BYTE PTR NZS,0
MOV BYTE PTR SIGNS,0
CMP AX,0
JGE @DISPAXS0
MOV BYTE PTR SIGNS,1
NEG AX
@DISPAXS0:
PUSH AX
LEA SI,DIVARRS
LEA DI,DISPAXSS
INC DI
MOV CX,5
@DISPAXS1:
POP AX
MOV DX,0
MOV BX,[SI]
DIV BX
PUSH DX
CMP AL,0
JNE @DISPAXS2
CMP BYTE PTR NZS,1
JE @DISPAXS2
CMP CX,1
JE @DISPAXS2
MOV DL,20H
JMP @DISPAXS3
@DISPAXS2:
ADD AL,30H
MOV DL,AL
MOV BYTE PTR NZS,1
@DISPAXS3:
MOV BYTE PTR[DI],DL
INC SI
INC SI
INC DI
LOOP @DISPAXS1
POP DX
CMP BYTE PTR SIGNS,1
JNE @DISPAXS6
LEA SI,DISPAXSS
ADD SI,5
@DISPAXS4:
CMP BYTE PTR [SI],32
JE @DISPAXS5
DEC SI
JMP @DISPAXS4
@DISPAXS5:
MOV BYTE PTR [SI],'-'
@DISPAXS6:
LEA DX,DISPAXSS
MOV AH,9
INT 21H
POPF
POP ES
POP DS
POP BP
POP DI
POP SI
POP DX
POP CX
POP BX
POP AX
RET
DIVARRS DW 10000,1000,100,10,1
NZS DB 0
SIGNS DB 0
DISPAXSS DB 32,32,32,32,32,32,'$'
DISPAXS ENDP
;==================================
code ends
end start
求助:DS18B20单片机控温,导入学习板后没反应
我写的DS18B20程序,可参考
#include reg52.h
#include intrins.h
#include stdio.h
#define uchar unsigned char
#define uint unsigned int
sbit xssj=P1^0; //显示数据
sbit xssz=P1^1; //显示时钟
sbit control=P1^3;
sbit DQ = P1^4;
bit flag;
uint Temperature;
uint temp[9];
uchar temp_buff[9]; //存储读取的字节,read scratchpad为9字节,read rom ID为8字节
uchar id_buff[8];
uchar *p;
uchar crc_data;
uint Temperature_h;
uint Temperature_l;
uchar code Crcontrolable [256]={
0, 94, 188, 226, 97, 63, 221, 131, 194, 156, 126, 32, 163, 253, 31, 65,
157, 195, 33, 127, 252, 162, 64, 30, 95, 1, 227, 189, 62, 96, 130, 220,
35, 125, 159, 193, 66, 28, 254, 160, 225, 191, 93, 3, 128, 222, 60, 98,
190, 224, 2, 92, 223, 129, 99, 61, 124, 34, 192, 158, 29, 67, 161, 255,
70, 24, 250, 164, 39, 121, 155, 197, 132, 218, 56, 102, 229, 187, 89, 7,
219, 133, 103, 57, 186, 228, 6, 88, 25, 71, 165, 251, 120, 38, 196, 154,
101, 59, 217, 135, 4, 90, 184, 230, 167, 249, 27, 69, 198, 152, 122, 36,
248, 166, 68, 26, 153, 199, 37, 123, 58, 100, 134, 216, 91, 5, 231, 185,
140, 210, 48, 110, 237, 179, 81, 15, 78, 16, 242, 172, 47, 113, 147, 205,
17, 79, 173, 243, 112, 46, 204, 146, 211, 141, 111, 49, 178, 236, 14, 80,
175, 241, 19, 77, 206, 144, 114, 44, 109, 51, 209, 143, 12, 82, 176, 238,
50, 108, 142, 208, 83, 13, 239, 177, 240, 174, 76, 18, 145, 207, 45, 115,
202, 148, 118, 40, 171, 245, 23, 73, 8, 86, 180, 234, 105, 55, 213, 139,
87, 9, 235, 181, 54, 104, 138, 212, 149, 203, 41, 119, 244, 170, 72, 22,
233, 183, 85, 11, 136, 214, 52, 106, 43, 117, 151, 201, 74, 20, 246, 168,
116, 42, 200, 150, 21, 75, 169, 247, 182, 232, 10, 84, 215, 137, 107, 53};
//uchar code tab[16]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e};//共阳极0-F代码
uchar code tab[18]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71,0,0x40};//共阴极0-F代码
void delay1ms(int t)
{
int i,j,k=0;
for(k=0;kt;k++)
{for(j=0;j=25;j++)
{for(i=0;i255;i++){;}}}
}
/************************************************************
*Funcontrolion:延时处理
*parameter:
*Return:
*Modify:
*************************************************************/
void TempDelay (uchar us)
{
while(us--);
}
/************************************************************
*Funcontrolion:18B20初始化
*parameter:
*Return:
*Modify:
*************************************************************/
void Init18b20 (void)
{
DQ=1;
_nop_();
DQ=0;
TempDelay(86); //delay 530 uS//80
_nop_();
DQ=1;
TempDelay(14); //delay 100 uS//14
_nop_();
_nop_();
_nop_();
if(DQ==0)
{
flag = 1; //detecontrol 1820 success!
TempDelay(20); //delay 530 uS//80
}
else
{
flag = 0; //detecontrol 1820 fail!
}
TempDelay(20); //20
_nop_();
_nop_();
DQ = 1;
}
/************************************************************
*Funcontrolion:向18B20写入一个字节
*parameter:
*Return:
*Modify:
*************************************************************/
void WriteByte (uchar wr) //单字节写入
{
uchar i;
for (i=0;i8;i++)
{
DQ = 0;
_nop_();
DQ=wr0x01;
TempDelay(5); //delay 45 uS //5
_nop_();
_nop_();
DQ=1;
wr = 1;
}
}
/************************************************************
*Funcontrolion:读18B20的一个字节
*parameter:
*Return:
*Modify:
*************************************************************/
uchar ReadByte (void) //读取单字节
{
uchar i,u=0;
for(i=0;i8;i++)
{
DQ = 0;
u = 1;
DQ = 1;
if(DQ==1)
u |= 0x80;
TempDelay (4);
_nop_();
}
return(u);
}
/************************************************************
*Funcontrolion:读18B20
*parameter:
*Return:
*Modify:
*************************************************************/
void read_bytes (uchar j)
{
uchar i;
for(i=0;ij;i++)
{
*p = ReadByte();
p++;
}
}
/************************************************************
*Funcontrolion:CRC校验
*parameter:
*Return:
*Modify:
*************************************************************/
uchar CRC (uchar j)
{
uchar i,crc_data=0;
for(i=0;ij;i++) //查表校验
crc_data = Crcontrolable[crc_data^temp_buff[i]];
return (crc_data);
}
/************************************************************
*Funcontrolion:读取温度
*parameter:
*Return:
*Modify:
*************************************************************/
void GemTemp (void)
{
read_bytes (9);
if (CRC(9)==0) //校验正确
{
Temperature = temp_buff[1]*0x100 + temp_buff[0];
Temperature /= 16;//17.7;//16;
TempDelay(1);
}
}
/************************************************************
*Funcontrolion:内部配置
*parameter:
*Return:
*Modify:
*************************************************************/
void Config18b20 (void) //重新配置报警限定值和分辨率
{
Init18b20();
WriteByte(0x7f); //set 11 bit (0.125)
Init18b20();
WriteByte(0xcc); //skip rom
WriteByte(0x48); //保存设定值
Init18b20();
WriteByte(0xcc); //skip rom
WriteByte(0xb8); //回调设定值
}
/************************************************************
*Funcontrolion:读18B20ID
*parameter:
*Return:
*Modify:
*************************************************************/
void ReadID (void)//读取器件 id
{
Init18b20();
if(flag ==1)
{
WriteByte(0xcc);
WriteByte(0x44);
}
}
/************************************************************
*Funcontrolion:18B20ID全处理
*parameter:
*Return:
*Modify:
*************************************************************/
void TemperatuerResult(void)
{
p = id_buff;
ReadID();
Config18b20();
Init18b20 ();
WriteByte(0xcc); //skip rom
WriteByte(0x44); //Temperature convert
Init18b20 ();
WriteByte(0xcc); //skip rom
WriteByte(0xbe); //read Temperature
p = temp_buff;
GemTemp();
}
void disp(uchar i)
{
int xssjhc; //显示数据缓冲
uchar a;
xssjhc=tab[i];
for(a=0;a8;a++)
{
xssz=0;
xssj=xssjhc0x80;
xssjhc=1;
xssz=1;
}
}
void panduan()
{
if(Temperature20)
{
control=1;
}
if(Temperature19)
{
control=0;
}
}
void main()
{
while(1)
{
TemperatuerResult();
Temperature_h=Temperature/10;
Temperature_l=Temperature%10;
panduan();
disp(Temperature_h);
delay1ms(50);
disp(Temperature_l);
delay1ms(50);
}
}