Make: AVR Programming

Errata for Make: AVR Programming

Submit your own errata for this product.


The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question Note Update



Version Location Description Submitted By Date Submitted Date Corrected
Printed
Page XIV
7th Paragraph

* An ATMega 168 ... "The AVR Family of Controllers" on page 11 Should be page 12.

Anonymous  Mar 28, 2014 
Printed, PDF
Page 3
5th paragraph

Please change "gigabyte" to "gigabit"

Brian Jepson
Brian Jepson
O'Reilly AuthorO'Reilly Blogger 
Apr 01, 2014 
Printed, PDF
Page 9
2nd paragraph under "Inputs"

The description in the paragraph beginning with "Hook up a button" and ending with "closer to zero volts or VCC." needs correction. Please replace this paragraph with: Hook up a button to the supply voltage through a resistor on one side, and connect this junction to one of the AVR's pins that's configured for input. Connect the other side of the button to ground. When the button isn't pressed, the AVR will read the +VCC+ voltage, but when you do press the button the AVR's input pin will be grounded. Thus, by reading in the voltage on the pin, the AVR is able to detect whether or not you've pressed the button. Physical states are turned into voltage levels, which are in turn converted to logic values inside the chip.

Brian Jepson
Brian Jepson
O'Reilly AuthorO'Reilly Blogger 
Feb 03, 2014  Feb 14, 2014
Printed, PDF
Page 10
4th paragram

Please change "previous examples" to "following examples"

Brian Jepson
Brian Jepson
O'Reilly AuthorO'Reilly Blogger 
Apr 01, 2014 
Printed, PDF
Page 10
paragraph 1

Please change "USART serial in Chapter 5" to "USART serial, described in Chapter 5"

Note from the Author or Editor:
Change is fine by me, but occurs on the bottom of page 9 in my printed copy of the book.

Philipp Marek  Apr 02, 2014 
Printed, PDF
Page 18
First paragraph under Linux setup

Aptitude is not installed by default on Ubuntu. Suggest using apt-get instead or directing readers to install aptitude.

Note from the Author or Editor:
Change first literal command line to begin with "sudo apt-get install ..."

Brian Jepson
Brian Jepson
O'Reilly AuthorO'Reilly Blogger 
Apr 01, 2014 
PDF
Page 26
1st paragraph under "Flashing AVR chips using the Arduino as a programmer"

The third word of the second sentence should be "instructions" rather than "instruction."

Bogdan Barbu  Feb 27, 2014 
Printed, PDF
Page 26
First paragraph after "Flashing AVR chips..." heading

Please change "these instruction" to "these instructions"

Brian Jepson
Brian Jepson
O'Reilly AuthorO'Reilly Blogger 
Apr 01, 2014 
Printed, PDF
Page 29
1st paragraph under "Getting Started: Blinking LEDs"

Please change "possbile" to "possible"

Note from the Author or Editor:
this is the last occurrence of the word "possible" in the paragraph

Brian Jepson
Brian Jepson
O'Reilly AuthorO'Reilly Blogger 
Apr 01, 2014 
Printed, PDF
Page 34
Bullet item #2

Please change "nonself" to "non self" or "non-self"

Note from the Author or Editor:
2nd sentence should end "non-self-powered flash programmers."

Brian Jepson
Brian Jepson
O'Reilly AuthorO'Reilly Blogger 
Apr 01, 2014 
Printed, PDF
Page 39
Paragraph under F_CPU

Please change "1,000,000" to "1000000" and set as constant width. Please change "8,000,000" to "8000000" and set as constant width.

Note from the Author or Editor:
Should read "1000000" and "8000000" respectively, and be set in code font / monospace.

Brian Jepson
Brian Jepson
O'Reilly AuthorO'Reilly Blogger 
Apr 01, 2014 
Printed, PDF
Page 40
First paragraph under Troubleshooting

Suggest introducing a resistor where you instruct the reader to connect an LED across the AVR power pins, as it may blow the LED.

Note from the Author or Editor:
Change last sentence of first para in Troubleshooting to A quick way to double-check is to put an LED with resistor across the AVR power pins, where you've got a capacitor.

Brian Jepson
Brian Jepson
O'Reilly AuthorO'Reilly Blogger 
Apr 01, 2014 
Printed
Page 45
Example 3-1

The code in the example has DDRB |= (1 << PB0) However, at this stage of the book, that's still potentially "magic" to the reader. In the text (e.g., page 41 first and third paragraphs) you talk about writing DDRB = 0b00000001. I suggest you make the code in the example match the exposition.

Note from the Author or Editor:
Change DDRB |= (1 << PB0) to DDRB = 0b00000001 in example 3-1 code

Andy Dalton  Mar 22, 2014 
Printed, PDF
Page 45
Example 3-1

The code listing seems to be older than text: "DDRB |=" is wrong, text on p46 says "DDRB = ..." (which is better) In pseudocode, "[event loop]" appears outside of while. The while is the event loop, though. Probably OK to remove it, or replace "while(1)" with [event loop].

Note from the Author or Editor:
Two issues here: the DDRB bit is a duplicate of an errata I've already filed In the pseudocode block in "The Structure of AVR C Code": delete the line "[event loop]" and change the line "while(1){" to "while (1){ [event loop]"

Brian Jepson
Brian Jepson
O'Reilly AuthorO'Reilly Blogger 
Apr 01, 2014 
Printed, PDF
Page 49
first paragraph under blinkLED Summary

Suggest removing < and > from filenames here because they are not part of the filenames.

Note from the Author or Editor:
change "<avr/io.h>" to "avr/io.h" still formatted in filename font change "<util/delay.h>" to "util/delay.h" still formatted in filename font

Brian Jepson
Brian Jepson
O'Reilly AuthorO'Reilly Blogger 
Apr 01, 2014 
Printed
Page 60
Example 4-1

In the listing, the local variable i is used before it is initialized. Maybe the AVR initializes the stack to 0 before running the program (guessing here?), but I would still explicitly initialize it to 0.

Note from the Author or Editor:
change line in example 4-1 just after // -------------- Inits -------------------- // to: uint8_t i =0;

Andy Dalton  Mar 18, 2014 
Printed
Page 61
First paragraph

Text references "C Asides: #defines" on page 61, but the aside is on page 62.

Note from the Author or Editor:
Change page reference from 61 to 62.

Andy Dalton  Mar 18, 2014 
Printed
Page 62
First paragraph not in the aside

Text references "Bits, Numbering, and Significance" on page 62, but it should be page 63.

Note from the Author or Editor:
change page number reference from 62 to 63.

Andy Dalton  Mar 18, 2014 
Printed, PDF
Page 62
top of second column in C Asides: #defines

Regarding "reminds you that they’re constants.", #defines are not constants. They often _evaluate_ to constants, but they *are* just textual replacements.

Note from the Author or Editor:
end of 3rd para change "remind you that they're constants." to "remind you that they're not normal variables."

Brian Jepson
Brian Jepson
O'Reilly AuthorO'Reilly Blogger 
Apr 01, 2014 
Printed, PDF
Page 67
First paragraph

Please change: read and write from and to to: read from and write to

Brian Jepson
Brian Jepson
O'Reilly AuthorO'Reilly Blogger 
Apr 01, 2014 
Printed, PDF
Page 68
Last two lines of Example 4-2

Please line up the two instances of |

Brian Jepson
Brian Jepson
O'Reilly AuthorO'Reilly Blogger 
Apr 01, 2014 
PDF, ePub
Page 69
example 4-3

In Example 4-3. "Using XOR to toggle a bit" there are two lines using the bitwise OR operator that should be using the XOR operator. The two lines are: | = 0b11000111 // LED2 bit flipped on and | = 0b11000011 // LED2 bit flipped off they should be: ^ = 0b11000111 // LED2 bit flipped on and ^ = 0b11000011 // LED2 bit flipped off

Thomas Weisbach  Feb 11, 2014 
Printed, PDF
Page 69
Example 4-3

| should be changed to ^ in two places in this listing.

Note from the Author or Editor:
This is at least a partial duplicate, but just to be sure. The 2 lines in example 4-3: both end with "LED2 bit flipped" should have a ^ in place of the |.

Brian Jepson
Brian Jepson
O'Reilly AuthorO'Reilly Blogger 
Apr 01, 2014 
Printed, PDF
Page 74
Bit Twiddling sidebar

The "#define BV(bit)" should have "(1 << (bit))". The "()" around "bit" is missing.

Note from the Author or Editor:
Change to #define BV(bit) (1 << (bit)) That's a good catch. In some circumstances, the difference could matter. Although I'm usually invoking such macro functions with "PB0" rather than with a complicated expression that could cause order-of-operations issues. Still, better safe than sorry.

Brian Jepson
Brian Jepson
O'Reilly AuthorO'Reilly Blogger 
Apr 01, 2014 
PDF, ePub
Page 87
#2 of section "Troubleshooting Serial Connections"

This section suggests using 'lsusb' on Mac, but 'lsusb' is not a standard Mac utility. However, a version is available here: https://github.com/jlhonora/lsusb

Note from the Author or Editor:
That's right. For point #2 on p. 87, strike "and Mac" from the second sentence.

Thomas Weisbach  Feb 23, 2014 
PDF, ePub
Page 92
last paragraph

"Similarly, there is a receive complete bit (RXC0) in the status register UCSR0A that lets you know when a byte has received" should read "when a byte has been received".

Note from the Author or Editor:
Hyphenation will sort this out. Change to "Similarly, there is a receive-complete bit ..."

Thomas Weisbach  Feb 23, 2014 
PDF, ePub
Page 124
last sentence of first paragraph

Last part of the sentence is "so the AVR basically unburdened" should be "so the AVR is basically unburdened".

Note from the Author or Editor:
Exactly as described. Last part of the sentence is "so the AVR basically unburdened" should be "so the AVR is basically unburdened".

Thomas Weisbach  Feb 25, 2014 
PDF, ePub
Page 136
last paragraph

The last paragraph reads: "Next, we want to send the value over the serial port to our computer. To make things easy, we convert the 10-bit number into a single 8-bit byte so that it’s easier to send over serial. A two-bit right-shift converts it down." However, this refers to functionality that is not in the code in example 7-1, but to the later example 7-2 code.

Note from the Author or Editor:
He's right. That entire final paragraph at the bottom of the page, beginning with "Next, we want to send the value over the serial port..." refers to an older version of the demo code. If it's not too disruptive, strike the entire paragraph.

Thomas Weisbach  Feb 28, 2014 
Printed
Page 153
2nd paragraph

In the sentence "So we’ll expand on that and build a capacitative touch sensor." should change "capacitative" to "capacitive".

Jiang  Apr 05, 2014 
Printed
Page 158
4th paragraph

This is very minor. The fourth paragraph makes references to "For the nitty-gritty on interrupts, see "Interrupts: Under the Hood" on page 158." but the "Interrupts: Under the Hood" reference is actually at the top of pate 159.

Note from the Author or Editor:
Change 158 to 159 (or whatever it ends up being in revision)

Anonymous  Mar 04, 2014 
Printed
Page 163
First Paragraph

Just below "Figure 8-1" the first paragraph includes a "For Instance" which states: PCMSK2 | = ( ( 1 << PCINT18 ) | ( 1 << PCINT18 ) ) ; // NOTE That the PCINT18 is used twice. And following that the book makes references to the normal pin references: PCMSK2 | = ( ( 1 << PD2 ) | ( 1 << PD4 ) ) ; I believe that the PCINTXX values should read instead (see below) PCINT18 and PCINT20 to match the PD2 and PD4 pin references like this: PCMSK2 | = ( ( 1 << PCINT18 ) | ( 1 << PCINT20 ) ) ;

Note from the Author or Editor:
Change the second occurrence of (1<<PCINT18) to (1<<PCINT20) as suggested.

Anonymous  Mar 04, 2014 
PDF, ePub
Page 196
paragraph before "Summary"

"Transmitter" is misspelled "tranmitter".

Thomas Weisbach  Feb 06, 2014  Feb 14, 2014
PDF, ePub
Page 259
5th paragraph, section titled "Exponentially Weighted Moving Averages"

Very minor issue: 'the' occurs twice in the sentence "feel free to skip on down to the “The Code” on page 262".

Thomas Weisbach  Apr 02, 2014