did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9781418039592

Embedded C Programming and the Atmel AVR

by ; ;
  • ISBN13:

    9781418039592

  • ISBN10:

    1418039594

  • Edition: 2nd
  • Format: Paperback
  • Copyright: 2006-06-05
  • Publisher: Cengage Learning

Note: Supplemental materials are not guaranteed with Rental or Used book purchases.

Purchase Benefits

  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $340.66 Save up to $68.13
  • Rent Book $272.53
    Add to Cart Free Shipping Icon Free Shipping

    TERM
    PRICE
    DUE
    USUALLY SHIPS IN 24-48 HOURS
    *This item is part of an exclusive publisher rental program and requires an additional convenience fee. This fee will be reflected in the shopping cart.

Supplemental Materials

What is included with this book?

Summary

Enter the world of embedded programming and microcontroller applications! One of the only books available today that uses the increasingly popular and cost-effective Atmel AVR embedded controller as the platform and application for learning, Embedded C Programming and the Atmel AVR, 2E is the perfect choice for novices. Featuring a host of fully-functional example applications, this highly innovative book enables users to adopt a "learn by doing" approach as they develop the knowledge and skills needed to achieve proficiency. Following an introduction to Atmel AVR RISC processors, readers are launched immediately into an embedded C language tutorial. Here, they'll experiment with variables and constants, operators and expressions, control statements, pointers and arrays, memory types, preprocessor directives, real-time methods, and more! In addition to a comprehensive library functions reference, an entire chapter on the CodeVision AVR C Compiler provides clear, step-by-step instruction in IDE installation and operation, mixing Assembler with C, and using the Code Wizard Code Generator. Use of peripherals - such as keypads, LCD displays, and other common embedded microcontroller-related devices - is also explored fully in this all-inclusive, state-of-the-art programmer's how-to and reference manual.

Table of Contents

Preface xiii
Introduction xxi
Embedded C Language Tutorial
Objectives
1(1)
Introduction
1(1)
Beginning Concepts
2(2)
Variables and Constants
4(7)
Variable Types
4(1)
Variable Scope
5(1)
Local Variables
5(1)
Global Variables
5(1)
Constants
6(1)
Numeric Constants
7(1)
Character Constants
7(1)
Enumerations and Definitions
7(2)
Storage Classes
9(1)
Automatic
9(1)
Static
9(1)
Register
9(1)
Type Casting
9(2)
I/O Operations
11(1)
Operators and Expressions
12(7)
Assignment and Arithmetic Operators
12(1)
Bitwise Operators
13(1)
Logical and Relational Operators
14(1)
Logical Operators
15(1)
Relational Operators
15(1)
Increment, Decrement, and Compound Assignment
16(1)
Increment Operators
16(1)
Decrement Operators
17(1)
Compound Assignment Operators
17(1)
The Conditional Expression
17(1)
Operator Precedence
18(1)
Control Statements
19(14)
While Loop
19(2)
Do/While Loop
21(1)
For Loop
22(1)
If/Else
23(1)
If Statement
23(1)
If/Else Statement
23(3)
Conditional Expression
26(1)
Switch/Case
26(2)
Break, Continue, and Goto
28(1)
Break
28(1)
Continue
28(1)
Goto
29(4)
Functions
33(8)
Prototyping and Function Organization
34(2)
Functions that Return Values
36(1)
Recursion
37(4)
Pointers and Arrays
41(13)
Pointers
41(4)
Arrays
45(2)
Multidimensional Arrays
47(2)
Pointers to Functions
49(5)
Structures and Unions
54(9)
Structures
54(2)
Arrays of Structures
56(1)
Pointers to Structures
57(1)
Unions
58(2)
Typedef Operator
60(1)
Bits and Bitfields
61(1)
Sizeof Operator
62(1)
Memory Types
63(6)
Constants and Variables
63(2)
Pointers
65(1)
Register Variables
65(1)
sfrb and sfrw
66(3)
Real-Time Methods
69(11)
Using Interrupts
69(3)
Real-Time Executives
72(3)
State Machines
75(5)
Programming Style, Standards, and Guidelines
80(1)
Chapter Summary
81(1)
Exercises
81(2)
Laboratory Activities
83(4)
The Atmel Risc Processors
Objectives
87(1)
Introduction
87(1)
Architectural Overview
88(1)
Memory
89(8)
Flash Code Memory
89(1)
Data Memory
89(1)
Registers
90(1)
I/O Registers
90(2)
SRAM
92(2)
EEPROM Memory
94(3)
Reset and Interrupt Functions
97(8)
Interrupts
98(3)
Reset
101(1)
Watchdog Timer and Reset
102(3)
Parallel I/O Ports
105(4)
Timer/Counters
109(23)
Timer/Counter Prescalers and Input Selectors
110(1)
Timer 0
110(4)
Timer 1
114(1)
Timer 1 Prescaler and Selector
115(1)
Timer 1 Input Capture Mode
115(4)
Timer 1 Output Compare Mode
119(4)
Timer 1 Pulse Width Modulator Mode
123(5)
Timer 2
128(1)
One--second recording interval using Timer 0
129(1)
Engine rpm measurement using Timer 1
130(1)
Drive shaft rpm measurement using Timer 1
131(1)
Serial Communication Using the Usart
132(9)
Analog Interfaces
141(10)
Analog-to-Digital Background
141(1)
Analog-to-Digital Converter Peripheral
142(4)
Analog Comparator Peripheral
146(3)
Measuring engine temperature using the analog-to-digital converter (ADC)
149(1)
Sending collected data to the PC
150(1)
Serial Communication Using the SPI
151(7)
Serial Communication Using I2C
158(2)
The AVR Risc Assembly Language Instruction Set
160(3)
Chapter Summary
163(4)
Exercises
167(1)
Laboratory Activities
168(3)
Standard I/O and Preprocessor Functions
Objectives
171(1)
Introduction
171(1)
Character Input/Output Functions -- getchar() and putchar()
172(6)
Standard Output Functions
178(5)
Put String---puts()
178(1)
Put String Flash---putsf()
179(1)
Print Formatted---printf()
180(2)
String Print Formatted---sprintf()
182(1)
Standard Input Functions
183(5)
Get String---gets()
184(1)
Scan Formatted---scanf()
185(2)
Scan String Formatted---sscanf()
187(1)
Preprocessor Directives
188(13)
The #include Directive
188(1)
The #define Directive
189(2)
The #ifdef, #ifndef, #else, and #endif Directives
191(5)
The #pragma Directive
196(1)
#pragma warn
197(1)
#pragma opt
197(1)
#pragma optsize
197(1)
#pragma savereg
198(1)
#pragma regalloc
199(1)
#pragma promotechar
199(1)
#pragma uchar
199(1)
#pragma library
200(1)
Other Macros and Directives
200(1)
Chapter Summary
201(1)
Exercises
202(1)
Laboratory Activities
202(3)
The Codevisionavr C Compiler and IDE
Objectives
205(1)
Introduction
205(1)
IDE Operation
206(10)
Projects
206(1)
Open Existing Projects
206(1)
Create New Projects
207(1)
Configure Projects
208(1)
Close Project
209(1)
Source Files
209(1)
Open an Existing Source File
209(1)
Create a New Source File
209(1)
Add an Existing File to the Project
209(2)
Edit Files
211(3)
Print Files
214(1)
The File Navigator
214(2)
C Compiler Options
216(4)
Memory Model
217(1)
Optimize For
218(1)
Optimization Level
218(1)
Program Type
218(1)
(s)printf Features and (s)scanf Features
218(1)
SRAM
219(1)
Compilation
219(1)
Messages Tab
220(1)
Compile and Make Projects
220(2)
Compile a Project
220(1)
Make a Project
221(1)
Program the Target Device
222(7)
Chip
223(1)
Flash and EEPROM
224(2)
Flash Lock Bits
226(1)
Fuse Bits
226(1)
Boot Lock Bit 0 and Boot Lock Bit 1
226(1)
Signature
226(1)
Chip Erase
227(1)
Programming Speed
227(1)
Program All
227(1)
Other Programmers
228(1)
Codewizardavr Code Generator
229(18)
Chip Tab
232(1)
Ports Tab
233(1)
External IRQ Tab
234(1)
Timers Tab
235(1)
USART Tab
236(1)
ADC Tab
237(1)
Project Information Tab
238(1)
Generate Source Code
239(8)
Terminal Tool
247(2)
The ATMEL AVR Studio Debugger
249(4)
Create a COFF File for AVR Studio
250(1)
Launch AVR Studio from CodeVisionAVR
250(1)
Open a File for Debug
250(1)
Start, Stop, and Step
250(1)
Set and Clear Breakpoints
251(1)
View and Modify Registers and Variables
252(1)
View and Modify the Machine State
252(1)
Chapter Summary
253(1)
Exercises
253(2)
Laboratory Activities
255(2)
Project Development
Objectives
257(1)
Introduction
257(1)
Concept Development Phase
257(1)
Project Development Process Steps
257(6)
Definition Phase
258(2)
Design Phase
260(1)
Test Definition Phase
261(1)
Build and Test the Prototype Hardware Phase
262(1)
System Integration and Software Development Phase
262(1)
System Test Phase
263(1)
Celebration Phase
263(1)
Project Development Process Summary
263(1)
Example Project: A Weather Monitor
263(86)
Concept Phase
263(1)
Definition Phase
264(2)
Electrical Specification
266(1)
Operational Specification
266(1)
Basic Block Diagrams
267(2)
Measurement Considerations for the Design
269(1)
Temperature
270(2)
Barometric Pressure
272(1)
Humidity
273(1)
Wind Speed
274(3)
Wind Direction
277(1)
Rainfall
278(3)
Dew Point Computation
281(1)
Wind Chill Computation
282(1)
Battery Health
283(1)
Real Time
283(1)
Hardware Design, Outdoor Unit
284(1)
Wind Speed Input
284(2)
Rain Gauge Input
286(1)
900 MHz Transmitter
286(1)
Power Supply
286(1)
Software Design, Outdoor Unit
286(1)
Hardware Design, Indoor Unit
287(1)
900 MHz Receiver
287(3)
Power Supply
290(1)
Software Design, Indoor Unit
290(2)
Test Definition Phase
292(1)
Wind Direction
293(1)
Wind Speed
293(1)
Rain Gauge
293(1)
Air Temperature
293(1)
Barometric Pressure
294(1)
Relative Humidity
294(1)
System Test for Complete Project
294(1)
Build and Test Prototype Hardware Phase
294(1)
Outdoor Unit Checkout
295(2)
Indoor Unit Checkout
297(4)
System Integration and Software Development Phase, Outdoor Unit
301(4)
Temperature, Humidity, Wind Direction, and Battery Health
305(1)
Rainfall
305(1)
Wind Speed
306(1)
RF Telemetry
306(6)
System Integration and Software Development Phase, Indoor Unit
312(1)
Keeping Time
312(2)
Low-Battery Indication
314(2)
The Buttons and the Beeper
316(2)
Decoding the RF Telemetry
318(3)
Collecting and Protecting Rainfall Data
321(3)
Converting from Counts to Real Units
324(1)
Routines for Controlling the LCD
325(6)
Keeping the Display Up to Date
331(4)
Editing the Time and Date
335(4)
System Test Phase
339(4)
Changing It Up
343(1)
Picking a Part for a Better Fit
343(1)
Changes to the Schematic
344(1)
Changes to I/O Mapping
344(4)
Other Considerations
348(1)
Challenges
349(1)
Chapter Summary
350(1)
Exercises
350(1)
Laboratory Activity
351(2)
Appendix A Library Functions Reference 353(100)
Appendix B Getting Started with Codevisionavr and the STK500 453(18)
Appendix C Programming the AVR Microcontrollers 471(4)
Appendix D Installing and Using TheCableAVR 475(14)
Appendix E The MEGAAVR-DEV Development Board 489(4)
Appendix F ASCII Table 493(4)
Appendix G AVR Instruction Set Summary 497(6)
Appendix H Answers to Selected Exercises 503(6)
Appendix I A ``Fast Start'' to Embedded C Programming and the AVR 509(10)
Index 519

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program