Muutke küpsiste eelistusi

Microcontrollers: From Assembly Language to C Using the PIC24 Family 2nd edition [Pehme köide]

, (University of Liverpool),
  • Formaat: Paperback / softback, 608 pages, kõrgus x laius x paksus: 230x190x38 mm, kaal: 1200 g, black & white illustrations, black & white line drawings, black & white tables, figures
  • Ilmumisaeg: 27-Aug-2014
  • Kirjastus: Cengage Learning, Inc
  • ISBN-10: 1305076559
  • ISBN-13: 9781305076556
Teised raamatud teemal:
  • Pehme köide
  • Hind: 77,49 €*
  • * saadame teile pakkumise kasutatud raamatule, mille hind võib erineda kodulehel olevast hinnast
  • See raamat on trükist otsas, kuid me saadame teile pakkumise kasutatud raamatule.
  • Kogus:
  • Lisa ostukorvi
  • Tasuta tarne
  • Lisa soovinimekirja
  • Formaat: Paperback / softback, 608 pages, kõrgus x laius x paksus: 230x190x38 mm, kaal: 1200 g, black & white illustrations, black & white line drawings, black & white tables, figures
  • Ilmumisaeg: 27-Aug-2014
  • Kirjastus: Cengage Learning, Inc
  • ISBN-10: 1305076559
  • ISBN-13: 9781305076556
Teised raamatud teemal:
This completely updated second edition of MICROCONTROLLERS: FROM ASSEMBLY LANGUAGE TO C USING THE PIC24 FAMILY covers assembly language, C programming, and hardware interfacing for the Microchip PIC24 family, a recently updated microcontroller family from Microchip. Hardware interfacing topics include parallel port usage, analog-to-digital conversion, digital-to-analog conversion, the serial peripheral bus (SPI), the inter-integrated circuit bus (I2C), asynchronous serial communication, and timers. Assembly language programming is covered in the context of the PIC24 instruction set, and no initial knowledge of assembly language programming is assumed. Specific hardware interfacing topics covered are parallel IO, analog-to-digital/digital-to-analog conversion, pulse width modulation, timer usage for IO polling, and industry standard serial interface standards. Interfacing examples include external devices such as pushbutton switches, LEDs, serial EEPROMs, liquid crystal displays (LCDs), keypads, rotary encoders, external digital-to-analog converters, DC motors, servos, temperature sensors, and IR receivers. Master the PIC24 family with MICROCONTROLLERS: FROM ASSEMBLY LANGUAGE TO C USING THE PIC24 FAMILY.
Introduction xv
Part I Digital Logic Review And Computer Architecture Fundamentals 1(50)
Chapter 1 Number System and Digital Logic Review
3(30)
Learning Objectives
3(1)
Using Binary Data
4(3)
Unsigned Number Conversion
7(5)
Hex to Binary, Binary to Hex
7(5)
Combinational Logic Functions
12(7)
Combinational Building Blocks
19(4)
The Multiplexer
19(1)
The Adder
20(1)
The Incrementer
21(1)
The Shifter
22(1)
Memory
22(1)
Understanding Sequential Logic
23(4)
The Clock Signal
24(1)
The D Flip-Flop
25(2)
Sequential Building Blocks
27(3)
The Register
27(1)
The Counter
28(1)
The Shift Register
28(2)
Encoding Character Data
30(1)
Summary
31(1)
Review Problems
32(1)
Chapter 2 The Stored Program Machine
33(18)
Learning Objectives
33(1)
Problem Solving the Digital Way
34(1)
Finite State Machine Design
35(5)
Finite State Machine Implementation
37(3)
A Stored Program Machine
40(8)
Instruction Set Design and Assembly Language
40(4)
Hardware Design
44(4)
Modern Computers
48(1)
Summary
48(1)
Review Problems
48(3)
Part II PIC24 μC Assembly Language Programming 51(194)
Chapter 3 Introduction to the PIC24 Microcontroller Family
53(42)
Learning Objectives
53(1)
Introduction to Microprocessors and Microcontrollers
54(1)
The PIC24 Microcontroller Family
55(7)
Program Memory Organization
57(1)
Data Memory Organization
58(2)
Arrangement of Multibyte Values in Data Memory
60(2)
Data Transfer Instructions and Addressing Modes
62(3)
Register Direct Addressing
62(3)
File Register Addressing
65(9)
WREG—The Default Working Register
67(2)
Immediate Addressing
69(1)
Indirect Addressing
70(2)
Instruction Set Regularity
72(2)
Basic Arithmetic and Control Instructions
74(5)
Three-Operand Addition/Subtraction
74(2)
Two-Operand Addition/Subtraction
76(1)
Increment, Decrement Instructions
77(1)
Program Control: goto
77(2)
A PIC24 Assembly Language Program
79(12)
C-to-PIC24 Assembly Language
80(8)
16-Bit (Word) Operations
88(3)
The Clock and Instruction Execution
91(1)
Summary
92(1)
Review Problems
92(3)
Chapter 4 Unsigned 8/16-Bit Arithmetic, Logical, and Conditional Operations
95(38)
Learning Objectives
95(1)
Bitwise Logical Operations, Bit Operations
96(4)
Using the Status Register
100(2)
Using Shift and Rotate Operations
102(3)
Using Mixed 8-Bit/16-Bit Operations, Compound Operations
105(4)
Working Register Usage
108(1)
LSB and MSB Operations
108(1)
Conditional Execution Using Bit Tests
109(2)
Unsigned Conditional Tests
111(12)
Conditional Tests in C
111(1)
Zero, Non-Zero Conditional Tests
112(3)
Bit Tests
115(1)
Equality, Inequality Conditional Tests
116(1)
Conditional Tests for >=, >, <, and <=
116(2)
Comparison and Unsigned Branch Instructions
118(5)
Complex Conditional Expressions
123(3)
Looping
126(2)
Summary
128(1)
Review Problems
129(4)
Chapter 5 Extended Precision and Signed Data Operations
133(34)
Learning Objectives
133(1)
Extended Precision Operations
134(13)
32-Bit Assignment Operations
134(2)
32-Bit Bitwise Logical Operations
136(1)
32-Bit Addition/Subtraction
137(4)
32-Bit Logical Shift Right/Shift Left Operations
141(1)
Zero, Non-Zero Conditional Tests
141(3)
Equality, Inequality
144(1)
Comparisons of >, >=, <, and <= on Unsigned 32-Bit Operands
145(1)
64-Bit Operations
146(1)
Signed Number Representation
147(6)
Signed Magnitude
147(1)
One's Complement
148(1)
Two's Complement
149(2)
Sign Extension
151(1)
Two's Complement Overflow
152(1)
Operations on Signed Data
153(8)
Shift Operations on Signed Data
155(2)
Comparisons of >, >=, <, and <= on Signed Operands
157(2)
Sign Extension for Mixed Precision
159(2)
Branch Instruction Encoding
161(2)
Summary
163(1)
Review Problems
164(3)
Chapter 6 Pointers and Subroutines
167(46)
Learning Objectives
167(1)
PIC24 Indirect Addressing Modes
168(4)
Register Indirect with Signed Constant Offset
170(1)
What Instruction Forms Support Indirect Addressing
170(1)
Instruction Stalls Due to Data Dependencies
171(1)
Using Subroutines
172(2)
The Stack and Call/Return, Push/Pop
174(5)
The Data Memory Stack
175(3)
Call/Return and the Data Memory Stack
178(1)
Stack Overflow/Underflow
179(1)
Implementing Subroutines in Assembly Language
179(7)
Static versus Dynamic Parameter Allocation
180(2)
Using Working Registers for Subroutine Parameters and Locals
182(4)
The Shadow Registers
186(1)
C Pointers and Arrays
186(13)
Implementation of C Pointer/Array Operations in Assembly
190(3)
A Subroutine That Manipulates 32-Bit Data
193(2)
C Strings
195(1)
The repeat Instruction
196(3)
Stack Frames for Function Parameters and Local Variables
199(4)
Program Space Visibility and Global Variable Initialization
203(3)
Summary
206(2)
Review Problems
208(5)
Chapter 7 Advanced Assembly Language: Higher Math
213(32)
Learning Objectives
213(1)
Multiplication
214(6)
64-Bit Multiplication
218(2)
Division
220(5)
Fixed-Point and Saturating Arithmetic
225(5)
Decimal to x.y Binary Format
226(1)
x.y Binary Format to Decimal Conversion
226(1)
Signed Fixed-Point
227(1)
0.n Fixed-Point Format and Saturating Operations
228(2)
The dsPIC® Microcontroller Family
230(1)
Floating-Point Number Representation
230(5)
IEEE 754 Floating-Point Encoding
230(3)
Floating-Point Operations
233(2)
BCD Arithmetic
235(2)
ASCII Data Conversion
237(5)
Binary to ASCII-Hex
237(2)
Binary to ASCII-Decimal
239(1)
ASCII-Hex to Binary
240(2)
ASCII-Decimal to Binary
242(1)
Summary
242(1)
Review Problems
243(2)
Part III PIC24 μC Interfacing Using The C Language 245(398)
Chapter 8 System Startup and Parallel Port I/O
247(70)
Learning Objectives
247(1)
High-Level Languages versus Assembly Language
248(2)
C Compilation for the PIC24 μC
250(8)
Special Function Registers and Bit References
251(4)
PIC24 Compiler Runtime Code, Variable Qualifiers/Attributes
255(1)
C Macros, Inline Functions
256(1)
Conditional Compilation
256(2)
PIC24 Startup Schematic
258(5)
Startup Schematic: Power
260(1)
Startup Schematic: Reset
261(1)
Startup Schematic: PC Serial Communication Link
262(1)
Startup Schematic: In-Circuit Serial Programming
262(1)
Startup Schematic: Application Components
263(1)
ledflash.c—The First C Program for PIC24 Startup
263(4)
Clock Configuration
263(1)
Flashing the LED
264(1)
An Improved LED Flash Program
265(2)
echo.c—Testing the Serial Link
267(3)
asm_echo.s—Implementing Echo in Assembly
269(1)
Datasheet Reading—A Critical Skill
270(2)
Configuration Bits
272(1)
Clock Generation
273(1)
Power-On Reset Behavior and Reset Sources
274(2)
Watchdog Timer, Sleep, Idle, and Doze
276(4)
The reset.c Test Program
280(4)
Parallel Port Operation
284(9)
Tristate Drivers
287(1)
Schmitt Trigger Input
288(1)
Open-Drain Output
288(1)
Internal Weak Pull-Ups and Pull-Downs
289(1)
Digital versus Analog Inputs
290(1)
PIO Control Bits Summary
291(1)
PIO Configuration Macros/Functions
291(2)
LED/Switch I/O and State Machine Programming
293(9)
State Machine I/O Programming
295(3)
Extended State in a More Complex LED/Switch I/O Problem
298(4)
Interfacing to an LCD Module
302(8)
3.3 V to 5 V Interfacing
303(1)
LCD Commands
304(2)
LCD Code Example
306(4)
The PIC24E versus the PIC24F and PIC24H Families
310(1)
Summary
311(1)
Review Problems
312(5)
Chapter 9 Interrupts and a First Look at Timers
317(54)
Learning Objectives
317(1)
Interrupt Basics
318(2)
PIC24 pC Interrupt Details
320(5)
Vector Table
320(2)
Interrupt Priorities
322(1)
Traps
322(1)
Interrupt Latency
323(1)
ISR Overhead
324(1)
ISR Functions in C
325(4)
The Default Interrupt
325(2)
An Example ISR
327(2)
Change Notification Interrupts
329(3)
Wake from Sleep/Idle
330(1)
Using a Change Notification Interrupt to Measure Interrupt Latency
330(2)
INTx External Interrupts and Remappable Pins
332(4)
Switch Inputs and Change Notification/INTx Interrupts
336(1)
Periodic Timer Interrupts
336(7)
Timer Macros and Support Functions
339(2)
Square Wave Generation
341(2)
Interrupt-Driven LED/Switch I/O
343(10)
Input Sampling
343(3)
Change Notification with a Timer
346(7)
Filtering Noisy Inputs
353(2)
A Rotary Encoder Interface
355(4)
A Keypad Interface
359(6)
On Writing and Debugging ISRs
365(1)
Summary
366(1)
Review Problems
366(5)
Chapter 10 Asynchronous and Synchronous Serial I/O
371(78)
Learning Objectives
371(1)
I/O Channel Basics
372(2)
Synchronous, Asynchronous Serial I/O
374(6)
Asynchronous Serial I/O Using NRZ Encoding
375(5)
The PIC24 UART
380(6)
UARTx Transmit Operation
383(1)
UARTx Receive Operation
384(1)
Baud Rate Configuration
384(2)
Using the PIC24 UART with C
386(4)
<stdio.h> Library Functions
389(1)
Interrupt-Driven I/O with the PIC24 UART
390(9)
Interrupt-Driven UART Receive
390(4)
Interrupt-Driven UART Transmit
394(5)
The RS-232 Standard
399(2)
The Serial Peripheral Interface (SPI)
401(7)
SPI Example: The MCP41xxx Digital Potentiometer
408(3)
SPI Example: PIC24 μC Master to DS1722 Thermometer
411(3)
SPI Example: PIC24 μC Master to PIC24 μC Slave
414(5)
The I2C Bus.
419(8)
I2C Physical Signaling
421(2)
I2C Transactions
423(1)
Library Functions for I2C Transactions
424(3)
12C on the PIC24 μC
427(5)
12C Example: PIC24 μC Master to D51631 Thermometer
432(4)
12C Example: PIC24 μC Master to 24LC515 Serial EEPROM
436(5)
Ping-Pong Buffering for Interrupt-Driven Streaming Data
441(4)
Summary
445(1)
Review Problems
445(4)
Chapter 11 Data Conversion
449(40)
Learning Objectives
449(1)
Data Conversion Basics
450(3)
Sensors and Transducers
450(3)
Analog-to-Digital Conversion
453(7)
Successive Approximation ADC
457(2)
Sample and Hold Amplifiers
459(1)
The PIC24 Analog-to-Digital Converter
460(14)
PIC24 ADC Configuration
463(6)
PIC24 ADC Operation: Manual
469(5)
PIC24 ADC Operation: Recap
474(1)
Digital-to-Analog Conversion
474(8)
Flash DACs
475(1)
R-2R Resistor Ladder Flash DAC
475(7)
External Digital-to-Analog Converter Examples
482(4)
DAC Example: The Maxim548A
483(3)
Summary
486(1)
Review Problems
486(3)
Chapter 12 Timers
489(52)
Learning Objectives
489(1)
Pulse Width Measurement
490(6)
Using a 32-Bit Timer
492(4)
Pulse Width, Period Measurement Using Input Capture
496(11)
The Input Capture Module
497(1)
Pulse Width Measurement Using Input Capture
498(6)
Using Cascade Mode for 32-Bit Precision Input Capture
504(1)
Period Measurement Using Input Capture
504(3)
Application: Using Capture Mode for an Infrared Decoder
507(9)
The Output Compare Module
516(4)
Square Wave Generation
519(1)
Pulse Width Modulation
520(3)
A PWM Example
521(2)
PWM Application: DC Motor Speed Control and Servo Control
523(7)
DC Motor Speed Control
523(1)
Hobby Servo Control
524(2)
PWM Control of Multiple Servos
526(4)
A PWM DAC
530(2)
Time Keeping Using Timer1 and RTCC (PIC 24H/F Families)
532(6)
The Real-Time Clock Calendar Module
534(4)
Summary
538(1)
Review Problems
538(3)
Chapter 13 Advanced Hardware Topics
541(42)
Learning Objectives
541(1)
Direct Memory Access
542(7)
Using the PIC24 μC as an I2C Slave
549(4)
Bus Arbitration for the I2C Bus
553(5)
Reverse String Revisited
556(2)
The Controller Area Network (CAN)
558(4)
The PIC24 ECAN™ Module
562(10)
Using an ECAN RX FIFO
570(1)
Using an Extended Data Frame
571(1)
Run-Time Self-Programming
572(8)
A Sample Flash Application
576(4)
Summary
580(1)
Review Problems
581(2)
Chapter 14 Operating Systems for Embedded Systems
583(60)
Learning Objectives
583(1)
Operating System Concepts
584(12)
Tasks
587(1)
Multitasking and Schedulers
588(4)
Inter-Task Coordination: Semaphores
592(1)
Inter-Task Coordination and Communication: Messaging
593(1)
OS Services
594(2)
Embedded Systems Operating System for the Microchip PIC24 μC
596(32)
ESOS Overview
597(1)
User Tasks
598(4)
Your First ESOS Program
602(2)
ESOS Communication Services
604(4)
ESOS Timer Services
608(3)
ESOS Semaphore Services
611(4)
ESOS Messaging Services
615(4)
ESOS User Flags
619(2)
ESOS Child Tasks
621(3)
ESOS Interrupt Services
624(4)
Design: Adding an ESOS Service for I2C
628(13)
I2C Operations Under ESOS
629(3)
I2C Transactions Under ESOS
632(4)
Application Using the ESOS I2C Service and Semaphores
636(2)
Application Using the ESOS I2C Service and Messaging
638(3)
Summary
641(1)
Review Problems
642(1)
Part IV Appendixes 643(52)
Appendix A PIC24 Architecture and Instruction Set Summary
645(8)
Appendix B Circuits 001
653(8)
Voltage, Current, and Resistance
653(5)
Ohm's Law
654(1)
Resistors in Series
655(1)
Resistors in Parallel
656(1)
Polarization
657(1)
Diodes
657(1)
Capacitors
658(3)
Appendix C Problem Solutions
661(28)
Appendix D References
689(6)
Index 695
Robert B. Reese received the B.S. degree from Louisiana Tech University, Ruston, in 1979 and the M.S. and Ph.D. degrees from Texas A&M University, College Station, in 1982 and 1985, respectively, all in electrical engineering. He served as a Member of the Technical Staff of the Microelectronics and Computer Technology Corporation (MCC), Austin, TX, from 1985 to 1988. Since 1988, he has been with the Department of Electrical and Computer Engineering at Mississippi State University, Mississippi State, where he is an Associate Professor. Courses that he teaches include Microprocessors, VLSI systems, Digital System design, and senior design. His research interests include self-timed digital systems and computer architecture. Bryan A. Jones received the B.S.E.E. and M.S. degrees in electrical engineer-ing from Rice University, Houston, TX, in 1995 and 2002, respectively, and the Ph.D. degree in electrical engineering from Clemson University, Clemson, SC, in 2005. From 1996 to 2000, he was a Hardware Design Engineer for Compaq, specializing in board layout for high-availability RAID controllers. He is currently an Assistant Professor at Mississippi State University, Mississippi State, MS. His research interests include micro air vehicles, robotics, real-time control-system implementation, rapid prototyping for real-time systems, and modeling and analysis of mechatronic systems. J.W. Bruce received the B.S.E. from the University of Alabama in Huntsville in 1991, the M.S.E.E. from the Georgia Institute of Technology in 1993, and the Ph.D. from the University of Nevada Las Vegas in 2000, all in electrical engineering. Dr. Bruce has served as a member of the technical staff at the Mevatec Corporation providing engineering support to the Marshall Space Flight Center Microgravity Research Program. He also worked in the 3D Workstation Graphics Group at the Integraph Corporation designing the world's first OpenGL graphics accelerator for the Windows operating system. Since 2000, Dr. Bruce has served in the Department of Electrical and Computer Engineering at Mississippi State University. Dr. Bruce has contributed to the research areas of data converter architecture design and embedded systems design. His research has resulted in more than 30 technical publications and one book chapter.