当前位置:网站首页>The arm button controls the flashing of the led light (embedded button experiment report)
The arm button controls the flashing of the led light (embedded button experiment report)
2022-07-31 15:49:00 【Full stack programmer webmaster】
Hello everyone, meet again, I'm your friend Quanstack Jun.
Experiment 6
Keyboard control
LED
Lamp experiment
1
The purpose of the experiment
(1)
Master the interrupt keyboard control and design method through experiments;
(2)
Proficient in writing
S3C2410
Interrupt service routine.
2
Experimental equipment
(1)
S3C2410
Embedded Development Board,
JTAG
Emulator.
(2)
Software:
PC
Computer operating system
Windows XP
,
ADS1.2
Integrated development environment, emulator driver
Motion program, HyperTerminal communication program.
3
Experiment content
Write an interrupt handler,
Handling a keyboard interrupt,
And print interruption and key display information on the serial port.
4
Experimental steps
(1)
Refer to the template project,
Create a new project
keypad
,
Add the appropriate file,
and modify
keypad
Project settings;
(2)
Create
keypad.c
And add to the project
keypad
middle;
(3)
Write a keyboard interrupt program;
The reference code is as follows:
①Serial port initialization program
void uart_init()/* UART
Serial port initialization
*/
{
GPHCON |= 0xa0;
//GPH2,GPH3 used as TXD0,RXD0
GPHUP
= 0x0;
//GPH2,GPH3
Internal pullup
ULCON0
= 0x03;
//8N1
UCON0
= 0x05;
//
The query mode is polling or interrupt
;
Clock selection is
PCLK
UFCON0 = 0x00;
//
Do not use
FIFO
UMCON0 = 0x00;
//
Do not use flow control
UBRDIV0 = 26;
//
Baud rate
57600,PCLK=12Mhz
}
Publisher: Full-stack programmer, please indicate the source: https://javaforall.cn/127984.htmlOriginal link: https://javaforall.cn
边栏推荐
- 工程力学复习资料
- Tencent Cloud Deployment----DevOps
- 网站漏洞修复服务商关于越权漏洞分析
- 更新数据表update
- 贪吃蛇项目(简单)
- The use of border controls
- [Meetup Preview] OpenMLDB+OneFlow: Link feature engineering to model training to accelerate machine learning model development
- AVH Deployment Practice (1) | Deploying the Flying Paddle Model on Arm Virtual Hardware
- 对话庄表伟:开源第一课
- 百度网盘网页版加速播放(有可用的网站吗)
猜你喜欢

TRACE32 - Common Operations

The use of border controls

使用 GraphiQL 可视化 GraphQL 架构

Internet banking stolen?This article tells you how to use online banking safely

基于Redis(SETNX)实现分布式锁,案例:解决高并发下的订单超卖,秒杀

【MySQL】Mysql范式及外键作用

Dialogue with Zhuang Biaowei: The first lesson of open source

【7.29】代码源 - 【排列】【石子游戏 II】【Cow and Snacks】【最小生成数】【数列】

苹果官网样式调整 结账时产品图片“巨大化”

What is the difference between BI software in the domestic market?
随机推荐
mysql black window ~ build database and build table
字符指针赋值[通俗易懂]
The use of button controls
Insert into data table to insert data
软件实现AT命令操作过程
基于ABP实现DDD
Kubernetes common commands
C程序是如何跑起来的01 —— 普通可执行文件的构成
Unity中实现点选RenderTexture中的3D模型
JVM参数解析 Xmx、Xms、Xmn、NewRatio、SurvivorRatio、PermSize、PrintGC「建议收藏」
工程水文学试卷
Delete the disk in good condition (recovery partition)
form 表单提交后,使页面不跳转[通俗易懂]
【Meetup预告】OpenMLDB+OneFlow:链接特征工程到模型训练,加速机器学习模型开发
Grafana安装后web打开报错
MySQL基础篇【单行函数】
MySQL多表联合查询
Unity 之 图集属性详解和代码示例 -- 拓展一键自动打包图集工具
TextBlock控件入门基础工具使用用法,取上法入门
在资源管理类中提供对原始资源的访问——条款15