图书目录

目录

 

第1章单片机概述 

视频讲解: 37分钟,7集

1.1计算机的世界

1.2计算机性能等级

1.2.1超级计算机

1.2.2大型计算机

1.2.3小型计算机

1.2.4微型计算机

1.2.5微处理器

1.2.6单片机

1.3微处理器的两种应用类型

1.4单片机的发展历程

1.4.1静态逻辑

1.4.2时序逻辑

1.4.3双向总线

1.4.4可寻址存储器

1.4.5总线连接

1.4.6存储程序控制

1.4.74位器件

1.4.88位器件

1.4.916位和32位器件

1.5单片机的特殊功能

1.6单片机的应用 

1.7英特尔MCS51系列器件的分类

1.7.1MCS51系列概述

1.7.28051(ROM型器件)

1.7.38751(EPROM型器件)

1.7.48951(EEPROM型器件)

1.7.58031(无ROM型器件)

1.8MCS51的功能特性

1.8.1集成外设

1.8.2特殊功能寄存器

1.8.3事件处理机制

1.8.4布尔运算(位运算)

1.8.5简化系统设计

1.9单片机的基本操作

1.9.1指令执行

1.9.2数值运算

1.9.3逻辑运算

1.10本章习题 

1.11本章英汉术语对照表

第2章MCS51单片机的硬件结构 

视频讲解: 61分钟,8集

2.18051的内部结构

2.2引脚连接与功能

2.2.1基本封装引脚图

2.2.2引脚功能详解

2.2.3P3口引脚的第二功能

2.38051的详细结构

2.4存储器组织

2.4.1存储器布局类型

2.4.28051的存储器布局

2.5时钟振荡电路 

2.5.1时钟电路设计 

2.5.2“周期”的含义

2.6复位操作

2.7并行输入/输出

2.8电源配置

2.9单片机最小系统

2.10本章习题

2.11本章英汉术语对照表

第3章MCS51指令集

视频讲解: 64分钟,7集

3.1指令格式

3.1.1ASM51汇编语言

3.1.2指令的组成部分

3.1.3ASM51中数的表示方法

3.2寻址方式

3.2.1立即寻址方式

3.2.2直接寻址方式

3.2.3寄存器寻址方式

3.2.4寄存器间接寻址方式

3.2.5位寻址方式

3.2.6变址寻址方式

3.2.7累加器寻址方式

3.3MCS51指令列表

3.3.1数据传送类指令

3.3.2算术运算类指令

3.3.3逻辑运算类指令

3.3.4转移与子程序调用类指令

3.4本章习题

3.5本章英汉术语对照表

第4章MCS51汇编语言程序设计

视频讲解: 26分钟,3集

4.1汇编语言程序设计流程

4.2基本程序设计方法

4.2.1程序格式

4.2.2符号“$”作为标号的用法

4.2.3单片机的软件停机方法

4.3伪指令

4.3.1伪指令的概念

4.3.2ORG(起始地址伪指令)

4.3.3END(结束伪指令)

4.3.4EQU(赋值伪指令) 

4.3.5BIT(位赋值伪指令)

4.3.6DB(定义字节伪指令)

4.3.7DW(定义字伪指令)

4.4数据操作实例

4.4.1内存中数据块的复制

4.4.2数据排序

4.4.3数据块复制到外部存储器

4.4.4查找最大值

4.5算术运算实例

4.5.1用查表法实现算术运算

4.5.2用堆栈实现算术运算

4.5.3带符号数的算术运算

4.5.4多字节无符号数运算

4.5.5伪随机数序列的生成

4.6逻辑表达式求值实例

4.6.1简单逻辑运算

4.6.2利用堆栈实现逻辑求值

4.7延时程序实例

4.7.1短延时的实现

4.7.2长延时的生成

4.7.3软件延时的缺点

4.8文本操作实例

4.8.14位二进制数到ASCII码的转换 

4.8.2ASCII码到二进制数的转换

4.8.3字符串的存储与读取

4.8.4文本字符格式

4.8.5向打印机发送字符串

4.9程序控制实例

4.9.1N路分支程序 

4.9.2递归子程序

4.10本章习题

4.11本章英汉术语对照表

第5章MCS51的中断处理 

视频讲解: 71分钟,7集

5.1中断的基本概念

5.2MCS51的中断类型

5.2.1中断源

5.2.2复位

5.2.3外部中断

5.2.4定时器中断

5.2.5串行端口中断

5.3中断的允许与屏蔽

5.4中断标志

5.5同时发生中断的处理

5.5.1中断优先级

5.5.2低优先级中断对中服(ISR)的打断

5.5.3高优先级中断对中服(ISR)的打断

5.5.4中断优先级的修改

5.6中服程序(ISR)在存储器中的地址

5.7多中断源的处理

5.8利用锁存器处理电平触发中断

5.9含中断操作的程序实例

5.9.1交通灯控制

5.9.2带开关中断的传感器控制

5.9.3用中断实现闪烁LED的切换控制

5.10本章习题

5.11本章英汉术语对照表

第6章定时器/计数器与串行口操作

视频讲解: 59分钟,5集

6.1定时器/计数器的使用

6.1.1定时器/计数器的基本概念

6.1.2定时器/计数器的硬件结构

6.1.3定时器控制寄存器(SFR)

6.1.4定时器的设置与运行

6.1.5定时器的工作模式

6.1.6定时器溢出时的操作

6.1.7初始值的计算

6.1.8定时器与计数器模式的切换

6.1.9定时器/计数器中GATE位的功能 

6.1.10定时器/计数器应用实例

6.2串行口的使用

6.2.1串行与并行数据通信

6.2.2RS232的概念 

6.2.3RS232的传输速率

6.2.48051串行口概述

6.2.58051串行口模式0的通信

6.2.68051串行口模式1的通信

6.2.78051串行口模式2的通信

6.2.88051串行口模式3的通信

6.2.9RS232的逻辑电平

6.2.10握手信号

6.2.11串行端口中断的处理

6.3本章习题 

6.4本章英汉术语对照表

第7章存储器与输入/输出(I/O)端口的扩展 

视频讲解: 46分钟,5集

7.18051芯片的局限性

7.2程序存储器的扩展

7.2.18751与8951的内部程序存储器

7.2.2外接程序存储器芯片 

7.2.3程序存储器扩展电路

7.2.4扩展程序存储器的时序图

7.3随机存取存储器(RAM)的扩展

7.3.1增加额外存储器的方法

7.3.2RAM扩展电路

7.3.3访问外部RAM的时序图

7.3.4同时外接EPROM与RAM的电路

7.3.5存储器扩展的电路设计与分析实例

7.4地址译码与基本I/O端口扩展

7.4.1线选法 

7.4.2简单逻辑门电路法

7.4.3译码器法

7.5基本I/O端口的扩展

7.6利用8255A可编程外围接口(PPI)扩展并行端口

7.6.1可编程外围接口(PPI)的用途 

7.6.28255A的内部结构

7.6.38255A的控制寄存器

7.6.48255A的工作模式

7.6.58255A与8751的简单连接

7.6.6控制8255A及与其实时通信的软件实例

7.6.78255A在特定存储器地址的连接方法

7.6.8利用FPGA实现多外设系统

7.7本章习题

7.8本章英汉术语对照表

第8章MCS51与外部器件的接口设计

视频讲解: 19分钟,2集

8.18051并行端口的详细说明

8.1.1I/O端口的差异

8.1.2P0口的详细说明

8.1.3P1口的详细说明

8.1.4P2口的详细说明

8.1.5P3口的详细说明

8.2模数转换(ADC)接口

8.2.1ADC的精度

8.2.2逐次逼近型ADC的原理

8.2.3ADC0809集成电路

8.2.48051与ADC0809的连接

8.2.5ADC到8051的数据传输时序

8.2.6ADC的软件实例

8.3数模转换(DAC)接口

8.3.1DAC0832集成电路

8.3.2基于R2R梯形网络的DAC原理

8.3.38051与DAC0832的连接

8.4与EEPROM的接口设计

8.4.1EEPROM的基本特性

8.4.2EEPROM的类型

8.4.3EEPROM与8051的接口连接电路

8.5达拉斯iButton(纽扣式存储器件)的接口设计

8.5.1达拉斯iButton概述

8.5.2基于单片机的iButton读取器实现

8.5.3读取器的控制软件

8.5.4循环冗余校验(CRC)

8.6本章习题

8.7本章英汉术语对照表

第9章MCS51与机械及光学器件的接口设计

视频讲解: 26分钟,3集

9.1接口负载的考量因素

9.2矩阵键盘接口

9.2.1键盘接口电路

9.2.2利用中断读取键盘

9.2.3键盘读取的实例

9.2.4键盘的消抖处理

9.3LED显示接口

9.3.1七段数码管的使用

9.3.2七段数码管的连接配置

9.3.3七段数码管与单片机的连接

9.4与字母数字型LCD的接口

9.4.1LCD的基本原理

9.4.2LCD的连接方式 

9.4.3HD44780U接口的指令

9.4.4控制LCD的软件实例

9.5步进电机接口

9.5.1步进电机的工作原理

9.5.2带齿转子的作用

9.5.3单片机与步进电机的接口

9.5.4步进电机控制的软件实例

9.5.5时序与转速的考量因素

9.6本章习题

9.7本章英汉术语对照表

第10章单片机的C语言程序设计

10.1C语言的发展历史

10.2C语言的特性

10.3C语言的应用场景

10.4C语言基础入门

10.4.1C程序的格式与内容

10.4.2C语言中的函数

10.4.3C语言中的变量

10.4.4C语言的语句

10.4.5注释与标点符号

10.5C51语言 

10.5.1C51语言的设计初衷

10.5.2C51中的变量

10.5.3C51与ASM51的对比

10.5.48051的C语言程序设计实例

10.6小型C语言

 10.7SDCC——小型设备C编译器

10.8本章习题

10.9本章英汉术语对照表

第11章单片机应用系统设计

视频讲解: 44分钟,5集

11.1单片机的系统设计原则

11.1.1设计与开发流程

11.1.2需求分析

11.1.3功能规格说明

11.1.4设计约束条件

11.1.5单片机的选型

11.1.6硬件设计

11.1.7软件开发与测试

11.1.8系统集成与测试

11.1.9文档编制

11.1.10安装部署

11.1.11用户评估

11.2MCS51的开发工具

11.2.1软件开发系统

11.2.2仿真系统

11.2.3硬件开发系统

11.3单片机系统的错误修正

11.3.1汇编语言语法错误检测

11.3.2利用LED进行简单运行时错误修正

11.3.3通过向PC写入数据实现运行时错误修正

11.3.4运行时跟踪程序的使用

11.4MCS51器件的功能增强版本

11.4.1基础设计的改进方向

11.4.2模数转换器(ADC)

11.4.3闪存

11.4.4USB接口

11.4.5以太网接口

11.4.6CAN控制器 

11.4.7射频收发器

11.4.8看门狗定时器(WDT)

11.4.98051增强版本汇总

11.5PIC单片机系列

11.5.1PIC单片机概述

11.5.2PIC16C84的特性

11.5.3PIC16C84的硬件架构

11.5.4编程语言

11.5.5看门狗定时器的使能

11.5.6代码保护

11.5.7向芯片写入ID

11.5.8EEPROM中的非易失性数据存储

11.5.9PIC16F84的升级版本

11.6本章习题

11.7本章英汉术语对照表

附录A8051指令集

附录B常用集成电路引脚图

附录CASCII码字符集

CONTENTS

 

Chapter 1Introduction to Microcontrollers

Video tutorial: 37 minutes,7 episodes

1.1A world of computers

1.2Levels of computer power 

1.2.1Supercomputers

1.2.2Mainframe computers

1.2.3Minicomputers

1.2.4Microcomputers

1.2.5Microprocessors

1.2.6Microcontrollers

1.3Two types of microprocessor applications

1.4The evolution of the microprocessor

1.4.1Static logic

1.4.2Sequential logic

1.4.3Bidirectional bus

1.4.4Addressable memory

1.4.5Bus connections

1.4.6Storedprogram control

1.4.74bit devices

1.4.88bit devices

1.4.916bit and 32bit devices

1.5Special features of the microcontroller

1.6How microcontrollers are used today

1.7Classification of Intel MCS51 devices

1.7.1The MCS51 series

1.7.2The 8051 (Mask ROM version)

1.7.3The 8751 (EPROM version)

1.7.4The 8951 (EEPROM version)

1.7.5The 8031 (ROMless version)

1.8Features of the MCS51

1.8.1Integrated peripherals

1.8.2Special function registers

1.8.3Event processing facilities

1.8.4Boolean processing

1.8.5System design considerations

1.9Basic microcontroller operations

1.9.1Execution of instructions

1.9.2Numerical operations

1.9.3Logical operations

1.10Exercises on the chapter

1.11EnglishChinese vocabulary from the chapter

Chapter 2The Hardware of the MCS51 Microcontroller

Video tutorial: 61 minutes,8 episodes

2.1Internal structure of the 8051

2.2Pin connections and functions

2.2.1The basic package pinout

2.2.2Details of pin functions

2.2.3Alternate functions of Port 3 pins

2.3Detailed structure of the 8051

2.4Memory organization

2.4.1Two memory architectures

2.4.2The 8051 memory arrangement

2.5Clock oscillator circuitry

2.5.1Clock circuit design

2.5.2The meaning of "cycles"

2.6The Reset operation

2.7Parallel input/output

2.8Power considerations

2.9The minimal microcontroller system

2.10Exercises on the chapter

2.11EnglishChinese vocabulary from the chapter

Chapter 3The MCS51 Instruction Set

Video tutorial: 64 minutes,7 episodes

3.1Instruction format

3.1.1The ASM51 language

3.1.2Components of an instruction

3.1.3Expressing numbers in ASM51

3.2Addressing modes

3.2.1Immediate addressing mode

3.2.2Direct  addressing mode

3.2.3Register addressing mode

3.2.4Indirect addressing mode

3.2.5Bit addressing mode

3.2.6Indexed addressing mode

3.2.7Accumulator addressing mode

3.3List of MCS51 instructions

3.3.1Data transfer instructions

3.3.2Arithmetic instructions

3.3.3Logical instructions

3.3.4Jumps and subroutine calls

3.4Exercises on the chapter

3.5EnglishChinese vocabulary from the chapter

Chapter 4Assembly Language Programming for the MCS51

Video tutorial: 26 minutes,3 episodes

4.1Design of assembly language programs

4.2The basic programming method

4.2.1Program format

4.2.2The use of $ as a label

4.2.3Stopping a microcontroller by software

4.3Pseudoinstructions

4.3.1The concept of pseudoinstructions

4.3.2ORG Origin

4.3.3END End

4.3.4EQU Equate

4.3.5BIT Bit equate

4.3.6DB Data byte

4.3.7DW Data word

4.4Examples of data manipulation

4.4.1Copying a block of data in internal memory

4.4.2Sorting a block of data

4.4.3Copying a block of data to external memory

4.4.4Finding the largest value in a block of data

4.5Examples of arithmetic calculation

4.5.1Using a lookup table for arithmetic

4.5.2Using the stack for arithmetic evaluation

4.5.3Signed arithmetic calculations

4.5.4Multibyte unsigned calculations

4.5.5Generating pseudorandom number sequences

4.6Examples of logical expression evaluation

4.6.1A simple logic calculation

4.6.2Using the stack for logic evaluation

4.7Examples of time delays

4.7.1Softwaregeneration of short time delays

4.7.2Generating long time delays

4.7.3The disadvantage of softwaregenerated time delays

4.8Examples of text manipulation

4.8.1Conversion from a 4bit binary number to ASCII code

4.8.2Conversion from ASCII to binary codes

4.8.3String storage and retrieval

4.8.4Textformatting characters

4.8.5Sending a string to a printer

4.9Examples of program control

4.9.1Nway branching

4.9.2Recursive subroutines

4.10Exercises on the chapter

4.11EnglishChinese vocabulary from the chapter

Chapter 5Interrupt Handling on the MCS51

Video tutorial: 71 minutes,7 episodes

5.1Interrupt concepts

5.2Types of interrupt on the MCS51

5.2.1Available interrupts

5.2.2Reset

5.2.3External interrupts

5.2.4Timer interrupts

5.2.5Serial port interrupts

5.3Enabling and disabling interrupts

5.4Interrupt flags

5.5Handling simultaneous interrupts

5.5.1Interrupt priorities

5.5.2Interruption of an ISR by a lower priority interrupt

5.5.3Interruption of an ISR by a higher priority interrupt

5.5.4Changing the interrupt priorities

5.6Locations of ISRs in memory

5.7Handling multiplesource interrupts

5.8Use of a latch for level interrupts

5.9Examples of programs with interrupt operations

5.9.1Control of traffic lights

5.9.2Remote sensor with switch interrupt

5.9.3Switching between flashing LEDs by means of an interrupt

5.10Exercises on the chapter

5.11EnglishChinese vocabulary from the chapter

Chapter 6Timer/Counters and Serial Port Operation

Video tutorial: 59 minutes,5 episodes

6.1Using timer/counters

6.1.1The timer/counter concept

6.1.2The hardware of the timer/counters

6.1.3The timer control registers (SFRs)

6.1.4Setting and running the timers

6.1.5The timer modes

6.1.6Actions on timer overflow

6.1.7Calculation of preload value

6.1.8Switching between timer and counter operations

6.1.9Use of the Gate function on the timer/counter

6.1.10Example programs using timer/counter

6.2Using the Serial Port

6.2.1Serial and parallel data communications

6.2.2The RS232 concept

6.2.3RS232 transmission speeds

6.2.4Introducing the serial port on the 8051

6.2.5Serial communication with Mode 0 on the 8051

6.2.6Serial communication with Mode 1 on the 8051

6.2.7Serial communication with Mode 2 on the 8051

6.2.8Serial communication with Mode 3 on the 8051

6.2.9RS232 logic levels

6.2.10Handshaking

6.2.11Handling serial port interrupts

6.3Exercises on the chapter

6.4EnglishChinese vocabulary from the chapter

Chapter 7Expansion of Memory and Input/Output Ports

Video tutorial: 46 minutes,5 episodes

7.1Limitations of the 8051 chip

7.2Expansion of program code memory

7.2.1The internal code memory of the 8751 and 8951

7.2.2Adding external code memory chips

7.2.3Circuits for expansion of code memory

7.2.4The timing diagram for expanded code memory

7.3Expansion of RAM 

7.3.1Providing extra memory

7.3.2Circuits for RAM expansion

7.3.3Timing diagrams for access to external RAM

7.3.4Circuits for the addition of both external EPROM and RAM

7.3.5Examples of circuit design and analysis for expanded memory

7.4Address decoding and expansion of basic I/O interface

7.4.1Line selection method

7.4.2Simple logic gate circuit method

7.4.3Decoder method

7.5Expansion of basic I/O interfaces

7.6Parallel port expansion using the 8255A PPI

7.6.1The use of a programmable peripheral interface(PPI)

7.6.2The internal structure of the 8255A

7.6.3The 8255A Control Register 

7.6.4The 8255A modes

7.6.5Simple connections between the 8255A and 8751

7.6.6Examples of software to control and communicate with the 8255A

7.6.7Connection of the 8255A at a specific memory address

7.6.8Use of an FPGA for multiperipheral systems

7.7Exercises on the chapter

7.8EnglishChinese vocabulary from the chapter

Chapter 8Interfacing the MCS51 to Electronic Devices

Video tutorial: 19 minutes,2 episodes

8.1Details of the parallel ports on the 8051 

8.1.1Variations in the I/O ports

8.1.2Details of Port 0

8.1.3Details of Port 1

8.1.4Details of Port 2

8.1.5Details of Port 3

8.2Analogtodigital conversion interfaces

8.2.1The accuracy of AD conversion

8.2.2The principle of the successive approximation converter

8.2.3The ADC0809 integrated circuit

8.2.4Connecting the 8051 to the ADC0809

8.2.5Timing of data transfer from the ADC to the 8051

8.2.6Examples of software for AD conversion

8.3DigitaltoAnalog conversion interfaces

8.3.1The DAC0832 integrated circuit

8.3.2The principle of DA conversion using the R2R ladder

8.3.3Connecting the 8051 to the DAC0832

8.4Interfacing to EEPROMs

8.4.1The basic features of EEPROMs

8.4.2Types of EEPROMs

8.4.3The connection circuit for interfacing an EEPROM to an 8051

8.5Dallas iButton interfacing

8.5.1Introducing the Dallas iButton

8.5.2Implementing a reader with a microcontroller 

8.5.3Software for the reader

8.5.4The cyclic redundancy check

8.6Exercises on the chapter

8.7EnglishChinese vocabulary from the chapter

Chapter 9Interfacing the MCS51 to Mechanical and Optical Devices

Video tutorial: 26 minutes,3 episodes

9.1Considerations of interface loading

9.2Matrixkeypad interfaces

9.2.1Keypad  interface circuitry

9.2.2The use of interrupts in reading a keypad

9.2.3Example of keypad reading

9.2.4Debouncing of keypads

9.3LED display interfaces

9.3.1The use of 7segment displays

9.3.2Configurations of the 7segment display

9.3.3Connection of 7segment displays to microcontrollers

9.4Interfacing to Alphanumeric LCD displays

9.4.1LCD fundamentals

9.4.2LCD connections 

9.4.3Instructions for the HD44780U interface

9.4.4Software for LCDs

9.5Stepper motor interfaces

9.5.1Stepper Motor principles

9.5.2The use of toothed rotors

9.5.3Interfacing microcontrollers to stepper motors

9.5.4Software for stepper motor control

9.5.5Timing and speed considerations

9.6Exercises on the chapter

9.7EnglishChinese vocabulary from the chapter

Chapter 10Programming Microcontrollers in C Language 

10.1The history of C language

10.2Features of C language

10.3The uses of C language

10.4A short C language primer

10.4.1The form and content of a C program

10.4.2Functions in C

10.4.3Variables in C

10.4.4C language statements

10.4.5Comments and punctuation

10.5The C51 language

10.5.1The rationale for C51

10.5.2Variables in C51

10.5.3Comparisons of C51 and ASM51

10.5.4Examples of programming the 8051 in C

10.6Small C

10.7SDCCSmall Device C Compiler

10.8Exercises on the chapter

10.9EnglishChinese vocabulary from the chapter

Chapter 11Design of Microcontroller Systems

Video tutorial: 44 minutes,5 episodes

11.1Microcontrollerbased system design principles

11.1.1The design and development process

11.1.2Requirements analysis

11.1.3Functional specification

11.1.4Constraints

11.1.5Choice of microcontrollers

11.1.6Hardware design

11.1.7Software development and testing

11.1.8System integration and testing  

11.1.9Documentation

11.1.10Installation

11.1.11Customer evaluation

11.2Development tools for the MCS51

11.2.1The software development system

11.2.2The simulation system

11.2.3The hardware development system

11.3Error correction in  microcontroller systems

11.3.1Assembly language syntax error detection

11.3.2Simple runtime error correction with LEDs

11.3.3Runtime error correction by writing to a PC

11.3.4Use of trace procedures at runtime

11.4Enhancements of MCS51 devices

11.4.1Improving the basic design

11.4.2AnalogtoDigital converter (ADC)

11.4.3Flash memory

11.4.4USB interface

11.4.5Ethernet interface

11.4.6CAN controller

11.4.7R.F.transceiver

11.4.8Watchdog timer (WDT)

11.4.9Summary of enhanced versions of the 8051

11.5The PIC family of microcontrollers

11.5.1Introducing the picocontroller

11.5.2Characteristics of the PIC16C84

11.5.3The hardware architecture of the PIC16C84

11.5.4Programming languages

11.5.5Enabling the Watchdog timer

11.5.6Code protection

11.5.7Programming an ID into the chip

11.5.8Nonvolatile data storage in EEPROM

11.5.9A big brother for the PIC16F84

11.6Exercises on the chapter

11.7EnglishChinese vocabulary from the chapter

Appendix AThe 8051 Instruction Set

Appendix BPinouts of Common Integrated Circuits

Appendix CThe ASCII Character Set