中医检测治疗测试报告.docx
- 文档编号:15632726
- 上传时间:2023-07-06
- 格式:DOCX
- 页数:28
- 大小:108.80KB
中医检测治疗测试报告.docx
《中医检测治疗测试报告.docx》由会员分享,可在线阅读,更多相关《中医检测治疗测试报告.docx(28页珍藏版)》请在冰点文库上搜索。
中医检测治疗测试报告
中医经络检测治疗
总体设计:
我将仪器设置成两个模式
Model是应用经络的低电阻特性,测量人体阻抗;利用AD5933做阻抗测量部分,下图是AD5933的内部电路:
AD5933的SCL连ADuC841的时钟输出脚(即26脚),SDA连ADuC841的P1.3(即27脚),其它部分按照图上来连。
RFB线上可接电阻来选量程,值分别为:
1K量程:
R=0Ω
10K量程:
R=100Ω
100K量程:
R=10KΩ
1M量程:
R=100KΩ
SLA、SCL需上拉电阻,值的最大、最小值的计算公式:
Rmin={VDD(min)-0.4}/(3*10-3)ΩVDD(min)--电源电压的最小值
Rmax=T/0.874*CΩC--总线电容;T--上升时间
所以,VDD(min)=5V时,Rmin=1.53333kΩ
VDD(min)=3V时,Rmin=0.86667kΩ
AD5933的c=400pF,t=300ns,所以,Rmax=13.729977kΩ
我选取的电阻值是:
9.082KΩ
程序代码如下:
$mod841
BITCNTDATA30H
NOACKBIT00H
ACKBIT01H
ORG0000H
LJMPMAIN
ORG0060H
MAIN:
MOVR0,#0FFH;清除片内RAM,从0FFH开始向下清除
CLRA;清除累加器A
QING:
MOV@R0,A;清除片内RAM,
DJNZR0,QING;没有到00H,继续
MOVSP,#0D0H
CLRSPE;关SPI,开I2C
SETBI2CM;主模式I2CM=1
LCALLStartI2CMaster
SETBMDE
SETBMDO
CLRMDE
CLRMCO
LCALLDELAY
SETBMCO
LCALLDELAY
CLRMCO
START:
CLRNOACK
LCALLStartI2CMaster
REWRITE:
MOVA,#1AH
LCALLSendByteI2CMaster
MOVA,#80H
LCALLSendByteI2CMaster
MOVA,#0B0H
LCALLSendByteI2CMaster
LCALLStopI2CMaster
CLRNOACK
LCALLStartI2CMaster
MOVA,#1AH
LCALLSendByteI2CMaster
MOVA,#81H
LCALLSendByteI2CMaster
MOVA,#00H
LCALLSendByteI2CMaster
LCALLStopI2CMaster
CLRNOACK
LCALLStartI2CMaster
MOVA,#1AH
LCALLSendByteI2CMaster
MOVA,#82H
LCALLSendByteI2CMaster
MOVA,#00H
LCALLSendByteI2CMaster
LCALLStopI2CMaster
CLRNOACK
LCALLStartI2CMaster
MOVA,#1AH
LCALLSendByteI2CMaster
MOVA,#83H
LCALLSendByteI2CMaster
MOVA,#83H
LCALLSendByteI2CMaster
LCALLStopI2CMaster
CLRNOACK
LCALLStartI2CMaster
MOVA,#1AH
LCALLSendByteI2CMaster
MOVA,#84H
LCALLSendByteI2CMaster
MOVA,#12H
LCALLSendByteI2CMaster
LCALLStopI2CMaster
CLRNOACK
LCALLStartI2CMaster
MOVA,#1AH
LCALLSendByteI2CMaster
MOVA,#85H
LCALLSendByteI2CMaster
MOVA,#00H
LCALLSendByteI2CMaster
LCALLStopI2CMaster
CLRNOACK
LCALLStartI2CMaster
MOVA,#1AH
LCALLSendByteI2CMaster
MOVA,#86H
LCALLSendByteI2CMaster
MOVA,#41H
LCALLSendByteI2CMaster
LCALLStopI2CMaster
CLRNOACK
LCALLStartI2CMaster
MOVA,#1AH
LCALLSendByteI2CMaster
MOVA,#87H
LCALLSendByteI2CMaster
MOVA,#89H
LCALLSendByteI2CMaster
LCALLStopI2CMaster
CLRNOACK
LCALLStartI2CMaster
MOVA,#1AH
LCALLSendByteI2CMaster
MOVA,#88H
LCALLSendByteI2CMaster
MOVA,#01H
LCALLSendByteI2CMaster
LCALLStopI2CMaster
CLRNOACK
LCALLStartI2CMaster
MOVA,#1AH
LCALLSendByteI2CMaster
MOVA,#89H
LCALLSendByteI2CMaster
MOVA,#0FFH
LCALLSendByteI2CMaster
LCALLStopI2CMaster
CLRNOACK
LCALLStartI2CMaster
MOVA,#1AH
LCALLSendByteI2CMaster
MOVA,#8AH
LCALLSendByteI2CMaster
MOVA,#01H
LCALLSendByteI2CMaster
LCALLStopI2CMaster
CLRNOACK
LCALLStartI2CMaster
MOVA,#1AH
LCALLSendByteI2CMaster
MOVA,#8BH
LCALLSendByteI2CMaster
MOVA,#0FFH
LCALLSendByteI2CMaster
LCALLStopI2CMaster
CLRNOACKLCALLStartI2CMaster
MOVA,#1AH
LCALLSendByteI2CMaster
MOVA,#80H
LCALLSendByteI2CMaster
MOVA,#13H
LCALLSendByteI2CMaster
LCALLStopI2CMaster
CLRNOACKLCALLStartI2CMaster
MOVA,#1AH
LCALLSendByteI2CMaster
MOVA,#80H
LCALLSendByteI2CMaster
MOVA,#23H
LCALLSendByteI2CMaster
LCALLStopI2CMaster
CLRNOACK
LCALLStartI2CMaster
MOVA,#1AH
LCALLSendByteI2CMaster
MOVA,#0B0H
LCALLSendByteI2CMaster
MOVA,#94H
LCALLSendByteI2CMaster
LCALLStopI2CMaster
CLRNOACK
LCALLStartI2CMaster
MOVA,#1BH
LCALLSendByteI2CMaster
LCALLReceiveByteI2CMaster
MOV31H,A
LCALLStopI2CMaster
CLRNOACK
LCALLStartI2CMaster
MOVA,#1AH
LCALLSendByteI2CMaster
MOVA,#0B0H
LCALLSendByteI2CMaster
MOVA,#95H
LCALLSendByteI2CMaster
LCALLStopI2CMaster
CLRNOACK
LCALLStartI2CMaster
MOVA,#1BH
LCALLSendByteI2CMaster
LCALLReceiveByteI2CMaster
MOV32H,A
LCALLStopI2CMaster
CLRNOACK
LCALLStartI2CMaster
MOVA,#1AH
LCALLSendByteI2CMaster
MOVA,#0B0H
LCALLSendByteI2CMaster
MOVA,#96H
LCALLSendByteI2CMaster
LCALLStopI2CMaster
CLRNOACK
LCALLStartI2CMaster
MOVA,#1BH
LCALLSendByteI2CMaster
LCALLReceiveByteI2CMaster
MOV33H,A
LCALLStopI2CMaster
CLRNOACK
LCALLStartI2CMaster
MOVA,#1AH
LCALLSendByteI2CMaster
MOVA,#0B0H
LCALLSendByteI2CMaster
MOVA,#97H
LCALLSendByteI2CMaster
LCALLStopI2CMaster
CLRNOACK
LCALLStartI2CMaster
MOVA,#1BH
LCALLSendByteI2CMaster
LCALLReceiveByteI2CMaster
MOV34H,A
LCALLStopI2CMaster
MOVR7,#0F5H
STP:
LJMPSTOP
;---------------------------------
WENDU:
CLRNOACK
LCALLStartI2CMaster
MOVA,#1AH
LCALLSendByteI2CMaster
MOVA,#81H
LCALLSendByteI2CMaster
MOVA,#10H
LCALLSendByteI2CMaster
LCALLStopI2CMaster
CLRNOACK
LCALLStartI2CMaster
MOVA,#1AH
LCALLSendByteI2CMaster
MOVA,#81H
LCALLSendByteI2CMaster
MOVA,#00H
LCALLSendByteI2CMaster
LCALLStopI2CMaster
CLRNOACK
LCALLStartI2CMaster
MOVA,#1AH
LCALLSendByteI2CMaster
MOVA,#80H
LCALLSendByteI2CMaster
MOVA,#93H
LCALLSendByteI2CMaster
LCALLStopI2CMaster
LCALLDELAY
CLRNOACK
LCALLStartI2CMaster
MOVA,#1AH
LCALLSendByteI2CMaster
MOVA,#0B0H
LCALLSendByteI2CMaster
MOVA,#92H
LCALLSendByteI2CMaster
LCALLStopI2CMaster
CLRNOACK
LCALLStartI2CMaster
MOVA,#1BH
LCALLSendByteI2CMaster
LCALLReceiveByteI2CMaster
;CJNEA,#01H,LOOP
MOVR3,A
LCALLStopI2CMaster
CLRNOACK
LCALLStartI2CMaster
MOVA,#1AH
LCALLSendByteI2CMaster
MOVA,#0B0H
LCALLSendByteI2CMaster
;JBNOACK,STP
MOVA,#93H
LCALLSendByteI2CMaster
LCALLStopI2CMaster
;JBNOACK,STP
CLRNOACK
LCALLStartI2CMaster
MOVA,#1BH
LCALLSendByteI2CMaster
LCALLReceiveByteI2CMaster
;CJNEA,#01H,LOOP
MOVR4,A
LCALLStopI2CMaster
RET
;=======================================================================
StartI2CMaster:
SETBMDE;
CLRMCO;
CLRMDO;
SETBMDO;
SETBMCO;
LCALLDELAY;
CLRMDO;
LCALLDELAY;
CLRMCO;
LCALLDELAY;
RET
;---------------------------------
StopI2CMaster:
SETBMDE;
CLRMDO;
LCALLDELAY;
SETBMCO;
LCALLDELAY;
SETBMDO;
LCALLDELAY;
RET
;--------------------------------------------------------------------------------
SendByteI2CMaster:
MOVBITCNT,#8
SETBMDE
SENDBIT:
CLRMCO
RLCA
MOVMDO,C
LCALLDELAY
SETBMCO
LCALLDELAY
CLRMCO
LCALLDELAY
DJNZBITCNT,SENDBIT
CLRMDE
CLRMCO
LCALLDELAY
SETBMCO;
JNBMDI,NEXT
SETBNOACK
NEXT:
CLRMDO
LCALLDELAY
CLRMCO
SETBMDE
JBNOACK,STOP
RET
;--------------------------------------------------------------------------------
ReceiveByteI2CMaster:
MOVBITCNT,#8
CLRMDE
CLRMCO
RCVBIT:
LCALLDELAY
SETBMCO
MOVC,MDI
RLCA
LCALLDELAY;
CLRMCO
LCALLDELAY
DJNZBITCNT,RCVBIT
SETBMDE
SETBMDO;
LCALLDELAY;
SETBMCO
LCALLDELAY;
CLRMCO
CLRMDE
LCALLDELAY
RET
;--------------------------------------------------------------------------------
DELAY:
MOVR2,#10H
SDEL1:
NOP
DJNZR2,SDEL1
RET
STOP:
MOVR5,#0FFH
END
Mode2是应用循经感传的经络现象,在仪器两电极片之间加上交变生物脉冲波,使经络导通;
利用51单片机(具体芯片和器件如下:
ADuC841作微控制器;(自带I2C总线)
MC74HC164N作为8位串行输入输出的寄存器;
WH8281作为键盘显示驱动器,可驱动8位LED的显示,具有可读内存的功能;
AD439作为音频功率放大器;
HM62256ALP-10作为32KB的CMOS静态RAM,LM324N作为比较器)
利用ADuC841的ADC接口产生一个2.5V的脉冲信号,在LED上可以显示脉冲频率。
并且,可以根据人体不同的承受能力,通过调节按键选择不同的频率。
频率我设置了25档,大体上实现了从10HZ到250HZ之间的任意调节。
程序代码如下:
$MOD841
SP0EQU50H
CLK81EQUP3.5
DAT81EQUP3.3
KEYVALEQU31H
HIEQU33H
LOEQU34H
FUZHIEQU35H
CHUZHIEQU36H
ORG0000H
LJMPMAIN
ORG0003H
LJMPSERVE1
ORG002BH
LJMPSERVE2
ORG0080H
MAIN:
MOVR0,#7FH
CLRA
QING:
MOV@R0,A
DJNZR0,QING
MOVSP,#SP0
MOVR3,#0FFH
LCALLYS
LCALLINI8281
LCALLINI841
MOVCHUZHI,#0FFH
HERE:
SJMPHERE
;-----------------------
INI841:
SETBEA
SETBET2
SETBEX0
MOVT2CON,#00H
MOVADCCON1,#80H
MOVDACCON,#0DH
RET
;-----------------------
INI8281:
SETBCLK81
SETBDAT81
MOVA,#12H
LCALLWTO81
MOVA,#80H
LCALLWTO81
RET
;--------------------------------
SERVE1:
CLRTR2
MOVA,#93H
LCALLWTO81
LCALLRDKVAL
MOVA,KEYVAL
CJNEA,#01H,S1
LCALLFUNCTION1
LJMPOVER
S1:
CJNEA,#02H,S2
LCALLFUNCTION2
LJMPOVER
S2:
CJNEA,#03H,OVER
LCALLFUNCTION3
OVER:
RETI
;----------------------------------
FUNCTION1:
INCCHUZHI
MOVA,CHUZHI
CJNEA,#25,NEXT11
MOVCHUZHI,#00H
NEXT11:
LCALLLOAD_VALUE
LCALLXIANSHIPINLV
RET
;--------------------------
FUNCTION2:
MOVA,CHUZHI
CJNEA,#0FFH,NEXT21
LJMPOVER2
NEXT21:
CJNEA,#00H,NEXT22
LCALLLOAD_VALUE
LCALLXIANSHIPINLV
LJMPOVER2
NEXT22:
DECCHUZHI
MOVA,CHUZHI
CJNEA,#0FFH,JIXU
LJMPOVER2
JIXU:
LCALLLOAD_VALUE
LCALLXIANSHIPINLV
OVER2:
RET
;---------------------------
FUNCTION3:
MOVRCAP2H,HI
MOVRCAP2L,LO
MOVTH2,HI
MOVTL2,LO
SETBTR2
RET
;----------------------------------
LOAD_VALUE:
MOVDPTR,#TAB1
MOVA,CHUZHI
MOVCA,@A+DPTR
MOVHI,A
MOVDPTR,#TAB2
MOVA,CHUZHI
MOVCA,@A+DPTR
MOVLO,A
RET
;-----------------------------------
SERVE2:
CLRTF2
KAISHI:
INCR3
CJNER3,#200,DADISP
MOVR3,#0FFH
LJMPKAISHI
DADISP:
MOVDPTR,#TAB3
MOVA,R3
MOVCA,@A+DPTR
MOVDAC0H,A
MOVDPTR,#TAB4
MOVA,R3
MOVCA,@A+DPTR
MOVDAC0L,A
RETI
;-----------------------------------
XIANSHIPINLV:
MOVA,#14H
LCALLWTO81
MOVA,CHUZHI
ADDA,#01H
MOVB,#10
DIVAB
ORLA,#00H
LCALLWTO81
MOVA,#14H
LCALLWTO81
MOVA,B
ORLA,#10H
LCALLWTO81
MOVA,#14H
LCALLWTO81
MOVA,#20H
LCALLWTO81
RET
;----------------------------------
XIANSHIFUZHI:
MOVA,#03H
LCALLWTO81
MOVA,#0BFH
LCALLWTO81
MOVA,#01H
ADDA,FUZHI
DAA
MOVR5,A
MOVA,#14H
LCALLWTO81
MOVA,R5
MOVB,#10H
DIVAB
ORLA,#40H
LCA
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 中医 检测 治疗 测试报告