没有合适的资源?快使用搜索试试~ 我知道了~
Programming Embedded System II (8051).pdf
需积分: 10 39 下载量 88 浏览量
2008-03-15
03:04:28
上传
评论
收藏 2.06MB PDF 举报
温馨提示
试读
273页
Programming Embedded System II (8051).pdf
资源推荐
资源详情
资源评论
I
Programming
Embedded
Systems II
A 10-week course, using C
40
39
38
37
36
35
34
1
2
3
4
5
6
7
‘8051’
8
9
10
33
32
31
30
29
28
27
26
25
24
11
12
13
14
15
16
17
18
19
20
23
22
21
P3.0
P1.7
RST
P1.6
P1.5
P1.4
P1.2
P1.3
P1.1
P1.0
VSS
XTL2
XTL1
P3.7
P3.6
P3.5
P3.3
P3.4
P3.2
P3.1
/ EA
P0.6
P0.7
P0.5
P0.4
P0.3
P0.1
P0.2
P0.0
VCC
P2.0
P2.2
P2.1
P2.3
P2.4
P2.5
P2.7
P2.6
/ PSEN
ALE
Michael J. Pont
University of Leicester
[v2.0]
II
Copyright © Michael J. Pont, 2002-2004
This document may be freely distributed and copied, provided that copyright notice at
the foot of each OHP page is clearly visible in all copies.
III
Seminar 1: 1
Seminar 2: A flexible scheduler for single-processor embedded systems 1
Overview of this seminar 2
Overview of this course 3
By the end of the course you’ll be able to … 4
Main course text 5
IMPORTANT: Course prerequisites 6
Review: Why use C? 7
Review: The 8051 microcontroller 8
Review: The “super loop” software architecture 9
Review: An introduction to schedulers 10
Review: Building a scheduler 11
Overview of this seminar 12
The Co-operative Scheduler 13
Overview 14
The scheduler data structure and task array 15
The size of the task array 16
One possible initialisation function: 17
IMPORTANT: The ‘one interrupt per microcontroller’ rule! 18
The ‘Update’ function 19
The ‘Add Task’ function 20
The ‘Dispatcher’ 22
Function arguments 24
Function pointers and Keil linker options 25
The ‘Start’ function 28
The ‘Delete Task’ function 29
Reducing power consumption 30
Reporting errors 31
Displaying error codes 34
Hardware resource implications 35
What is the CPU load of the scheduler? 36
Determining the required tick interval 38
Guidelines for predictable and reliable scheduling 40
Overall strengths and weaknesses of the scheduler 41
Preparations for the next seminar 42
IV
Seminar 3: Analogue I/O using ADCs and PWM 43
Overview of this seminar 44
PATTERN: One-Shot ADC 45
PATTERN: One-Shot ADC 46
Using a microcontroller with on-chip ADC 47
Using an external parallel ADC 48
Example: Using a Max150 ADC 49
Using an external serial ADC 51
Example: Using an external SPI ADC 52
Overview of SPI 53
Back to the example … 54
Example: Using an external I
2
C ADC 55
Overview of I2C 56
Back to the example … 57
What is PWM? 58
PATTERN: Software PWM 59
Preparations for the next seminar 62
V
Seminar 4: A closer look at co-operative task scheduling (and some alternatives) 63
Overview of this seminar 64
Review: Co-operative scheduling 65
The pre-emptive scheduler 66
Why do we avoid pre-emptive schedulers in this course? 67
Why is a co-operative scheduler (generally) more reliable? 68
Critical sections of code 69
How do we deal with critical sections in a pre-emptive system? 70
Building a “lock” mechanism 71
The “best of both worlds” - a hybrid scheduler 75
Creating a hybrid scheduler 76
The ‘Update’ function for a hybrid scheduler. 78
Reliability and safety issues 81
The safest way to use the hybrid scheduler 83
Other forms of co-operative scheduler 85
PATTERN: 255-T
ICK SCHEDULER 86
PATTERN: O
NE-TASK SCHEDULER 87
PATTERN: ONE-YEAR SCHEDULER 88
PATTERN: STABLE SCHEDULER 89
Mix and match … 90
Preparations for the next seminar 91
剩余272页未读,继续阅读
资源评论
crashbluebird
- 粉丝: 11
- 资源: 13
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Screenshot_20240427_031602.jpg
- 网页PDF_2024年04月26日 23-46-14_QQ浏览器网页保存_QQ浏览器转格式(6).docx
- 直接插入排序,冒泡排序,直接选择排序.zip
- 在排序2的基础上,再次对快排进行优化,其次增加快排非递归,归并排序,归并排序非递归版.zip
- 实现了7种排序算法.三种复杂度排序.三种nlogn复杂度排序(堆排序,归并排序,快速排序)一种线性复杂度的排序.zip
- 冒泡排序 直接选择排序 直接插入排序 随机快速排序 归并排序 堆排序.zip
- 课设-内部排序算法比较 包括冒泡排序、直接插入排序、简单选择排序、快速排序、希尔排序、归并排序和堆排序.zip
- Python排序算法.zip
- C语言实现直接插入排序、希尔排序、选择排序、冒泡排序、堆排序、快速排序、归并排序、计数排序,并带图详解.zip
- 常用工具集参考用于图像等数据处理
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功