AT89C51检测旋转光电编码器程序(国外英文资料).doc

AT89C51检测旋转光电编码器程序(国外英文资料).doc

  1. 1、本文档共35页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
AT89C51检测旋转光电编码器程序(国外英文资料)

AT89C51检测旋转光电编码器程序(国外英文资料) Photoelectric encoder output orthogonal signal as shown below: The clockwise rotation of 90 degrees, B believes that A advance: A: _|--|__|--|_ B: __|--|__|--| The counterclockwise rotation of B phase signal No. 90 degrees ahead of A trust: A:__|--|__|--|_ B:_|--|__|--|__ Here are two procedures for AT89C2051 detection and frequency doubling: The use of external interrupt mode; ORG 00H LJMP MAIN ORG 03H LJMP INT0 ORG 13H LJMP INT1 ORG 50H MAIN: MOV SP, #40H MOV P3, #0FFH MOV IE, ; set external interrupt MOV TCON, SETB EA MA1: MOV P1, #0FFH MOV P3, #0FFH SJMP MA1 Statement; INT0: PUSH PSW CLR EA I0: JNB P1.0, FAN CLR P3.4 SJMP INT0END FAN: CLR P3.5 INT0END: POP PSW SETB EA MOV P3, #0FFH RETI INT1: PUSH PSW CLR EA JNB P1.0, ZHENG CLR P3.5 SJMP INT1END ZHENG: CLR P3.4 INT1END: POP PSW SETB EA MOV P3, #0FFH RETI After treatment by P3.4\P3.5 respectively in the clockwise and counter clockwise when the output pulse signal into AT89C51 T0, T1 count The following is the counting and processing program AT89C51 is responsible for signal processing and in the 12864 LCD module on the actual values of the display, resolution 0.05MM Jinpeng LCD module OCMJ4X8C RS EQU P0.0 I/O RS; export definition for instruction / data selection end RW EQU P0.1 E EQU P0.2 I/O E; export definition, in order to end PSB EQU P0.3 RESET EQU P0.4 FIRST_COL EQU 36H; char / Chinese characters display start line FIRST_ROW EQU 37H; define the character / Chinese characters display start column WORD_WID EQU 38H; define the character / Chinese characters display length WORD_LIN EQU 39H; define the character / Chinese characters show the number of lines FIRST_ADD EQU 3AH; char / Chinese characters display start position START_ADD EQU 3BH; the starting position of the cache unit FIRST_LIN EQU 3CH; the initial position for the cache unit A0 EQU 30H A1 EQU 31H; A2 EQU 32H B0 EQU 33H B1 EQU 34H Z0 EQU 35H; Z5 BIT 20H.0; positive and negative negative sign ORG 00H L

文档评论(0)

f8r9t5c + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:8000054077000003

1亿VIP精品文档

相关文档