当前位置:网站首页>arm按键控制led灯闪烁(嵌入式按键实验报告)
arm按键控制led灯闪烁(嵌入式按键实验报告)
2022-07-31 15:38:00 【全栈程序员站长】
大家好,又见面了,我是你们的朋友全栈君。
实验六
键盘控制
LED
灯实验
1
实验目的
(1)
通过实验掌握中断式键盘控制与设计方法;
(2)
熟练编写
S3C2410
中断服务程序。
2
实验设备
(1)
S3C2410
嵌入式开发板,
JTAG
仿真器。
(2)
软件:
PC
机操作系统
Windows XP
,
ADS1.2
集成开发环境,仿真器驱
动程序,超级终端通讯程序。
3
实验内容
编写中断处理程序,
处理一个键盘中断,
并在串口打印中断及按键显示信息。
4
实验步骤
(1)
参照模板工程,
新建一个工程
keypad
,
添加相应的文件,
并修改
keypad
的工程设置;
(2)
创建
keypad.c
并加入到工程
keypad
中;
(3)
编写键盘中断程序;
参考代码如下:
①串口初始化程序
void uart_init()/* UART
串口初始化
*/
{
GPHCON |= 0xa0;
//GPH2,GPH3 used as TXD0,RXD0
GPHUP
= 0x0;
//GPH2,GPH3
内部上拉
ULCON0
= 0x03;
//8N1
UCON0
= 0x05;
//
查询方式为轮询或中断
;
时钟选择为
PCLK
UFCON0 = 0x00;
//
不使用
FIFO
UMCON0 = 0x00;
//
不使用流控
UBRDIV0 = 26;
//
波特率为
57600,PCLK=12Mhz
}
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/127984.html原文链接:https://javaforall.cn
边栏推荐
- MySQL的相关问题
- Implement anti-shake and throttling functions
- 为什么黑客领域几乎一片男生?
- JVM参数解析 Xmx、Xms、Xmn、NewRatio、SurvivorRatio、PermSize、PrintGC「建议收藏」
- vb中如何连接mysql_vb怎么连接数据库「建议收藏」
- Gorm—Go language database framework
- Excel quickly aligns the middle name of the table (two-word name and three-word name alignment)
- 更新数据表update
- Precautions and solutions when SIGABRT error is reported
- JVM parameter analysis Xmx, Xms, Xmn, NewRatio, SurvivorRatio, PermSize, PrintGC "recommended collection"
猜你喜欢

Dialogue with Zhuang Biaowei: The first lesson of open source

AVH Deployment Practice (1) | Deploying the Flying Paddle Model on Arm Virtual Hardware

The use of button controls

工程流体力学复习

四象限时间管理有多好用?

Why is the field of hacking almost filled with boys?

Tencent Cloud Deployment----DevOps

Ubantu专题5:设置静态ip地址

Getting Started with TextBlock Control Basic Tools Usage, Get Started

11 pinia使用
随机推荐
Applicable Scenarios of Multi-Master Replication (1) - Multi-IDC
对话庄表伟:开源第一课
工程力学复习资料
数据表插入数据insert into
Synchronized and volatile interview brief summary
01 邂逅typescript,环境搭建
DBeaver连接MySQL 8.x时Public Key Retrieval is not allowed 错误解决
Linux check redis version (check mongodb version)
三、数组
Use of radiobutton
MySQL database operations
RecyclerView高效使用第二节
hough变换检测直线原理(opencv霍夫直线检测)
使用 GraphiQL 可视化 GraphQL 架构
【CUDA学习笔记】初识CUDA
Public Key Retrieval is not allowed error solution when DBeaver connects to MySQL 8.x
button控件的使用
Kubernetes principle analysis and practical application manual, too complete
The principle of hough transform detection of straight lines (opencv hough straight line detection)
Efficient use of RecyclerView Section 2