当前位置:网站首页>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
边栏推荐
- TextBlock控件入门基础工具使用用法,取上法入门
- 腾讯云部署----DevOps
- ASP.NET Core generates continuous Guid
- T - sne + data visualization parts of the network parameters
- 多主复制的适用场景(1)-多IDC
- Replication Latency Case (3) - Monotonic Read
- The use of button controls
- Gorm—Go language database framework
- gerrit中如何切换远程服务器
- Synchronized and volatile interview brief summary
猜你喜欢
BGP综合实验(建立对等体、路由反射器、联邦、路由宣告及聚合)
type of timer
WPF project - basic usage of controls entry, you must know XAML
i.MX6ULL驱动开发 | 33 - NXP原厂网络设备驱动浅读(LAN8720 PHY)
Visualize GraphQL schemas with GraphiQL
基于ABP实现DDD
TRACE32 - C source code association
Internet banking stolen?This article tells you how to use online banking safely
长得很怪的箱图
leetcode303 Weekly Match Replay
随机推荐
字符指针赋值[通俗易懂]
Insert into data table to insert data
The 2nd China PWA Developer Day
Implement anti-shake and throttling functions
11 pinia use
Destruction order of thread_local variables
网银被盗?这篇文章告诉你如何安全使用网银
Matlab矩阵基本操作(定义,运算)
删除表格数据或清空表格
【7.29】代码源 - 【排列】【石子游戏 II】【Cow and Snacks】【最小生成数】【数列】
01 邂逅typescript,环境搭建
删除 状态良好(恢复分区)的磁盘
复制延迟案例(1)-最终一致性
2.索引及调优篇【mysql高级】
Implementing click on the 3D model in RenderTexture in Unity
Internet banking stolen?This article tells you how to use online banking safely
R language moves time series data forward or backward (custom lag or lead period): use the lag function in the dplyr package to move the time series data forward by one day (set the parameter n to a p
为什么黑客领域几乎一片男生?
The use of border controls
The principle of hough transform detection of straight lines (opencv hough straight line detection)