首页 > 教材 > 普通高等教育“十三五”规划教材 > C8051单片机双语入门与进阶
C8051单片机双语入门与进阶
  • 评价(0
  • 教材评价:
    0.0分
  • 学科分类: 信息类
  • 专业分类: 应用型本科信息类
  • 作 者: 张文倩
  • 出版社: 华中科技大学出版社
  • 页 数: 0
  • 版 次: 1
  • ISBN: 9787568056403
  • 开 本: 16K
  • 出版时间: 2019-09-23
  • 定 价: ¥85.00
361 0 0
本书以深圳宏晶公司的STC8A8K64S4A12单片机为例,介绍了C8051单片机的基本原理及进阶应用。全书共分9章,依次是:计算机和微控制器介绍,C语言编程,并行端口,时钟生成、中断及复位,定时器功能,通用异步收发传输器(UART),串行外设接口(SPI),I2C总线和模数转换器。
张文倩

Contents

Chapter 1  Introduction to Computer and Microcontroller 1

1.1  Objectives 1

1.2  A Brief History of the Computer 1

1.2.1  Mainframe Computer 3

1.2.2  Minicomputer 4

1.2.3  Microcomputers 5

1.2.4  Supercomputers 6

1.3  Computer Hardware Organization 8

1.4  The Processor 9

1.4.1  The Arithmetic Logic Unit 9

1.4.2  Registers 11

1.4.3  The Control Unit 11

1.4.4  The Language Issue 12

1.5  The Microprocessor 13

1.6  Microcontroller 14

1.7  Embedded System 15

1.7.1  Characteristics of Embedded Systems 16

1.7.2  User Interfaces 16

1.8  Wireless Sensor Network (WSN) 17

1.9  Internet of Things (IoT) 18

1.10  Memory 19

1.10.1  Magnetic Memory 19

1.10.2  Optical Memory 20

1.10.3  Semiconductor Memory 20

1.11  Memory System Operation 24

1.11.1  Read Operation 25

1.11.2  Write Operation 26

1.12  Program Execution 26

1.12.1  The Program Counter Circuit 27

1.12.2  Starting Program Execution 28

1.12.3  Instruction Execution Process 29

1.13  Overview of the 8051 Microcontroller 29

1.14  Summary 31

1.15  Exercises 33

Chapter 2  C Language Programming 34

2.1  Objectives 34

2.2  Introduction to C 34

2.3  Types, Operators, and Expressions 36

2.3.1  Data Types 37

2.3.2  Variable Declaration 37

2.3.3  Constants 37

2.3.4  Arithmetic Operators 38

2.3.5  Bitwise Operators 40

2.3.6  Relational and Logical Operators 41

2.3.7  Precedence of Operators 42

2.4  Control Flow 43

2.4.1  If Statement 43

2.4.2  If-Else Statement 43

2.4.3  Multiway Conditional Statement 44

2.4.4  Switch Statement 45

2.4.5  For-Loop Statement 46中文简明目录

第1章  计算机和微控制器介绍 1

1.1  学习目标 1

1.2  计算机简史 1

1.3  计算机硬件组成 8

1.4  处理器 9

1.5  微处理器 13

1.6  微控制器 14

1.7  嵌入式系统 15

1.8  无线传感网络(WSN) 17

1.9  物联网(IoT) 18

1.10  存储器 19

1.11  存储系统工作原理 24

1.12  程序执行 26

1.13  微控制器概述 29

1.14  小结 31

1.15  习题 33

第2章  C语言编程 34

2.1  学习目标 34

2.2  C语言介绍 34

2.3  数据类型、操作数和表达式 36

2.4  控制流 43

2.5  输入和输出 48

2.6  函数和程序结构 50

2.7  指针、数组、结构体、共用体和类型定义 54

2.8  杂项 66

2.9  C语言预处理器 71

2.10  编程风格 77

2.11  C8051存储器映射 81

2.12  访问C8051外设寄存器 83

2.13  软硬件开发工具 88

2.14  小结 90

2.15  习题 92

2.16  实验 93

第3章  并行端口 94

3.1  学习目标 94

3.2  I/O端口介绍 94

3.3  STC8A8K64S4A12单片机 I/O端口 95

3.4  I/O接口电气特性的兼容性 102

3.5  简单I/O端口器件 107

3.6  并行端口与键盘的接口 117

3.7  液晶屏显示器(LCDs) 122

3.8  数模转换器接口(DAC) 135

3.9  小结 140

3.10  习题 141

3.11  实验 144

第4章  时钟生成、中断及复位 146

4.1  学习目标 146

4.2  时钟信号介绍 146

4.3  STC8A8K64S4A12单片机时钟系统 148

4.4  系统时钟生成 150

4.5  中断的基本概念 152

4.6  中断的作用 153

4.7  使能和禁用中断 153

4.8  多个待处理中断的优先级 154

4.9  中断服务 154

4.10  中断向量 155

4.11  中断嵌套 155

4.12  复位 156

4.13  STC8A8K64S4A12单片机的中断类型 156

4.14  编写中断服务程序 164

4.15  8051单片机的复位 168

4.16  小结 171

4.17  习题 173

4.18  实验 174


第5章  定时器功能 176

5.1  学习目标 176

5.2  微控制器定时器系统介绍 176

5.3  STC8A8K64S4A12单片机定时器功能介绍 180

5.4  定时器0和定时器1 182

5.5  定时器2 184

5.6  定时器3/4 185

5.7  定时器应用 186

5.8  可编程计数器阵列(PCA) 201

5.9  直流马达控制 219

5.10  小结 223

5.11  习题 224

5.12  实验 225

第6章  通用异步收发传输器(UART) 228

6.1  学习目标 228

6.2  串行I/O端口的概念 229

6.3  RS-232标准 230

6.4  STC8A8K64S4A12单片机UART模块 241

6.5  UART1 242

6.6  UART2/UART3/UART4 248

6.7  UART1模块0的应用 252

6.8  通过TIA-232接口使用UART异步模式进行数据交换 257

6.9  数值转换 266

6.10  UART的多处理器应用 268

6.11  终端和终端仿真 270

6.12  小结 279

6.13  习题 280

6.14  实验 282

第7章  串行外设接口(SPI) 284

7.1  学习目标 284

7.2  SPI介绍 284

7.3  STC8A8K64S4A12单片机SPI模块 288

7.4  STC8A8K64S4A12单片机SPI工作模式 290

7.5  编写SPI函数进行数据传输 293

7.6  使用I/O引脚实现SPI数据传输 294

7.7  使用SPI连接外设芯片的实例 297

7.8  小结 317

7.9  习题 318

7.10  实验 320

第8章  I2C总线 321

8.1  学习目标 321

8.2  I2C总线介绍 321

8.3  STC8A8K64S4A12单片机I2C总线的特点 335

8.4  I2C总线主机时钟定时 338

8.5  主机模式下的数据传输和接收 340

8.6  从机模式下的数据传输和接收 343

8.7  使用I2C总线和串行EEPROM AT24LC64B接口 344

8.8  使用I2C总线和实时时钟MCP7940N接口 351

8.9  使用I2C总线和数字恒温器DS1631A接口 363

8.10  小结 374

8.11  习题 376

8.12  实验 378

第9章  模数转换器 379

9.1  学习目标 379

9.2  模数转换基础 379

9.3  STC8A8K64S4A12单片机模数转换器 387

9.4  模数转换器的应用 390

9.5  小结 406

9.6  习题 406

9.7  实验 408

附录A  STC8A8K64S4A12单片机头文件 409

附录B  音符频率对照表 425

附录C  Keil Vision IDE使用教程 429

参考文献 454


2.4.6  While Statement 46

2.4.7  Do-While Statement 47

2.4.8  Goto Statement 47

2.5  Input and Output 48

2.6  Functions and Program Structure 50

2.6.1  Function Prototype 52

2.6.2  Writing a C Program with Multiple Functions 53

2.7  Pointers, Arrays, Structures, Unions, and Type Definition 54

2.7.1  Pointers and Addresses 54

2.7.2  Arrays 56

2.7.3  Pointers and Arrays 57

2.7.4  Passing Arrays to a Function 58

2.7.5  Initializing Arrays 59

2.7.6  Structures 60

2.7.7  Unions 62

2.7.8  The typedef Statement 63

2.7.9  Enumerated Data Types 65

2.8  Miscellaneous Items 66

2.8.1  Automatic/External/Static/Volatile 66

2.8.2  Scope Rules 67

2.8.3  Type Casting 68

2.8.4  Pointer to Functions 70

2.9  The C Preprocessor 71

2.9.1  The #define Statement 71

2.9.2  The ## Operator 74

2.9.3  The #include Statement 75

2.9.4  Conditional Compilation 76

2.10  Programming Style 77

2.10.1  General Guidelines to Comments 77

2.10.2  Program Documentation 78

2.10.3  Function Documentation 78

2.10.4  Code Appearance 79

2.10.5  Naming of Variables, Constants, and Functions 81

2.11  C8051 Memory Map 81

2.11.1  C8051 Program Memory 82

2.11.2  C8051 Data Memory 82

2.12  Accessing C8051 Peripheral Registers 83

2.12.1  Using Symbolic Names to Access Peripheral Registers 83

2.12.2  Using Symbolic Names to Access Bits 85

2.13  Hardware and Software Development Tools 88

2.13.1  Hardware Development Tools 88

2.13.2  Software Development Tools 90

2.14  Summary 90

2.15  Exercises 92

2.16  Lab Assignments 93

Chapter 3  Parallel Port 94

3.1  Objectives 94

3.2  Introduction to I/O Port 94

3.3  STC8A8K64S4A12 I/O Ports 95

3.3.1  I/O Pin Operation Modes 95

3.3.2  Number of Ports 98

3.3.3  Port Pin Configuration 100

3.4  Electrical Characteristics Compatibility Consideration for I/O Interfacing 102

3.4.1  Voltage-Level Compatibility 102

3.4.2  Current Drive Capability 104

3.4.3  Timing Compatibility 106

3.5  Simple I/O Devices 107

3.5.1  Time Delay Issue 107

3.5.2  Driving the Light-Emitting Diodes (LEDs) 108

3.5.3  Driving Seven-Segment Displays 110

3.5.4  Generating a Digital Waveform Using an I/O Pin 113

3.5.5  Making a Sound Using an I/O Pin 115

3.5.6  Interfacing with DIP Switches 116

3.6  Interfacing a Parallel Port to a Keypad 117

3.6.1  Keypad Scanning 118

3.6.2  Keyboard Debouncing 119

3.6.3  ASCII Code Lookup 121

3.7  Liquid Crystal Displays (LCDs) 122

3.7.1  The Structure of the HD44780 LCD Controller 123

3.7.2  LCD Instructions 125

3.7.3  LCD Instruction Descriptions 127

3.7.4  Interfacing the HD44780 to the STC8A8K64SA12 129


评价
评分

您需要登录后才可以评价 登录 | 立即注册