# Suspected Typos in HCS12 Microcontroller and Embedded Systems, 1st edition, by Muhammad Ali Mazidi and Danny Causey

p. 31, last line: "register A" should be "the CPU."

p. 32, third line of first full paragraph: "move the next value into register A" should be "add the next value to register A."

p. 32, fourth line of first full paragraph: "moves the contents of the following memory location into" should be "adds the contents of the following memory location to."

p. 42, answer to Question 5 of Section 0.4: "True" should be "False."

p. 47, third line of section on Mechatronics and microcontrollers: "http://mechatronics2004.newcastle.edu.au/mech2004" should be "http://rumi.newcastle.edu.au/mech2004/".

p. 60, last line: Delete the comma after "LDAA."

p. 69, seventh line of first full paragraph: "$FFFF:$FFFE" should be "$FFFE." p. 73, last two lines of last full paragraph: both instances of "35H" should be "95H." p. 74, sixth line of last paragraph: "ddressing" should be "addressing." p. 74, last line: "Table 2-2" should be "Table 2-1." p. 76, last line of third paragraph: "the HCS1218" should be "the HCS12." p. 78, first line of third paragraph: "from the D7 bit" should be "from the most significant bit (which is D7 in 8-bit operations and D15 in 16-bit operations)." p. 79, second and third lines: both instances of "the D7 bit" should be "the most significant bit." p. 79, third line of second paragraph: Insert "N (negative flag)" after "Z (zero flag)." p. 79, fourth line of second paragraph: Insert "N" into the list that includes C, H, and Z. p. 80, first line Example 2-8: "C, H, S, and Z" should be "C, H, N, and Z." p. 80, ANDA row of Table 2-5: the N column should hold X instead of blank, and the V column should hold 0 instead of X, and the C column should hold blank instead of 0. p. 80, COMA row of Table 2-5: the N column should hold X instead of 1, and the C column should hold 1 instead of X. p. 80, ORAB row of Table 2-5: the V column should hold 0 instead of X. p. 84, fifth line: "loc 200H" should be "loc 1200H." p. 84, sixth line: "loc 201H" should be "loc 1201H." p. 84, seventh line: "loc 201H" should be "loc 1202H." p. 87, seventh line of first full paragraph: "memory location 0" should be "memory location$8000."

p. 91, thirteenth line of second paragraph: "ADDA $18 " should be "ADDA #18." p. 92, third line of last paragraph: "Figure 2-11" should be "Figure 2-13." p. 95, PULC row of Table 2-9: "Pull D" should be "Pull C." p. 95, PULD row of Table 2-9: "Pull SP" should be "Pull D." p. 102, answer to Question 2 of Section 2.2: "True" should be "False." p. 102, answer to Question 4 of Section 2.2: "False. There is plenty of room for both" should be "True." p. 103, answer to Question 2 of Section 2.3: "LDAB #$99" should be "LDAB #$FF." p. 103, answer to Question 6 of Section 2.3: "ADDA #$FD" should be "ADDA #$CD." p. 103, answer to Question 9 of Section 2.3: "X and Y" should be "X and Y and SP and PC." p. 103, answer to Question 1 of Section 2.4: "Status register" should be "Condition code register." p. 103, answer to Question 1 of Section 2.5: "DATA3 EQU %10011001" should be "DATA3 EQU %01100011." p. 109, second line from the bottom: "if R2 is not zero" should be "if R1 is not zero." p. 112, last bold italic heading, and p. 113, ninth line of program code: "branch if CY = 0" should be "branch if C = 0." p. 114, third line of paragraph next to Table 3-2: "such as LBNC, LBZ, and LBNZ" should be "such as LBCC, LBEQ, and LBNE." p. 121, Example 3-12: Insert "ORG$8400" as a new line of code before the line "DELAY LDAB #$FF." p. 125, Review Question 7: "LDSP" should be "LDS." p. 127, sixth line of first program: "by X and X+1" should be "by X." p. 128, second line of second paragraph: "Example 3-8" should be "Example 3-9." p. 128, fourth line of second paragraph: "Example 3-3" should be "Example 3-2." p. 130, answer to Question 5 of Section 3.1: "3" should be "2." p. 130, answer to Question 3 of Section 3.2: "3" should be "4." p. 140, first line of second program: "MYREG EQU 0X820" should be "MYREG EQU$820."

p. 141, third row of Table 4-4: "ADD20/DAT2" should be "ADD2/DATA2."

p. 141, last sentence of last full paragraph: "pins PE5-PE0" should be "pins PE7-PE2"; also, "pins PB0 and PB1" should be "pins PE0 and PE1."

p. 144, fourth line of program code: "= PB7 = low" should be "= PB0 = low."

p. 146, tenth line of program code in Example 4-4: "%00000000" should be "%00001000."

p. 146, third line of program code in Example 4-5: "%00010000" should be "%00001000."

p. 150, answer to Question 4 of Section 4.1: "MOVB DDRA, $FF" should be "MOVB #$FF, DDRA."

p. 150, answer to Question 5 of Section 4.1: "DDRA" should be "DDRB."

p. 150, first line of answer to Question 2 of Section 4.2: "%100000000" should be "%10000000."

p. 150, fourth line of answer to Question 2 of Section 4.2: "PORTA" should be "PORTB."

p. 154, first line of second paragraph and second line of solution to Example 5-3: "CY=1" should be "C=1."

p. 154, second-to-last line of Example 5-3: "7478" should be "7874."

p. 156, thirteenth line from the bottom: "adding $55 and$77" should be "adding $57 and$77." In the next sentence, "result in $CC" should be "result in$CE."

p. 157, second-to-last line of Example 5-4: "= 325H" should be "= 325."

p. 158, last line of Example 5-6: "mangnitude" should be "magnitude."

p. 159, second line of solution to Example 5-7: "C = borrow = 0" should be "C = borrow = 1."

p. 159, SUBD row of Table 5-1: "A − 16-bit" should be "D − 16-bit."

p. 166, second-to-last line above Example 5-16: "Only bits 6 and 7" should be "Only bits 0 and 1."

p. 168, Review Question 1(b): "MLDAA" should be "LDAA."

p. 169, Table 5-5: In the C=0 column, all four instances of ">" should be ">=."

p. 170, Solution to Example 5-22: The logic is backwards. "STAA GREG" should be "STAA LREG," and "STAA LREG" should be "STAA GREG." The comments should be changed acccordingly.

p. 173, BLS row of Table 5-6: "C + Z = 0" should be "C + Z = 1."

p. 175, first line: "MREG" should be "MYREG."

p. 176, third line of code in Example 5-24: "#DATA" should be "#DATA1."

p. 177, second, seventh, and last lines of code in Example 5-26: "RB1" should be "PB1."

p. 179, second line of code in Review Question 1: "CLRA" should be "CLR MYREG."

p. 184, third line of Solution to Example 5-34: "OV = 1" should be "V = 1."

p. 187, fifteenth line: "543F" should be "542F."

p. 187, figure illustrating the operation of ASRA: "CF" should be "C."

p. 192, answer to Question 9(b) of Section 5.1: "HC = 0" should be "H = 0."

p. 192, answer to Question 11 of Section 5.1: "$4F − 0 =$46, now A = $46" should be "$4F − 1 = $45, now A =$45."

p. 192, answer to Question 6 of Section 5.3: "$9A or higher" should be "$99 or higher."

p. 192, answer to Question 2 of Section 5.4: "No" should be "Yes."

p. 193, answer to Question 7 of Section 5.6: "bit in each; the" should be "bit; in each the."

p. 201, second-to-last line: "581D" should be "851D."

p. 203, third line of Solution to Example 6-11: "Y = $860" should be "Y =$840."

p. 211, third line of main program: Insert a "CLRA" command to ensure that the high byte of D is $00. WIthout this line, simulation in CodeWarrior gives incorrect results. p. 213, seventh line: "MOVE$5, $820" should be "MOVE$55, PORTB."

p. 215, second and fourth lines: "$10" should be "$810."

p. 215, code line #44 of Figure 6-1: "LDA" should be "LDAA." On the next line, "STA" should be "STAA." Also, in lines #57 and #59, "DELAY_1.A" and "DELAY_1.B" should be "DELAY_1".

p. 216, code lines #43, #44, #56, and #58 should have the same changes noted above for p. 215.

p. 223, answer to Question 2 of Section 6.2: "X" should be "None."

p. 227, Last row of Table 7-1: "+2,147,483,648" should be "+2,147,483,647."

p. 235, fifth line of Solution to Example 7-13: "//and B" should be "//and K."

p. 246, last line before Example 7-29: "7-11 and 7-12" should be "7-1 and 7-2."

p. 268, Figure 8-8: The lower part of the figure contains two columns for SYN2; one of these columns should be deleted. Also, in the Decimal value column, the last two rows should contain 62 and 63 instead of 30 and 31.

p. 269, Figure 8-9: The lower part of the figure contains two columns for REFDV2; one of these columns should be deleted.

p. 271, bulleted item #2: "how many bytes are in the line" should be "how many bytes are in the line’s address, data, and checksum fields."

p. 271, first and last lines of bulleted item #5: both instances of "everything" should be "the count byte, address field, and data field."

p. 273, Review Question 2: "The first byte" should be "The first byte after S1 or S9."

p. 275, answer to Question 4 of Section 8.3: "00" should be "S1."

p. 280, sixth line after Example 9-1: "TSR2" should be "TSCR2."

p. 281, fourth line of Figure 9-4: "TCRE D6" should be "TCRE D3." On the eighth line of the same figure, "PR20" should be "PR2."

p. 283, second-to-last line of Example 9-6: "counter counts up" should be "counter rolls over." The same change should be made in Example 9-28 on page 305.

p. 284, seventh line of first full paragraph: "by putting zero" should be "by putting one."

p. 284, third line from the bottom: "Cxf" should be "CxF."

p. 286, first line of code in Example 9-8: "TFFCA = 1" should be "TFFCA = 0."

p. 290, Review Question 5: "TSCR2" should be "TSCR1."

p. 291, bulleted items #4 and #6: "Cxf" should be "CxF."

p. 292, last line of Example 9-15: "=.$90" should be "=$90."

p. 294, tenth line of code: "LDAA #%00100000" should be "LDAA #%00010000."

p. 295, fourth line from the bottom: "second rising" should be "falling." The same change should be made in Example 9-19 on the next page.

p. 296, seventh line of code: "LDAA #$07" should be "LDAA #$01." In the next line, "prescaler 128" should be "prescaler 2."

p. 298, Figure 9-16: In the CLK1,CLK0 row, "D4:D3" should be "D3:D2." And in the PAI row, "D1" should be "D0."

p. 301, Example 9-25: Insert "BSET DDRB, %00010000" as a new line of code near the beginning of the program. The same addition should be made to Example 9-26 on the next page.

p. 301, second line of last paragraph: "PAVOF" should be "PAOVF."

p. 303, Figure 9-18: In the PBOVI row, "D0" should be "D1."

p. 305, second and thid lines of code: both instances of "TFLG1_TOF_MASK" should be "TFLG2_TOF_MASK" (and in the second of these, the "0" should be an "O").

p. 309, last line of code: the second "=" should be "|."

p. 312, the fourth-to-last line of code ("TFLG1 = TFLG1 | TFLG1_C6F_MASK") is not needed, since, as explained at the end of the page, the C6F flag will be reset automatically.

p. 316, eighth line of code: "PT6 an output" should be "PT6 an input."

p. 325, answer to Question 5 of Section 9.1: "10,000,000" should be "%1000 0000."

p. 325, answer to Question 9 of Section 9.1: "TC0" should be "TC4."

p. 325, answer to Question 4 of Section 9.2: "TIOS" should be "TIOS, TCNT, TSCR1, TSCR2, TFLG1, TCTL3, and TCTL4."

p. 333, Row 4 of Table 10-2: Insert an overbar over "DTR" to indicate active-LOW.

p. 334, Review Question 10: "UART" should be "USART."

p. 335, seventh line of second paragraph: "are not TTL" should be "are TTL."

p. 337, seventh line from the bottom: "1 to 8191" should be "0 to 8191."

p. 341, tenth line of Figure 10-12: "Chapter 1" should be "Chapter 11."

p. 342, Figure 10-13, sixth line from the bottom: "TDRF" should be "TDRE."

p. 343, fourth line below the tables: "SCI0DR" should be "SCI0DRL." Five lines below that, "SCI1DR" should be "SCI1DRL."

p. 344, second line: "SCI0SR" should be "SCI0SR1."

p. 345, third-to-last line of Example 10-3: "HERE" should be "TRANS."

p. 346, bulleted items 5 and 6: all three instances of "RDRE" should be "RDRF." And in bulleted item 5, "Status Register 2" should be "Status Register 1."

p. 347, third line of text in Figure 10-15: "T7-T1" should be "T7-T0."

p. 347, third-to-last line of Example 10-15: code will work as written, but to reduce confusion "mSCI0SR1_TDRE" should be "mSCI1SR1_TDRE."

p. 348, calculations before Example 10-6: the numbers are wrong. One way to fix it would be to change both instances of "9600" to "4800."

p. 349, third-to-last line and eighth-to-last line of Program 10-1: code will work as written, but to reduce confusion both instances of "mSCI1SR1_" should be "mSCI0SR1_."

p. 357, answer to Question 2 of Section 10.2: "Pins PS0 and PS1. Pin PS1 is for TXD and pin PS0 is for RXD" should be "Pins PS0, PS1, PS2, and PS3. Pins PS1 and PS3 are for TXD and pins PS0 and PS2 are for RXD."

p. 357, answer to Question 7 of Section 10.3: "SCI Control Register" should be "SCI Control Register 1."

p. 357, answer to Question 5 of Section 10.4: "SCI Status Register" should be "SCI Status Register 1."

p. 362, Figure 11-2: The rows for Register A (row 2) and Register B (row 3) should be swapped. Also, "Register Y Low Byte" (in row 5) should be "Register X Low Byte," and "Register X High Byte" (in row 6) should be "Register Y High Byte."

p. 362, bulleted item 3: "$FFF2 and$FFF4" should be "$FFF4 and$FFF2."

p. 363, Table 11-1: in the TCNT row, "TSRC2" should be "TSCR2." In the SCI0 row, "SCICR2" should be "SCI0CR2." In the SCI1 row, "SCIR2" should be "SCI1CR2." In the ATD0 and ATD1 rows, "ATDCTL2" should be "ATD0CTL2" and "ATD1CTL2," respectively.

p. 367, fourth line below Figure 11-6: "Figure 11-4" should be "Figure 11-6."

p. 367, bulleted item 2 should be deleted, since the code does not locate the TCNT ISR at $8200. p. 367, bulleted item 3: the final two sentences should be deleted, since the code does not use a RAM vector table. The last paragraph on this page should also be deleted, for the same reason. p. 368, twenty-first line of code in Example 11-1: "TFO" should be "TOF." p. 368, second-to-last line in Example 11-1: "counts up" should be "overflows." p. 370, ninth line of code in Example 11-3: "BSET TIOS" should be "BCLR TIOS." Two lines below that, "input capture" should be "rising edge." Seven lines below that, "LDD TCNT" should be "LDD TC7." p. 370, Example 11-3: The last sentence ("Also notice… ") should be deleted, since we didn’t set TFFCA in this example. p. 373, fifth line of second paragraph: "IRQE" should be "IRQEN." Three lines below that, "IRQEN" should be "IRQE." p. 377, Second sentence in Figure 11-11: "a falling edge" should be "an active edge." The same change should be made to Figure 11-12. p. 379, bulleted item 8: "IRQTN" should be "IRQEN." p. 380, Figure 11-16: In the diagram, "TDRF" should be "TDRE." In the sentence below, "RDRE" should be "TDRE." p. 381, third line of code in Example 11-11: "LDAA #$FF" should be "Entry: LDAA #$FF." And in the third line of text following the code, "corresponding bit in the TIE" should be "TIE bit in the SCI0CR2." p. 382, third line of code in Example 11-12: "LDAA #$FF" should be "Entry: LDAA #$FF." p. 383, Review Question 4: "TIE bit for the serial transmit" should be "RIE bit for the serial receive." p. 386, last line before Interrupt latency: "RET" should be "RTS." p. 387, sixth-to-last line: "enabled" should be "disabled." p. 392, first line: Delete "(C version of Example 11-3)." p. 399, part b) in third line of Example 11-7: "01101110" should be "01100110." p. 404, answer to Question 3 of Section 11.3: "X bit" should be "I bit." p. 404, answer to Question 6 of Section 11.4: "True" should be "False." pp. 404-405, answer to Question 4 of Section 11.5: both instances of "IRQ" should be "Channel 7," and "Channel 7" should be "IRQ." p. 405, answer to Question 1 of Section 11.7: Delete the second sentence ("They are assigned…".) p. 405, answer to Question 4 of Section 11.7: "CGRINT" should be "CRGINT." p. 409, "E" row of Table 12-2: "cursor blinking" should be "cursor on." p. 410, sixth EQU statement in Program 12-1: "PORTT" should be "PTT." p. 412, Program 12-2: Insert "BITS EQU 4" and "CNT DS.B 1" as two new lines of code at the beginning of the program. p. 422, Figure 12-6: In the first row of keys, two keys are labeled "2." The second of these should be labeled "3" instead of "2." p. 422, Solution to (b) of Example 12-3: "key number 7" should be "key number 4." p. 431, answer to Question 4 of Section 12.2: "0" should be "A." p. 436, second-to-last row of Table 13-3: "1/1,024" should be "1.28/1,024." p. 436, Solution to part (a) of Example 13-1: "10101011" should be "10101010." p. 437, fourth-to-last and second-to-last lines: "ADC848" should be "ADC0848." p. 438, sentence (5) of fourth paragraph: "108" should be "104," and "1,080" should be "1,040." Also, throughout this paragraph "mv" should be "mV." p. 440, caption to Figure 13-6: "Blocking" should be "Block." p. 443, second line of Solution to Example 13-6: "16 clocks and slowest is 2" should be "2 clocks and slowest is 16." p. 445, ninth line of paragraph below the Figure: "-1,024 to +1,023" should be "-512 to +511." p. 446, fifth line of text in Figure 13-11: "the lower 2" should be "the upper 2." p. 446, tenth line of text in Figure 13-11: "$8000 to $7FFF" should be "$200 to $1FF." p. 448, Figure 13-14: in the graphic and in the first line of text below the graphic, "CC7F" should be "CCF7," and "CC6F" should be "CCF6," and so on. p. 448, last line of Example 13-8: "4.82 mV" should be "4.88 mV." p. 449, last two rows of Table 13-5: "ATD0DR7H" should be "ATD1DR7H," and "ATD0DR7L" should be "ATD1DR7L." p. 450, bulleted item 3:"conversion sequences" should be "conversions per sequence." p. 459, last row Table 13-7: "-32 F" should be "+32 F." p. 460, last column of second row in Table 13-9: "00000100" should be "00000001." p. 461, Figure 13-21: the symbol for the LM35 or LM34 should be a rectangle, not an AND symbol. p. 462, Review Question 4: "PIC" should be "HCS12." p. 470, answer to Question 4 of Section 13.2: "True" should be "False." p. 473, caption to Figure 14-2: "Page Program" should be "Program Page." p. 481, Figure 14-10: in the graphic and in the seventh line of text below the graphic, "POVL" should be "PVIOL." p. 482, first line of bulleted item (1): "FDIVCLK" should be "FCLKDIV." p. 485, second-to-last line before Program 14-3: "$4450" should be "$4500." p. 486, first line of bulleted item (1): "FDIVCLK" should be "FCLKDIV." p. 488, second line: "through 14-8C" should be "through 14-7C." p. 490, fifth line of first paragraph in Section 14-3: "EEPOM" should be "EEPROM." p. 490, second and third lines of last paragraph: "FDIVCLK" should be "FCLKDIV," and "EDIVCLK" should be "ECLKDIV." p. 491, third line of text in Figure 14-12: "Flash" should be "EEPROM." p. 492, last line of text in Figure 14-14: "$61" should be "$60." p. 492, first line of bulleted item (1): "EDIVCLK" should be "ECLKDIV." p. 495, fourth and seventh lines: "Flash" should be "EEPROM." The same change should be made in the first line on p. 496. p. 496, fourth line: "STAA FCMD" should be "STAA ECMD." Two lines below that, "STAA FSTAT" should be "STAA ESTAT." p. 496, third line of first full paragraph: "YES" should be "GOODBYE." p. 498, Review Questions 1 and 2: "is 150 kHz" should be "is between 150 kHz." p. 499, ninth line of text in Figure 14-17: "FDVI5" should be "FDIV5." Also, in the last line before the Notes, "divide by 32" should be "divide by 64." p. 500, Figure 14-18: insert a line connecting the top decision diamond and the oval to its right. The same change should be made to Figure 14-20 on p. 502. p. 501, first line of text in Figure 14-19: "lock" should be "Clock." Also, in the ninth line of text, "EDVI5" should be "EDIV5," and "Flash" should be "EEPROM." Also, in the last line before the Notes, "divide by 32" should be "divide by 64." Also, in Note 2), all four instances of "Flash" should be "EEPROM." p. 506, answers to Questions 3 and 4 of Section 14.4: "True" should be "False." p. 516, eleventh line of code in Example 15-1: "MOVB R2,$FF" should be "MOVB #$FF, R2." p. 517, last line before Example 15-2: "passes" should be "possesses." (?) p. 526, Figure 16-1: "STOBE" should be "STROBE." p. 527, last and second-to-last lines of first paragraph: both instances of "D7" should be "A7." p. 528, bulleted item 1 in the lower half of the page: "writing" should be "reading." p. 532, Figure 16-8: in the graphic "CHPA" should be "CPHA." Also, in the sixth-to-last line of text in this figure, "(falling)" should be "(falling if CPOL=0, or rising if CPOL=1)." And in the next line of text, "(rising)" should be "(rising if CPOL=0, or falling if CPOL=1)." p. 533, ninth line of text in Figure 16-10: "PTEF" should be "SPTEF." p. 533, header for the first column in Table 16-1: "SCI" should be "SPI." The same change should be made to the header for the first column in Table 16-2. p. 534, third line of Example 16-3: "connected to ground" should be "connected to VCC." And in the first line of code in the Solution to this example, "LDAA #$20" should be "LDAA #$41." Similarly, in the second row of the C code further down, "SPI0BR = 0x20" should be "SPI0BR = 0x41." p. 536, third-to-last sentence of the first paragraph: "28 bytes of RAM" should be "18 byes of RAM." Later in that sentence, delete "the other." And at the end of the sentence, insert "and the other 14 bytes are reserved." The entire sentence should read: "It uses 18 bytes of RAM for clock/calendar and control registers, and 96 bytes of RAM are for general-purpose data storage, and the other 14 bytes are reserved." p. 537, fourth-to-last line and last line: both instances of "Section 16.4" should be "Section 16.5." p. 539, 0x06 row of Table 16-3: in the D7 column, "0" should be "0 or 1," since this bit will be 1 if the year is greater than 79. p. 541, ninth line of code: "LDAA #$20" should be "LDAA #$41." p. 543, first line: "6 bytes" should be "7 bytes." p. 547, second-to-last line: "IRQxF" should be "IRQFx." p. 548, seventh line of text in Figure 16-17: "Interrupt 0" should be "Interrupt 1." p. 548, Table 16-5: in the D7 column of row 06H, "0" should be "0 or 1." Also, in the last column of rows 07H, 08H, 0BH, and 0CH, "A9" should be "D9." Also, in the last column of rows 09H and 0DH, "A2" should be "D2;" and in last column of the following rows, "D1" should be "E1." In the last column of rows 0AH and 0EH, "01-07" should be "01-07 or 81-87." In the Write column of the second-to-last row, "82" should be "92." p. 549, eighth and ninth lines of second paragraph: both instances of "IRQxF" should be "IRQFx." p. 553, answer to Question 1 of Section 16.4: For consistency with the answer to Question 1 of Section 16.3, "True" should be "True, unless a battery or backup supply voltage is connected." p. 553, answer to Question 6 of Section 16.4: "False" should be "True." p. 560, Figure 17-6: pin numbers 5 and 6 on the ILQ74 should be swapped. p. 561, seventh and tenth lines of Solution to Example 17-2: both instances of "%00000001" should be "%00000010." And in the eleventh line, "%00000010" should be "%00000100." p. 564, first line of Example 17-4: "PA0" should be "PA7." And in the Solution to this example, delete the tenth line of code ("SW = 1;"), since we should not try to assign a value to an input pin. p. 566, fourth line of Example 17-6: "PD.1" should be "PA.1," and "PD.0" should be "PA.0." p. 573, last line of Figure 17-19: "these bits" should be "bits PWME0, PWME2, PWME4, and PWME6." p. 575, PSWAI line of Figure 17-21: "D1" should be "D3." And in the PFRZ line, "D0" should be "D2." p. 576, bulleted item 8: "PWMDTY" should be "PWMDTYx." p. 576, bulleted item 10: "PWMEN" should be "PWME." p. 576, first line of Solution to Example 17-11: "30" should be "$30." The same change should be made in Example 17-14 on page 578.

p. 577, second line of Solution to Example 17-12: "the use of ClockA" should be "the use of ClockSA." The same change should be made in Example 17-15 on page 579.

p. 577, second and third lines of Solution to Example 17-12, and second and third lines of code in the Solution: all four instances of "ClockA" should be "ClockSA." The same changes should be made in Example 17-17 on page 580. And the first, second, and fourth of these changes should also be made in Example 17-16 on page 579 and in Example 17-18 on page 580.

p. 582, answer to Question 2 of Section 17.2: "True" should be "False." This point was not discussed in the chapter, but when we’re using PORTP for PWM, the pins are automatically configured as outputs and there’s no need for us to configure them as outputs using DDRP.

p. 582, answer to Question 3 of Section 16.4: "PWMRER3" should be "PWMPER3."

p. 584, second line of Example for ABA: "A=$4F" should be "B=$4F."

p. 584, second line of Example for ADCB: "#$89" should be "#$87."

p. 585, first line of first Example for ADDA: "$#45" should be "#$45." And in the next line, "$#4F" should be "#$4F."

p. 585, fourth-to-last line: "155F" should be "$150F." p. 587, last line of last Example for ADDA: "V=1" should be "V=1, C=1." And in the next line, "C = 1 since" should be "V = 1 since." p. 587, last sentence before ADDB section: "these two instructions" should be "this instruction." p. 587, first line of first Example for ADDB: "$#45" should be "#$45." And in the next line, "$#4F" should be "#$4F." p. 588, fifth-to-last line: both instances of "$1501" should be "$1551." On the next line, "$1501" should be "$1550." p. 589, Flags line for ANDA: "N" should be "N and Z." p. 593, second-to-last line of BITA section: "0000 1001" should be "0000 0000." And in the next line, "09 0000 1001" should be "00 0000 0000"; also, "Z=0" should be "Z=1." p. 594, second line of Example at top of page: "A=$39" should be "B=$39." p. 594, heading for BLO section: "if C = 0" should be "if C = 1." p. 595, last line: delete the sentence that starts "The following three instructions…." Reason: BRN does not perform the same action as the other two lines, since BRN advances the program counter, but the other two do not. p. 599, last sentence of CMPB section: "contents of A" should be "contents of B." p. 603, first line of second Example for EDIV: "#$18" should be "#$1E." And in the next line, "=$188480" should be "=$1E8480." And in the next line, "#$1500" should be "#1500."

p. 603, Flags line for EMACS: "N, Z, C" should be "N, Z, V, C."

p. 605, second line of second Example at top of page: "#$50000" should be "#50000." p. 605, second line of first Example for EORA: "ORed" should be "XORed." p. 605, second line of second Example for EORA: "EXORA" should be "EORA." p. 605, last two lines: both instances of "OR A with" should be "XOR A with." p. 606, second line of first Example for EORB: "ORed" should be "XORed." p. 606, second line of second Example for EORB: "B=$6F" should be "B=$6D." And three lines below that, "$62 0110 1111" should be "$6D 0110 1101." p. 607, third line of first Example for IDIV: "X=10=$000A" should be "X=100=$0064." p. 607, fourth line of IDIVS section: "in register Y" should be "in register X." p. 610, fourth line of LBHI section: "BHI" should be "LBHI." p. 610, fourth line of LBHS section: "BHS" should be "LBHS." p. 610, heading for LBLO section: "if C = 0" should be "if C = 1." And in the fourth line of this section "BLO" should be "LBLO." p. 610, fourth line of LBLS section: "BLS" should be "LBLS." p. 611, second line of LBRA section: "The 2 bytes" should be "The first 2 bytes." p. 612, fourth line of LBRN section: delete the sentence that starts "The following three instructions…." Reason: LBRN does not perform the same action as the other two lines, since LBRN advances the program counter, but the other two do not. p. 612, last two lines of LDAB section: both instances of "LDAA" should be "LDAB," and both instances of "into A" should be "into B." p. 614, last two lines: both instances of "LSRB" should be "LSLB." p. 615, second-to-last line: "011001100" should be "01001100." And in the next line, "001100110" should be "00100110." p. 616, second line of Example for LSRD: "D=$6666" should be "D=$4CCC." And in the next line, "D=$3333" should be "D=$2666." p. 617, second line of first Example for MUL: "LDDB" should be "LDAB." p. 618, first two lines of Example at top of page: both instances of "$58" should be "$50." p. 618, first line of Example for NEGA: "$58" should be "$50." p. 618, third line of first Example for ORAA: "$39" should be "$30." p. 619, fourth line of first Example for ORAB: "$09" should be "$07." And on the next line, "$39" should be "$3F." p. 621, Flags line for PULC: "None" should be "H, N, Z, V, C." p. 622, second line of Example for ROLB: "A=" should be "B=." p. 623, Flags line for RTI: "None" should be "H, N, Z, V, C." p. 624, first line of second Example for SBA: "$3F" should be "$35." And on the next line, "$45" should be "$39." And on the next line, "$3F-$45=$1C   C=0" should be "$35-$39=-$04 C=1." p. 624, bulleted item 1 in SBCA section: "complement of the memory byte" should be "complement of the sum of the memory byte plus the carry bit." p. 625, table at the top of the page before the first Example: in all three rows of the table, "M" should be "M+C." The same changes should be made to the table in the SBCB section further down the page. p. 626, second line of Example at top of page: "SEX D" should be "SEX A, D." p. 626, second line of Example for STAB: "has$95" should be "has $59." p. 627, first line of Example for STS: "D=" should be "SP=." p. 628, fourth line of first Example for SUBA: "SUBA" should be "SUBA$1500." The same change should be made to the fourth line of the second Example. Also, both Examples make references to "Step 3," without any explanation of what Step 3 is. To clarify this reference, this SUBA section should, like the SBA and SBCA sections on p. 624, contain a paragraph explaining that the hardware subtracts by performing the following steps:

1. Take the 2’s complement of the memory byte.
2. Add this to register A.
3. Invert the carry bit.

p. 629, SUBB section: All of the changes just described for SUBA should also be made for SUBB, but replacing "B" for "A" throughout.

p. 629, SUBD section: Like SUBA and SUBB, this section should contain a paragraph exaplining the reference to "Step 3." Also, the second SUBD example contains mistakes, and both examples should show all 16 bits of the values on which SUBD operates, instead of just showing 12 bits. The right-hand side of the first example should be:
0000 0011 0100 0101
2’s comp       1111 1101 1101 1101
1 0000 0001 0010 0010

The right-hand side of the second example should be:
0000 0011 0100 0101
2’s comp       1111 1100 1011 0111
0 1111 1111 1111 1100

p. 629, second-to-last line: "SP" should be "PC."

p. 630, second line of paragraph explaining TAP: "can be changed" should be "cannot be changed."