⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 prog39.asm

📁 包括了各种常用的8051单片机的程序
💻 ASM
字号:
;  PROG39 - Comparing Voltage Inputs
;
;  This Application Compares the voltages on Pins P1.0 and P1.1 and
;   Lights an LED when the Voltage on P1.0 is greater.
;
;  For the Voltage Sources, Two LDRs are Used, with one terminal at
;   Ground and the other connected to P1.0/1.  One LDR isconnected to a 4.7 K
;   Pullup and the other connected to a 10K Pot Pull Up.  
;
;  Myke Predko
;  98.04.05
;
;  Hardware Notes:
;  AT89C2051 is used as the Microcontroller
;   - Oscillator Speed is 4 MHz
;  Voltage "1" is on P1.0
;  Voltage "2" is on P1.1
;   - Comparator Output Taken from P3.6
;  LED is Connected to P3.7

;  Constant Declarations

;  Variable Declarations


;  Macros


;  Mainline
 org 0                          ;  Execution Starts Here

Loop:                           ;  Just Loop Around the Voltage Read

  mov     C,P3.6                ;  Read the Comparator
  mov     P3.7,C                ;  Output the Comparator Value
  
  ajmp    Loop

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -