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

📄 readme.txt

📁 这是单片机C51典型应用设计代码
💻 TXT
字号:
8051 Bit I/O Example Program
This example program shows how to:

Declare a Special Function Register (SFR) 
Declare a Bit in a Bit-Addressable SFR 
Configure an I/O Port Pin as an Input 
Read an Input Pin 
Write an Output Pin 
It works with virtually all devices that are 100%-compatible with the Standard 8051 Port 1.

You can test this program using the uVision2 Debugger. I/O Ports are completely simulated (input and output) so you can change the state of the P1.0 input and watch the state of the P1.1 output as it changes.

Buttons are defined for the toolbox which set and clear the P1.0 pin (see the DEBUG.INI file). You may use these buttons to change the state of P1.0.

To test this example program:

Start the debugger. 
Click on Debug - Go to run the program. 
Make sure that View - Periodic Window Update is checked. 
Click Peripherals - I/O-Ports - Port 1 to view P1. 
Click on the Set P1.0 and Clr P1.0 toolbox buttons. 
Watch as P1.1 changes to match P1.0. 

⌨️ 快捷键说明

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