文件名称:GPIO
- 所属分类:
- 微处理器(ARM/PowerPC等)
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2013-08-02
- 文件大小:
- 99kb
- 下载次数:
- 0次
- 提 供 者:
- 宋**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
Keil基于LPC2138的程序设计与电路仿真
1. GPIO程序设计与电路仿真
使用P0.0~P0.7的输出功能来控制LED闪烁。采用灌电流的方式驱动LED,即输出低电平时控制LED点亮。
首先运用PINSEL0、PINSEL1寄存器设置所有引脚连接GPIO,使用IO0DIR寄存器设置P0.0~P0.7为控制输出口,运用IO0SET寄存器进行置位操作,通过使用while、for循环语句,同时调用延时程序,利用清零寄存器IO0CLR、置位寄存器IO0SET交替进行操作,驱动LED的亮灭。
-Keil LPC2138-based program design and circuit simulation 1. GPIO program design and circuit simulation using P0.0 ~ P0.7 output function to control LED flashes. Approach adopted Sink drive LED, which controls the LED lights when output low. First use PINSEL0, PINSEL1 register set all pin GPIO, use IO0DIR register setting P0.0 ~ P0.7 to control the output, use IO0SET register set operations, through the use of while, for loops, while calling delay procedure , the use of clear register IO0CLR, set registers operate alternately IO0SET to drive the LED light off.
1. GPIO程序设计与电路仿真
使用P0.0~P0.7的输出功能来控制LED闪烁。采用灌电流的方式驱动LED,即输出低电平时控制LED点亮。
首先运用PINSEL0、PINSEL1寄存器设置所有引脚连接GPIO,使用IO0DIR寄存器设置P0.0~P0.7为控制输出口,运用IO0SET寄存器进行置位操作,通过使用while、for循环语句,同时调用延时程序,利用清零寄存器IO0CLR、置位寄存器IO0SET交替进行操作,驱动LED的亮灭。
-Keil LPC2138-based program design and circuit simulation 1. GPIO program design and circuit simulation using P0.0 ~ P0.7 output function to control LED flashes. Approach adopted Sink drive LED, which controls the LED lights when output low. First use PINSEL0, PINSEL1 register set all pin GPIO, use IO0DIR register setting P0.0 ~ P0.7 to control the output, use IO0SET register set operations, through the use of while, for loops, while calling delay procedure , the use of clear register IO0CLR, set registers operate alternately IO0SET to drive the LED light off.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
GPIO\CONFIG.H
....\GPIO.axf
....\GPIO.DSN
....\GPIO.hex
....\GPIO.htm
....\GPIO.lnp
....\GPIO.map
....\GPIO.Opt
....\GPIO.plg
....\GPIO.PWI
....\GPIO.sct
....\GPIO.tra
....\GPIO.Uv2
....\GPIO_Opt.Bak
....\GPIO_Target 1.dep
....\GPIO_Uv2.Bak
....\HEAP.S
....\IRQ.S
....\Last Loaded GPIO.DBK
....\LPC2138.H
....\main.C
....\main.crf
....\main.d
....\main.i
....\main.o
....\main.txt
....\STACK.S
....\Startup.lst
....\Startup.o
....\Startup.s
....\TARGET.C
....\TARGET.H
GPIO