当前位置:网站首页>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
边栏推荐
- 11 pinia使用
- 【Meetup预告】OpenMLDB+OneFlow:链接特征工程到模型训练,加速机器学习模型开发
- 工程水文学复习资料
- WPF project - basic usage of controls entry, you must know XAML
- Word table to Excel
- C language "the third is" upgrade (mode selection + AI chess)
- RecyclerView的高效使用第一节
- Excel quickly aligns the middle name of the table (two-word name and three-word name alignment)
- Deployment应用生命周期与Pod健康检查
- Grafana安装后web打开报错
猜你喜欢

Kubernetes principle analysis and practical application manual, too complete

radiobutton的使用

mysql黑窗口~建库建表

After Grafana is installed, the web opens and reports an error
![[CUDA study notes] First acquaintance with CUDA](/img/a2/f322ebe9dc483028f68882ee2c866b.png)
[CUDA study notes] First acquaintance with CUDA

Getting Started with TextBlock Control Basic Tools Usage, Get Started

RecyclerView的高效使用第一节

mongo enters error

Synchronized和volatile 面试简单汇总

Tencent Cloud Deployment----DevOps
随机推荐
OPPO在FaaS领域的探索与思考
删除 状态良好(恢复分区)的磁盘
为什么毕业季不要表白?
Delete the disk in good condition (recovery partition)
TextBlock控件入门基础工具使用用法,取上法入门
长得很怪的箱图
修改SQL语言实现Mysql 多表关联查询优化
update data table update
四象限时间管理有多好用?
Female service community product design
Implement anti-shake and throttling functions
Deployment application life cycle and Pod health check
6-22漏洞利用-postgresql数据库密码破解
AVH Deployment Practice (1) | Deploying the Flying Paddle Model on Arm Virtual Hardware
删除表格数据或清空表格
Kubernetes common commands
Oracle dynamically registers non-1521 ports
What is the difference between BI software in the domestic market?
Getting Started with TextBlock Control Basic Tools Usage, Get Started
"Autumn Recruitment Series" MySQL Interview Core 25 Questions (with answers)