[upload=1]
世纪伯乐原创,转载请注明出处……
题目:风力发电机组并网运行控制系统
相当简单的汇编语言写的51小作品……
净做延时了……
乐意的看看,大神不喜勿喷
doc格式下载: [upload=2]
其实这里面有不少图片,电路图流程图啥的,但是我折腾了半天上传不上,说文件太大,想看的还是下载下来看吧……
一、基本要求
1、额定频率为50HZ
2、频率跟踪范围49Hz—51Hz
3、频率跟踪步长为0.2Hz
4、额定输出电压
5、α角相移范围为0—π/2
6、α角初始值为18°
7、晶闸管触发脉冲宽度0.1ms
8、α单位1的值α=1.8°
9、PWM对应的11种频率状态(49Hz—51Hz)
二、控制系统结构:
[upload=8]
设计要求
1、主电路:控制电路设计图
2、每个单片机下控制系统硬件电路图
3、11种频率状态下PWM的计算
程序流程图,实现程序并注释说明
风力发电并网运行主电路:
[upload=9]
α脉冲控制电路:
[upload=3]
电网频率跟踪和逆变PWM实现电路:
[upload=4]
三、11种频率状态下PWM脉冲宽度计算频率——脉宽对应表。
t(us)
f(Hz) △t1 △t2
△t3
△t4
△t5
△t6
△t7
△t8
△t9
△t10
49.0 159 461 718 906 1004 1004 906 718 461 159
49.2 158 459 715 902 1000 1000 902 715 459 158
49.4 158 457 712 899 996 996 899 712 457 158
49.6 157 456 710 895 992 992 895 710 456 157
49.8 157 454 707 892 988 988 892 707 454 157
50.0 156 452 704 888 984 984 888 704 452 156
50.2 155 450 701 884 980 980 884 701 450 155
50.4 155 448 698 881 976 976 881 698 448 155
50.6 154 447 696 877 972 972 877 696 447 154
50.8 154 445 693 874 968 968 874 693 445 154
51.0 153 443 690 870 964 964 870 690 443 153
程序流程图:
单片机1:
[upload=5]
单片机2:
[upload=6]
单片机3:
[upload=7]
程序代码:
单片机1:
ORG 0000H
AJMP START
ORG 0003H
LJMP ZD
ORG 0030H
START: CLR [s:9]1.1 //初始控制角18度
ACALL DELAY //对应延时时间1ms
SETB [s:9]1.1 //发脉冲
ACALL DELAY2 //脉冲宽度为0.1ms
CLR [s:9]1.1
MOV R0,#30H //R0作为地址指针
MOV R1,#78H //选择输入通道
MOV R2,#0AH
MOV R3,#OAH
QD: SETB EA //中断允许
SETB EX0 //外部中断0允许
CLR F0 //标志位清零
MOVX @R,A //启动A/D转换
NEXT: JBC F0,ELSE //等待A/D转换结束
SJMP NEXT
ZD: MOVX A,@R1
MOV @R0,A //转换后数据存入30H
SETB F0
RETI
ELSE: CJNE R0,#DCH,L1 //转换后数据与220V比较
JB [s:9]1.0,$ //若想等,等待P1.0上升沿
CLR [s:9]1.1
ACALL DELAY1
SETB [s:9]1.1
ACALL DELAY2
CLR [s:9]1.1
AJMP QD
L1: JC L2 //转换后数据是否大于220V
JB [s:9]1.0,$ //若大于,等待P1.0上升沿
CLR [s:9]1.1
INC R2
MOV A,R2
MOV R3,A
DD1: ACALL DELAY2
DJNZ R3,DD1
SETB [s:9]1.1
ACALL DELAY2
CLR [s:9]1.1
MOV A,R2
MOV R3,A
AJMP QD
L2: JB [s:9]1.0,$ //转换后数据是否小于220V
CLR [s:9]1.1
DEC R2
MOV A,R2
MOV R3,A
DD2: ACALL DELAY2
DJNZ R3,DD2
SETB [s:9]1.1
ACALL DELAY2
CLR [s:9]1.1
MOV A,R2
MOV R3,A
AJMP QD
DELAY1: MOV R1,#0AH //延时1ms
DL11: MOV R2,#18H
DL12: NOP
NOP
DJNZ R2,DL12
DJNZ R1,DL11
RET
DELAY2: MOV R1,#01H //延时0.1ms
DL21: MOV R2,#2FH
DL22: DJNZ R2,DL2
DJNZ R1,DL1
RET
单片机2:
ORG 0030H
STRT: CLR [s:9]1
MOV TMOD,#05H //计数器0选择计数方式
JB [s:9]3.5,$ //等P3.5低电平到
JNB [s:9]3.5,$ //等P3.5上升沿到
SETB TR0 //开始计数
JB [s:9]3.5,$ //等待P3.5下降沿到
CLR TR0 //计数结束
MOV [s:9]1,TL0 //计数结果,也就是电网频率测量值送入P1口。
END
单片机3:逆变PWM信号实现……
ORG 0000H
LJMP START
ORG 001BH
ACALL DSZD
RETI
ORG 0030H
//延时程序:
//延时补充A
DELAYA: MOV R1,#D5H
DLA: DJNZ R1,DLA
NOP
RET
//延时补充B
DELAYB: MOV R1,#D5H
DLB: DJNZ R1,DLB
RET
//延时补充C
DELAYC: MOV R1,#D4H
DLC: DJNZ R1,DLC
RET
//延时补充D
DELAYD: MOV R1,#D3H
DLD: DJNZ R1,DLD
RET
//延时补充E
DELAYE: MOV R1,#D2H
DLE: DJNZ R1,DLE
RET
//延时补充F
DELAYF: MOV R1,#D1H
DLF: DJNZ R1,DLF
NOP
RET
//延时补充G
DELAYG: MOV R1,#D0H
DLG: DJNZ R1,DLG
NOP
RET
//延时补充H
DELAYH: MOV R1,#CFH
DLH: DJNZ R1,DLH
NOP
RET
//延时补充I
DELAYI: MOV R1,#CEH
DLI: DJNZ R1,DLI
RET
//延时补充J
DELAYJ: MOV R1,#CDH
DLJ: DJNZ R1,DLJ
RET
//延时补充K
DELAYK: MOV R1,#CCH
DLK: DJNZ R1,DLK
RET
//延时159us
DELAY159: MOV R1, #4EH
DL159: DJNZ R1,DL159
NOP
RET
//延时461us
DELAY461: MOV R1,#E5H
DL461: DJNZ R1,DL461
NOP
RET
//延时718us
DELAY718: MOV R1 , #02H
DL718B: MOV R2 , #B1H
DL718A: DJNZ R2 , DL718A
DJNZ R1 , DL718B
NOP
NOP
RET
//延时906us
DELAY906: MOV R1,#02H
DL906B: MOV R2,#E0H
DL906A: DJNZ R2,DL906A
DJNZ R1,DL906B
NOP
NOP
RET
//延时1004us
DELAY1004: MOV R1,#02H
DL1004B: MOV R2,#F8H
DL1004A: DJNZ R2,DL1004A
DJNZ R1,DL1004B
NOP
NOP
NOP
NOP
RET
//延时158us
DELAY158: MOV R1, #4EH
DL158: DJNZ R1,DL158
RET
//延时158us补充
DELAY158B: MOV R1,#D5H
DL158B: DJNZ R1,DL158B
NOP
RET
//延时459us
DELAY459: MOV R1,#98H
DL459: NOP
DJNZ R1,DL459
NOP
RET
//延时715us:
DELAY715: MOV R1,#02H
DL715B: MOV R2,#B0H
DL715A: DJNZ R2,DL715A
DJNZ R1,DL715B
NOP
NOP
NOP
RET
//延时902us:
DELAY902: MOV R1,#02H
DL902B: MOV R2,#DFH
DL902A: DJNZ R2,DL902A
DJNZ R1,DL902B
NOP
NOP
RET
//延时1000us:
DELAY1000: MOV R1 , #02H
DL1000B: MOV R2 , #F7H
DL1000A: DJNZ R2 , DL1000A
DJNZ R1 , DL1000B
NOP
NOP
NOP
NOP
RET
//延时712us:
DELAY712: MOV R1,#02H
DL712B: MOV R2,#AFH
DL712A: DJNZ R2,DL712A
DJNZ R1,DL712B
NOP
NOP
NOP
NOP
RET
//延时899us:
DELAY899: MOV R1 , #02H
DL899B: MOV R2,#DEH
DL899A: DJNZ R2 , DL899A
DJNZ R1,DL899B
NOP
NOP
NOP
RET
//延时996us:
DELAY996: MOV R1,#02H
DL996B: MOV R2,#F6H
DL996A: DJNZ R2,DL996A
DJNZ R1,DL996B
NOP
NOP
NOP
NOP
RET
//延时157us:
DELAY157: MOV R1,#4DH
DL157: DJNZ R1,DL157
NOP
RET
//延时456us:
DELAY456: MOV R1,#97H
DL456: NOP
DJNZ R1,DL456
NOP
RET
//延时710us:
DELAY710: MOV R1,#02H
DL710B: MOV R2,#AFH
DL710A: DJNZ R2,DL710A
DJNZ R1,DL710B
NOP
NOP
RET
//延时895us:
DELAY895: MOV R1,#02H
DL895B: MOV R2,#DDH
DL895A: DJNZ R2,DL895A
DJNZ R1,DL895B
NOP
NOP
NOP
RET
//延时992us:
DELAY992: MOV R1,#02H
DL992B: MOV R2,#F6H
DL992A: DJNZ R2,DL992A
DJNZ R1,DL992B
RET
//延时454us:
DELAY454: MOV R1,#E0H
DL454: DJNZ R1,DL454
NOP
NOP
NOP
NOP
RET
//延时707us:
DELAY707: MOV R1,#02H
DL707B: MOV R2,#AEH
DL707A: DJNZ R2,DL707A
DJNZ R1,DL707B
NOP
NOP
NOP
RET
//延时892us:
DELAY892: MOV R1,#02H
DL892B: MOV R2,#DDH
DL892A: DJNZ R2,DL892A
DJNZ R1,DL892B
RET
//延时988us:
DELAY988: MOV R1,#02H
DL988B: MOV R2,#F4H
DL988A: DJNZ R2,DL988A
DJNZ R1,DL988B
NOP
NOP
NOP
NOP
RET
//延时156us:
DELAY156: MOV R1,#4DH
DL156: DJNZ R1,DL156
RET
//延时452us:
DELAY452: MOV R1,#E0H
DL452: DJNZ R1,DL452
NOP
NOP
RET
//延时704us:
DELAY704: MOV R1,#02H
DL704B: MOV R2,#AEH
DL704A: DJNZ R2,DL704A
DJNZ R1,DL704B
RET
//延时888us:
DELAY888: MOV R1,#02H
DL888B: MOV R2,#DBH
DL888A: DJNZ R2,DL888A
DJNZ R2,DL888B
NOP
NOP
NOP
NOP
RET
//延时984us:
DELAY984: MOV R1,#02H
DL984B: MOV R2,#F4H
DL984A: DJNZ R2,DL984A
DJNZ R1,DL984B
RET
//延时155us:
DELAY155: MOV R1,#4CH
DL155: DJNZ R1,DL155
NOP
RET
//延时450us:
DELAY452: MOV R1,#E0H
DL452: DJNZ R1,DL452
RET
//延时701us:
DELAY701: MOV R1,#02H
DL701B: MOV R2,#ADH
DL701A: DJNZ R2,DL701A
DJNZ R1,DL701B
NOP
RET
//延时884us:
DELAY884: MOV R1,#02H
DL884B: MOV R2,#DBH
DL884A: DJNZ R2,DL884A
DJNZ R2,DL884B
RET
//延时980us:
DELAY980: MOV R1,#02H
DL980B: MOV R2,#F2H
DL980A: DJNZ R2,DL980A
DJNZ R1,DL980B
NOP
NOP
NOP
NOP
RET
//延时448us:
DELAY448: MOV R1,#DEH
DL448: DJNZ R1,DL448
NOP
NOP
RET
//延时698us:
DELAY698: MOV R1,#02H
DL698B: MOV R2,#ACH
DL698A: DJNZ R2,DL698A
DJNZ R1,DL698B
NOP
NOP
RET
//延时881us:
DELAY881: MOV R1,#02H
DL881B: MOV R2,#DAH
DL881A: DJNZ R2,DL881A
DJNZ R1,DL881B
NOP
RET
//延时976us:
DELAY976: MOV R1,#02H
DL976B: MOV R2,#F2H
DL976A: DJNZ R2,DL976A
DJNZ R1,DL976B
RET
//延时154us:
DELAY154: MOV R1,#4CH
DL154: DJNZ R1,DL154
RET
//延时447us:
DELAY447: MOV R1,#DEH
DL447: DJNZ R1,DL447
NOP
RET
//延时696us:
DELAY696: MOV R1,#02H
DL696B: MOV R2,#ACH
DL696A: DJNZ R2,DL696A
DJNZ R1,DL696B
RET
//延时877us:
DELAY877: MOV R1,#02H
DL887B: MOV R2,#D9H
DL887A: DJNZ R2,DL887A
DJNZ R1,DL887B
NOP
RET
//延时972us:
DELAY972: MOV R1,#02H
DL972B: MOV R2,#F0H
DL972A: DJNZ R2,DL972A
DJNZ R1,DL972B
NOP
NOP
NOP
NOP
RET
//延时445us:
DELAY445: MOV R1,#DDH
DL445: DJNZ R1,DL445
NOP
RET
//延时693us:
DELAY693: MOV R1,#02H
DL693B: MOV R2,#ABH
DL693A: DJNZ R2,DL693A
DJNZ R1,DL693B
NOP
RET
//延时874us:
DELAY874: MOV R1,#02H
DL874B: MOV R2,#D8H
DL874A: DJNZ R2,DL874A
DJNZ R1,DL874B
NOP
NOP
RET
//延时968us:
DELAY968: MOV R1,#02H
DL968B: MOV R2,#F0H
DL968A: DJNZ R2,DL968A
DJNZ R1,DL968B
RET
//延时153us:
DELAY153: MOV R1,#4BH
DL153: DJNZ R1,DL153
NOP
RET
//延时443us:
DELAY443: MOV R1,#DCH
DL443: DJNZ R1,DL443
NOP
RET
//延时690us:
DELAY690: MOV R1,#02H
DL690B: MOV R2,#AAH
DL690A: DJNZ R2,DL690A
DJNZ R1,DL690B
NOP
NOP
RET
//延时870us:
DELAY870: MOV R1,#02H
DL870B: MOV R2,#D7H
DL870A: DJNZ R2,DL870A
DJNZ R1,DL870B
NOP
NOP
RET
//延时964us:
DELAY964: MOV R1,#02H
DL964B: MOV R2,#EFH
DL964A: DJNZ R2,DL964A
DJNZ R1,DL964B
RET
PWMHZ: CJNE R0,#FF,HZ254 //延时选择部分
ACALL [s:9]WM255
RET
HZ254: CJNE R0,#FE,HZ253
ACALL [s:9]WM254
RET
HZ253: CJNE R0,#FD,HZ252
ACALL [s:9]WM253
RET
HZ252: CJNE R0,#FC,HZ251
ACALL [s:9]WM252
RET
HZ251: CJNE R0,#FB,HZ250
ACALL [s:9]WM251
RET
HZ250: CJNE R0,#FB,HZ249
ACALL [s:9]WM250
RET
HZ249: CJNE R0,#FA,HZ248
ACALL [s:9]WM249
RET
HZ248: CJNE R0,#F9,HZ247
ACALL [s:9]WM248
RET
HZ247: CJNE R0,#F8,HZ246
ACALL [s:9]WM247
RET
HZ246: CJNE R0,#F7,HZ245
ACALL [s:9]WM246
RET
HZ245: CJNE R0,#F6,PWMHZ
ACALL [s:9]WM245
RET
DSZD: SETB F0
JNB TF1,$
SETB [s:9]1.1
CLR F0
RETI
DSTZ: MOV R4,#0BH //定义R4为0B时为中断延时
ACALL [s:9]WMHZ
MOV TH1,#FCH
MOV TL1,R3
SETB TR1
RET
START: MOV TMOD,#11H
MOV IE,#88H
CLR TR0
JB [s:9]1.0,$
SETB TR0
JB [s:9]1.0,$
CLR TR0
MOV R0,TL0 //读取P1.0的频率
CLR [s:9]1.0 //PWM波产生部分
ACALL DSTZ
MOV R4,#00H //定义R4为00时为延时1补充
ACALL [s:9]WMHZ
SETB [s:9]1.0
MOV R4,#01H //定义R4为01时为延时1
ACALL [s:9]WMHZ
CLR [s:9]1.0
JBC F0,$ //标志为1时等待,等待定时中断结束
ACALL DSTZ
MOV R4,#02H //定义R4为02时为延时2
ACALL [s:9]WMHZ
CLR [s:9]1.0
JBC F0,$
ACALL DSTZ
MOV R4,#03H //定义R4为03时为延时3
ACALL [s:9]WMHZ
CLR [s:9]1.0
JBC F0,$
ACALL DSTZ
MOV R4,#04H //定义R4为04时为延时4
ACALL [s:9]WMHZ
CLR [s:9]1.0
JBC F0,$
ACALL DSTZ
MOV R4,#05H //定义R4为05时为延时5
ACALL [s:9]WMHZ
CLR [s:9]1.0
JBC F0,$
ACALL DSTZ
MOV R4,#06H //定义R4为06时为延时6
ACALL [s:9]WMHZ
CLR [s:9]1.0
JBC F0,$
ACALL DSTZ
MOV R4,#07H //定义R4为07时为延时7
ACALL [s:9]WMHZ
CLR [s:9]1.0
JBC F0,$
ACALL DSTZ
MOV R4,#08H //定义R4为08时为延时8
ACALL [s:9]WMHZ
CLR [s:9]1.0
JBC F0,$
ACALL DSTZ
MOV R4,#09H //定义R4为09时为延时9
ACALL [s:9]WMHZ
CLR [s:9]1.0
JBC F0,$
ACALL DSTZ
MOV R4,#0AH //定义R4为10时为延时10
ACALL [s:9]WMHZ
CLR [s:9]1.0
JBC F0,$
AJMP START
PWM255: CJNE R4,#0B,DLTA0 //PWM255延时细化
MOV R3,#04H
RET
DLTA0: CJNE R4,#00,DLTA1
ACALL DELAYA
RET
DLTA1: CJNE R4,#01,DLTA2
ACALL DELAY159
RET
DLTA2: CJNE R4,#02,DLTA3
ACALL DELAY461
RET
DLTA3: CJNE R4,#03,DLTA4
ACALL DELAY718
RET
DLTA4: CJNE R4,#04,DLTA5
ACALL DELAY906
RET
DLTA5: CJNE R4,#05,DLTA6
ACALL DELAY1004
RET
DLTA6: CJNE R4,#06,DLTA7
ACALL DELAY1004
RET
DLTA7: CJNE R4,#07,DLTA8
ACALL DELAY906
RET
DLTA8: CJNE R4,#08,DLTA9
ACALL DELAY718
RET
DLTA9: CJNE R4,#09,DLTA10
ACALL DELAY461
RET
DLTA10: CJNE R4,#0A,DLTA0
ACALL DELAY159
RET
PWM254: CJNE R4,#0B,DLTB0 //PWM254延时细化
MOV R3,#08H
RET
DLTB0: CJNE R4,#00,DLTB1
ACALL DELAYB
RET
DLTB1: CJNE R4,#01,DLTB2
ACALL DELAY158
RET
DLTB2: CJNE R4,#02,DLTB3
ACALL DELAY459
RET
DLTB3: CJNE R4,#03,DLTB4
ACALL DELAY715
RET
DLTB4: CJNE R4,#04,DLTB5
ACALL DELAY902
RET
DLTB5: CJNE R4,#05,DLTB6
ACALL DELAY1000
RET
DLTB6: CJNE R4,#06,DLTB7
ACALL DELAY1000
RET
DLTB7: CJNE R4,#07,DLTB8
ACALL DELAY902
RET
DLTB8: CJNE R4,#08,DLTB9
ACALL DELAY715
RET
DLTB9: CJNE R4,#09,DLTB10
ACALL DELAY459
RET
DLTB10: CJNE R4,#0A,DLTB0
ACALL DELAY159
RET
PWM253: CJNE R4,#0B,DLTC0 //PWM253延时细化
MOV R3,#0CH
RET
DLTC0: CJNE R4,#00,DLTC1
ACALL DELAYC
RET
DLTC1: CJNE R4,#01,DLTC2
ACALL DELAY158
RET
DLTC2: CJNE R4,#02,DLTC3
ACALL DELAY459
RET
DLTC3: CJNE R4,#03,DLTC4
ACALL DELAY712
RET
DLTC4: CJNE R4,#04,DLTC5
ACALL DELAY899
RET
DLTC5: CJNE R4,#05,DLTC6
ACALL DELAY996
RET
DLTC6: CJNE R4,#06,DLTC7
ACALL DELAY996
RET
DLTC7: CJNE R4,#07,DLTC8
ACALL DELAY899
RET
DLTC8: CJNE R4,#08,DLTC9
ACALL DELAY712
RET
DLTC9: CJNE R4,#09,DLTC10
ACALL DELAY459
RET
DLTC10: CJNE R4,#0A,DLTB0
ACALL DELAY158
RET
PWM252: CJNE R4,#0B,DLTD0 //PWM252延时细化
MOV R3,#10H
RET
DLTD0: CJNE R4,#00,DLTD1
ACALL DELAYD
RET
DLTD1: CJNE R4,#01,DLTD2
ACALL DELAY157
RET
DLTD2: CJNE R4,#02,DLTD3
ACALL DELAY456
RET
DLTD3: CJNE R4,#03,DLTD4
ACALL DELAY710
RET
DLTD4: CJNE R4,#04,DLTD5
ACALL DELAY895
RET
DLTD5: CJNE R4,#05,DLTD6
ACALL DELAY992
RET
DLTD6: CJNE R4,#06,DLTD7
ACALL DELAY992
RET
DLTD7: CJNE R4,#07,DLTD8
ACALL DELAY895
RET
DLTD8: CJNE R4,#08,DLTD9
ACALL DELAY710
RET
DLTD9: CJNE R4,#09,DLTD10
ACALL DELAY456
RET
DLTD10: CJNE R4,#0A,DLTD0
ACALL DELAY157
RET
PWM251: CJNE R4,#0B,DLTE0 //PWM251延时细化
MOV R3,#14H
RET
DLTE0: CJNE R4,#00,DLTE1
ACALL DELAYE
RET
DLTE1: CJNE R4,#01,DLTE2
ACALL DELAY157
RET
DLTE2: CJNE R4,#02,DLTE3
ACALL DELAY454
RET
DLTE3: CJNE R4,#03,DLTE4
ACALL DELAY707
RET
DLTE4: CJNE R4,#04,DLTE5
ACALL DELAY892
RET
DLTE5: CJNE R4,#05,DLTE6
ACALL DELAY988
RET
DLTE6: CJNE R4,#06,DLTE7
ACALL DELAY988
RET
DLTE7: CJNE R4,#07,DLTE8
ACALL DELAY892
RET
DLTE8: CJNE R4,#08,DLTE9
ACALL DELAY707
RET
DLTE9: CJNE R4,#09,DLTE10
ACALL DELAY454
RET
DLTE10: CJNE R4,#0A,DLTE0
ACALL DELAY157
RET
PWM250: CJNE R4,#0B,DLTF0 //PWM250延时细化
MOV R3,#18H
RET
DLTF0: CJNE R4,#00,DLTF1
ACALL DELAYF
RET
DLTF1: CJNE R4,#01,DLTF2
ACALL DELAY156
RET
DLTF2: CJNE R4,#02,DLTF3
ACALL DELAY452
RET
DLTF3: CJNE R4,#03,DLTF4
ACALL DELAY704
RET
DLTF4: CJNE R4,#04,DLTF5
ACALL DELAY888
RET
DLTF5: CJNE R4,#05,DLTF6
ACALL DELAY984
RET
DLTF6: CJNE R4,#06,DLTF7
ACALL DELAY984
RET
DLTF7: CJNE R4,#07,DLTF8
ACALL DELAY888
RET
DLTF8: CJNE R4,#08,DLTF9
ACALL DELAY704
RET
DLTF9: CJNE R4,#09,DLTF10
ACALL DELAY452
RET
DLTF10: CJNE R4,#0A,DLTF0
ACALL DELAY156
RET
PWM249: CJNE R4,#0B,DLTG0 //PWM249延时细化
MOV R3,#1CH
RET
DLTG0: CJNE R4,#00,DLTG1
ACALL DELAYG
RET
DLTG1: CJNE R4,#01,DLTG2
ACALL DELAY155
RET
DLTG2: CJNE R4,#02,DLTG3
ACALL DELAY450
RET
DLTG3: CJNE R4,#03,DLTG4
ACALL DELAY701
RET
DLTG4: CJNE R4,#04,DLTG5
ACALL DELAY884
RET
DLTG5: CJNE R4,#05,DLTG6
ACALL DELAY980
RET
DLTG6: CJNE R4,#06,DLTG7
ACALL DELAY980
RET
DLTG7: CJNE R4,#07,DLTG8
ACALL DELAY884
RET
DLTG8: CJNE R4,#08,DLTG9
ACALL DELAY701
RET
DLTG9: CJNE R4,#09,DLTG10
ACALL DELAY450
RET
DLTG10: CJNE R4,#0A,DLTG0
ACALL DELAY155
RET
PWM248: CJNE R4,#0B,DLTH0 //PWM248延时细化
MOV R3,#20H
RET
DLTH0: CJNE R4,#00,DLTH1
ACALL DELAYH
RET
DLTH1: CJNE R4,#01,DLTH2
ACALL DELAY155
RET
DLTH2: CJNE R4,#02,DLTH3
ACALL DELAY448
RET
DLTH3: CJNE R4,#03,DLTH4
ACALL DELAY698
RET
DLTH4: CJNE R4,#04,DLTH5
ACALL DELAY881
RET
DLTH5: CJNE R4,#05,DLTH6
ACALL DELAY976
RET
DLTH6: CJNE R4,#06,DLTH7
ACALL DELAY976
RET
DLTH7: CJNE R4,#07,DLTH8
ACALL DELAY881
RET
DLTH8: CJNE R4,#08,DLTH9
ACALL DELAY698
RET
DLTH9: CJNE R4,#09,DLTH10
ACALL DELAY448
RET
DLTH10: CJNE R4,#0A,DLTH0
ACALL DELAY155
RET
PWM247: CJNE R4,#0B,DLTI0 //PWM247延时细化
MOV R3,#24H
RET
DLTI0: CJNE R4,#00,DLTI1
ACALL DELAYI
RET
DLTI1: CJNE R4,#01,DLTI2
ACALL DELAY154
RET
DLTI2: CJNE R4,#02,DLTI3
ACALL DELAY447
RET
DLTI3: CJNE R4,#03,DLTI4
ACALL DELAY696
RET
DLTI4: CJNE R4,#04,DLTI5
ACALL DELAY877
RET
DLTI5: CJNE R4,#05,DLTI6
ACALL DELAY972
RET
DLTI6: CJNE R4,#06,DLTI7
ACALL DELAY972
RET
DLTI7: CJNE R4,#07,DLTI8
ACALL DELAY877
RET
DLTI8: CJNE R4,#08,DLTI9
ACALL DELAY696
RET
DLTI9: CJNE R4,#09,DLTI10
ACALL DELAY447
RET
DLTI10: CJNE R4,#0A,DLTI0
ACALL DELAY154
RET
PWM246: CJNE R4,#0B,DLTJ0 //PWM246延时细化
MOV R3,#28H
RET
DLTJ0: CJNE R4,#00,DLTJ1
ACALL DELAYJ
RET
DLTJ1: CJNE R4,#01,DLTJ2
ACALL DELAY154
RET
DLTJ2: CJNE R4,#02,DLTJ3
ACALL DELAY445
RET
DLTJ3: CJNE R4,#03,DLTJ4
ACALL DELAY693
RET
DLTJ4: CJNE R4,#04,DLTJ5
ACALL DELAY874
RET
DLTJ5: CJNE R4,#05,DLTJ6
ACALL DELAY968
RET
DLTJ6: CJNE R4,#06,DLTJ7
ACALL DELAY968
RET
DLTJ7: CJNE R4,#07,DLTJ8
ACALL DELAY874
RET
DLTJ8: CJNE R4,#08,DLTJ9
ACALL DELAY693
RET
DLTJ9: CJNE R4,#09,DLTJ10
ACALL DELAY445
RET
DLTJ10: CJNE R4,#0A,DLTJ0
ACALL DELAY154
RET
PWM245: CJNE R4,#0B,DLTK0 //PWM245延时细化
MOV R3,#28H
RET
DLTK0: CJNE R4,#00,DLTK1
ACALL DELAYK
RET
DLTK1: CJNE R4,#01,DLTK2
ACALL DELAY153
RET
DLTK2: CJNE R4,#02,DLTK3
ACALL DELAY443
RET
DLTK3: CJNE R4,#03,DLTK4
ACALL DELAY690
RET
DLTK4: CJNE R4,#04,DLTK5
ACALL DELAY870
RET
DLTK5: CJNE R4,#05,DLTK6
ACALL DELAY964
RET
DLTK6: CJNE R4,#06,DLTK7
ACALL DELAY964
RET
DLTK7: CJNE R4,#07,DLTK8
ACALL DELAY870
RET
DLTK8: CJNE R4,#08,DLTK9
ACALL DELAY690
RET
DLTK9: CJNE R4,#09,DLTK10
ACALL DELAY443
RET
DLTK10: CJNE R4,#0A,DLTK0
ACALL DELAY153
RET
200字以内,仅用于支线交流,主线讨论请采用回复功能。