当前位置:网站首页>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
边栏推荐
- 基于Redis(SETNX)实现分布式锁,案例:解决高并发下的订单超卖,秒杀
- Qt practical cases (54) - using transparency QPixmap design pictures
- 更新数据表update
- Delete table data or clear table
- radiobutton的使用
- R language ggplot2 visualization: use the ggmapplot function of the ggpubr package to visualize the MA plot (MA-plot), the font.legend parameter and the font.main parameter to set the title and legend
- Replication Latency Case (1) - Eventual Consistency
- MySQL多表联合查询
- ansible学习笔记02
- The principle of hough transform detection of straight lines (opencv hough straight line detection)
猜你喜欢
Getting Started with TextBlock Control Basic Tools Usage, Get Started
全新宝马3系上市,安全、舒适一个不落
01 邂逅typescript,环境搭建
Qt实战案例(54)——利用QPixmap设计图片透明度
After Grafana is installed, the web opens and reports an error
Qt practical cases (54) - using transparency QPixmap design pictures
01 Encounter typescript, build environment
WPF项目--控件入门基础用法,必知必会XAML
WPF project - basic usage of controls entry, you must know XAML
The use of button controls
随机推荐
复制延迟案例(1)-最终一致性
数据表插入数据insert into
删除 状态良好(恢复分区)的磁盘
Implementing DDD based on ABP
更新数据表update
自动化测试如何创造业务价值?
ML.NET相关资源整理
删除表格数据或清空表格
Public Key Retrieval is not allowed error solution when DBeaver connects to MySQL 8.x
「秋招系列」MySQL面试核心25问(附答案)
The 2nd China PWA Developer Day
Dialogue with Zhuang Biaowei: The first lesson of open source
Emmet syntax
工程水文学名词解释总结
org.apache.jasperException(could not initialize class org)
6-22 Vulnerability exploit - postgresql database password cracking
Oracle动态注册非1521端口
Matlab矩阵基本操作(定义,运算)
Foreign media right, apple on May be true in inventory
C language "the third is" upgrade (mode selection + AI chess)