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.
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
下载说明: 本光盘的所有代码均在Keil C51 7.0以上版本编译通过。读者的电脑只需要 能够运行Windows 98 以上版本的操作系统、并能够安装Keil C51 7.0以上版本 的软件即可。 读者可以到Keil公司的主页(http://www.keil.com/demo/)免费下载 Keil C51试用版软件。但试用版的Keil C51 软件有2KB RAM的限制,部分程序 将不能通过编译。
资源推荐
资源详情
资源评论
收起资源包目录
danpianjiC51.rar_DEMO_Keil C51 Compiler_keil c51_ram_C51 (1261个子文件)
11.1 16KB
7.1 11KB
4.1 9KB
8.1 7KB
10.1 3KB
5.1 642B
8.2 9KB
6.2 4KB
2.21 6KB
2.29 7KB
10.3 8KB
6.3 2KB
9.3 642B
8.3 642B
2.30 8KB
8.4 23KB
4.4 9KB
6.4 3KB
5.4 2KB
8.5 7KB
6.5 4KB
5 2KB
5111_ADC 3KB
index.__i 41B
11-7.1.__i 36B
10.1.__i 34B
4.1.__i 33B
8.3.__i 33B
7.1.__i 33B
8.5.__i 33B
RTXCONF.A51 93KB
START900.A51 12KB
START900.A51 12KB
startup400.a51 11KB
START390.A51 9KB
START_AD.A51 6KB
START_AD.A51 6KB
START_AD.A51 6KB
START_AD.A51 6KB
STARTUP.A51 5KB
STARTUP.A51 5KB
STARTUP.A51 5KB
STARTUP.A51 5KB
STARTUP.A51 5KB
STARTUP.A51 5KB
STARTUP.A51 5KB
STARTUP.A51 5KB
STARTUP.A51 5KB
STARTUP.A51 5KB
STARTUP.A51 5KB
STARTUP.A51 5KB
STARTUP.A51 5KB
STARTUP.A51 5KB
STARTUP.A51 5KB
STARTUP.A51 5KB
STARTUP.A51 5KB
STARTUP.A51 5KB
STARTUP.A51 5KB
STARTUP.A51 5KB
STARTUP.A51 5KB
STARTUP.A51 5KB
STARTUP.A51 5KB
STARTUP.A51 5KB
STARTUP.A51 5KB
STARTUP.A51 5KB
STARTUP.A51 5KB
STARTUP.A51 5KB
STARTUP.A51 5KB
STARTUP.A51 5KB
STARTUP.A51 5KB
STARTUP.A51 5KB
STARTUP.A51 5KB
STARTUP.A51 4KB
STARTUP.A51 4KB
adc 3KB
ADC 2KB
adc 2KB
adda 8KB
aduc812_sim 18KB
aduc814_sim 18KB
aduc816_sim 18KB
aduc824_sim 18KB
BitIO 444B
lcd.c 73KB
9.3.c 37KB
8.3.c 26KB
Can_drv.c 22KB
8.4.c 16KB
t.c 15KB
MCB817_I2C_Example_Bit_Banged.c 11KB
11-7.1.c 10KB
SNAKE.C 9KB
8.2.c 9KB
hour.c 8KB
second.c 8KB
main.c 7KB
main.c 6KB
DTMF_Gen.c 6KB
10.3.c 6KB
7.1.c 5KB
共 1261 条
- 1
- 2
- 3
- 4
- 5
- 6
- 13
资源评论
钱亚锋
- 粉丝: 86
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功