- 1、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
ds1820 温度传感器的汇编程序(DS1820 temperature sensor assembly procedures)
ds1820 温度传感器的汇编程序(DS1820 temperature sensor assembly procedures) DS1820 temperature sensor assembly procedures Crystal oscillator: 12M TEMPER_L EQU 36H TEMPER_H EQU 35H TEMPER_NUM EQU 60H FLAG1 BIT 00H DQ BIT P3.3 AAA:MOV, SP, #70H LCALL GET_TEMPER LCALL TEMPER_COV LJMP AAA NOP C; read after conversion temperature GET_TEMPER: SETB DQ; timed entry BCD:LCALL INIT_1820 JB, FLAG1, S22 LJMP BCD; returns if DS18B20 does not exist S22:LCALL DELAY1 MOV, A, #0CCH; skip the ROM match, ------0CC LCALL WRITE_1820 MOV, A, #44H; issue a temperature conversion command LCALL WRITE_1820 NOP LCALL DELAY LCALL DELAY CBA:LCALL INIT_1820 JB, FLAG1, ABC LJMP CBA ABC:LCALL DELAY1 MOV, A, #0CCH; skip the ROM match LCALL WRITE_1820 MOV, A, #0BEH; issue a read temperature command LCALL WRITE_1820 LCALL READ_18200; READ_1820 RET C; read DS18B20 program, read one byte of data from DS18B20 READ_1820: MOV, R2, #8 RE1: CLR C SETB DQ NOP NOP CLR DQ NOP NOP NOP SETB DQ MOV, R3, #7 DJNZ R3, $ MOV, C, DQ MOV, R3, #23 DJNZ R3, $ RRC A DJNZ, R2, RE1 RET -------------------; write DS18B20 program WRITE_1820: MOV, R2, #8 CLR C WR1: CLR DQ MOV, R3, #6 DJNZ R3, $ RRC A MOV, DQ, C MOV, R3, #23 DJNZ R3, $ SETB DQ NOP DJNZ, R2, WR1 SETB DQ RET -------------------; read DS18B20 program, read the temperature data of two bytes from the DS18B20 READ_18200: MOV, R4, #2; read the temperature, highs and lows from the DS18B20 MOV, R1, #36H; low storage 36H (TEMPER_L), high place deposit 35H (TEMPER_H) RE00: MOV, R2, #8 RE01: CLR C SETB DQ NOP NOP CLR DQ NOP NOP NOP SETB DQ MOV, R3, #7 DJNZ R3, $ MOV, C, DQ MOV, R3, #23 DJNZ R3, $ RRC A DJNZ, R2, RE01 MOV, @R1, A DEC R1 DJNZ, R4, RE00 RET -------------------; temperature data will be read from the DS18B20 conversion TEMPER_COV: MOV, A, #0F0H ANL A, TEMPER_L four temperature; numerical decimal truncation in low temperature SWAP A MOV, TEMPER_NUM, A MOV, A, TEMPER_L JNB, ACC.3, TEMPER_COV1; four to five temperature values INC TEMPER_NUM TEMPER_COV1: MOV, A, TEMPER_H ANL
您可能关注的文档
- 考研长难句19-34(Postgraduate entrance examination difficult sentence 19-34).doc
- 考研高手们的七大习惯(Seven habits of masters).doc
- 现代商会运营模式的探索与创新(Exploration and innovation of Modern Chamber of commerce operation mode).doc
- 考试作文用的100个实用词语搭配(100 practical words for examination composition).doc
- 考研摘抄(PubMed excerpt).doc
- 考试前的心态(Mentality before exams).doc
- 考试心理辅导六篇(Examination counseling six).doc
- 考试科目 课程练习-再保险 网院南开(Examination subjects course practice - Reinsurance network, Nankai).doc
- 考车技巧(Vehicle examination skill).doc
- 考车牌(Test plate number).doc
- dma技术解释(DMA technical explanation).doc
- ds18b20温度传感器完整c程序(DS18B20 temperature sensor complete C program).doc
- dsp2812的adc排序器工作模式(DSP2812 ADC sorter working mode).doc
- dota 微操作(bit 微操作).doc
- dth11和ds18b20两个传感器的程序(Dth11 and DS18B20 two sensor procedures).doc
- eagle整理商务类高频词组(中口经济、金融、税收类词汇)(Eagle collate business class high-frequency phrases (Chinese, economic, financial, tax vocabulary)).doc
- dwr3 reverse ajax学习小结(dwr3反向Ajax学习小结).doc
- eclipse使用技巧(Eclipse usage skills).doc
- eb5 q&a(eb5 q & a).doc
- ebay大卖家产品开发思路(EBay seller's product development ideas).doc
文档评论(0)