單片機原理及應用(雙語版·新形態版)
孫秀娟,[英]麥克·科利爾(Michael Collier),王傳江
商品描述
目錄大綱
目錄
第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英特爾MCS51系列器件的分類
1.7.1MCS51系列概述
1.7.28051(ROM型器件)
1.7.38751(EPROM型器件)
1.7.48951(EEPROM型器件)
1.7.58031(無ROM型器件)
1.8MCS51的功能特性
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章MCS51單片機的硬件結構
視頻講解: 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章MCS51指令集
視頻講解: 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.3MCS51指令列表
3.3.1數據傳送類指令
3.3.2算術運算類指令
3.3.3邏輯運算類指令
3.3.4轉移與子程序調用類指令
3.4本章習題
3.5本章英漢術語對照表
第4章MCS51匯編語言程序設計
視頻講解: 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章MCS51的中斷處理
視頻講解: 71分鐘,7集
5.1中斷的基本概念
5.2MCS51的中斷類型
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章MCS51與外部器件的接口設計
視頻講解: 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基於R2R梯形網絡的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章MCS51與機械及光學器件的接口設計
視頻講解: 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.2MCS51的開發工具
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.4MCS51器件的功能增強版本
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.6Storedprogram control
1.4.74bit devices
1.4.88bit devices
1.4.916bit and 32bit devices
1.5Special features of the microcontroller
1.6How microcontrollers are used today
1.7Classification of Intel MCS51 devices
1.7.1The MCS51 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 MCS51
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.11EnglishChinese vocabulary from the chapter
Chapter 2The Hardware of the MCS51 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.11EnglishChinese vocabulary from the chapter
Chapter 3The MCS51 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 MCS51 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.5EnglishChinese vocabulary from the chapter
Chapter 4Assembly Language Programming for the MCS51
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.3Pseudoinstructions
4.3.1The concept of pseudoinstructions
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 lookup table for arithmetic
4.5.2Using the stack for arithmetic evaluation
4.5.3Signed arithmetic calculations
4.5.4Multibyte unsigned calculations
4.5.5Generating pseudorandom 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.1Softwaregeneration of short time delays
4.7.2Generating long time delays
4.7.3The disadvantage of softwaregenerated time delays
4.8Examples of text manipulation
4.8.1Conversion from a 4bit binary number to ASCII code
4.8.2Conversion from ASCII to binary codes
4.8.3String storage and retrieval
4.8.4Textformatting characters
4.8.5Sending a string to a printer
4.9Examples of program control
4.9.1Nway branching
4.9.2Recursive subroutines
4.10Exercises on the chapter
4.11EnglishChinese vocabulary from the chapter
Chapter 5Interrupt Handling on the MCS51
Video tutorial: 71 minutes,7 episodes
5.1Interrupt concepts
5.2Types of interrupt on the MCS51
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 multiplesource 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.11EnglishChinese 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.4EnglishChinese 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 multiperipheral systems
7.7Exercises on the chapter
7.8EnglishChinese vocabulary from the chapter
Chapter 8Interfacing the MCS51 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.2Analogtodigital conversion interfaces
8.2.1The accuracy of AD 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 AD conversion
8.3DigitaltoAnalog conversion interfaces
8.3.1The DAC0832 integrated circuit
8.3.2The principle of DA conversion using the R2R 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.7EnglishChinese vocabulary from the chapter
Chapter 9Interfacing the MCS51 to Mechanical and Optical Devices
Video tutorial: 26 minutes,3 episodes
9.1Considerations of interface loading
9.2Matrixkeypad 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 7segment displays
9.3.2Configurations of the 7segment display
9.3.3Connection of 7segment 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.7EnglishChinese 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.7SDCCSmall Device C Compiler
10.8Exercises on the chapter
10.9EnglishChinese vocabulary from the chapter
Chapter 11Design of Microcontroller Systems
Video tutorial: 44 minutes,5 episodes
11.1Microcontrollerbased 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 MCS51
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 MCS51 devices
11.4.1Improving the basic design
11.4.2AnalogtoDigital 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.8Nonvolatile data storage in EEPROM
11.5.9A big brother for the PIC16F84
11.6Exercises on the chapter
11.7EnglishChinese vocabulary from the chapter
Appendix AThe 8051 Instruction Set
Appendix BPinouts of Common Integrated Circuits
Appendix CThe ASCII Character Set







