Support and Errata

EMAIL Support at support4@hcs12text.com. Note that this address changes occasionally to prevent spam. However one can always use the address without the number at the end of "support".

Errata and Additions

The current revision is called Revision 7a and was made July 2015 to correct the errata below as well as a number of minor typographical errors. Note that many browsers now block the execution of Java programs so the embedded, runable programs in the text may not execute depending on browser settings. The programs can always be assembled and run in the simulator outside of the browser.

Changes made at Revision 7a

Page 161 -- rtiisr: bset CRGFLG #$80 should be rtiisr: bclr CRGFLG #~$80 although the former will actually work.

Page 177 (part018.html on CD) -- Timer module setup example initializes register TSCR1 twice. The second write should be to TSCR2.

Page 228 (part022.html on CD) -- The Morse code is wrong! An "S" is three short marks while an "O" is three long marks.

Part022c.html -- Error only on the CD. Line buffering example uses wrong buffer size when checking for the end of the buffer. The line at label serint7 should be cpx #linebuf+LINESIZE-2.

I do not plan to release a new revision.

Changes made at Revision 7

page 57, figure5a-6.gif -- text should read "starting at $3120"
page 115 -- The & character is used for the AND operation, not the OR operation.
page 58 -- @ character should be & character in C language example.
page 177, figure14-4.gif -- PLLON should be PLLSEL
page 178 -- last list item, clarify that the PLLSEL bit is the most significant bit of CLKSEL
page 201 and 205 "The Timer Module" added example initialization code

A small change was made to address browser security issues when running the simulator from the text.

Changes made in all CDs shipped after December 3, 2010

A change (for added security) that has appeared in recent versions (Windows 7 and perhaps Vista) of Microsoft Windows had disabled the ability of the simulator to save settings between launches. Existing customers can solve this problem by uninstalling and reinstalling the CD to a different location than the default. I suggest "C:\68HCS12". As of December 3, the settings are saved in a file in the users "home" folder. This should work properly in all Windows versions as well as Linux and Mac OS X.

Additional textbook errata has been discovered that has not been corrected:
page 57, part005a.html -- Figure for Constant Indirect Indexed mode, should be "starting at $3120"

Changes made in all CDs shipped after June 25, 2010

I fixed a minor (within page) link error and missing sub-section heading. Two bugs in the simulator were fixed -- the first caused input captures to be missed if the clock prescaler was used. The second is an error in the Java runtime library that affected running the simulator in certain Linux versions with certain Java versions.

Changes made at Revision 6

Added section about Harris 1-Wire interface to "Other Serial Interfaces" chapter. Enlarged "Multiple Processes" Appendix. Added project 13 to "IIC Bus Interface" chapter. Corrected project 2 in EEPROM chapter. Added question 7 and projects 8 and 9 to the "Other Serial Interfaces" chapter.

Changes made in all CDs shipped after May 26, 2009

Page numbers refer to printed text or PDF file. File names are the HTML files. Not all errors appear in both versions.
page 184, part015.html -- "Ever compiler" should be "Every compiler"
page 187 -- RTICTL = 0x13 should be 0x23
page 236, part019.html -- ATDCTL5 should be ATD0CTL5
page 258, part021e.html -- change $CFFF to $FFFF
page 267, part022a.html -- SC0DBH and SC0DBL should be SC0BDH and SC0BDL
page 313, part023b.html -- 11 bit identifier and one dominant bit
page 319, part020.html -- change "corse" to "course"
page 320, part020.html -- change "movb #13 ECLKDIV" to "movb #27 ECLKDIV"
page 322 -- figure is improperly positioned
page 328, part024.html -- delete "lecture note"
page 388 -- For systems with 4 MHz crystals, multiplication factor is 6, not 3

Changes made at Revision 5

Revision 5 was generally released August 9, 2008, however a few schools received copies as early as June. The error corrections were minor.

In example program part015.asm, the bset CRGFLG #$80 instruction should be a bclr CRGFLG #~$80, although in this case the program will work either way. Additionally, in the printed text (and PDF file) movb #$13 RTICTL should be movb #$23 RTICTL.

In the printed text (and PDF file), on page 293, the ldab SPI0DR should be changed to tst SPI0DR to match the CD version. Either will work, but using the tst instruction is the best practice.

The chapter on the IIC interface needs to be more explicit in that the status register must be read before accessing the data register. Assume that the example programs have executed tst SP0SR or something similar first.

The second question for System Clocks should read "What parts of the 68HCS12 will always operate at the crystal frequency?"

Changes made June 2007

Revision 4 is complete. Many enhancements to simulator, including SPI simulation, drag-and-drop of ASM and S19 files, ability to change various defaults, and support for the MC9S12C family of microcontrollers. The CD-based text has new fonts and lists that are set off from the text, a new section on the MC9S12C family, assumption that the crytal is 8 MHz (formerly 4 MHz), and some additional text in the SCI and SPI sections. There are now study questions associated with each section, with some answers provided. Other small modifications were made.

A new installer program was provided that works correctly with Windows Vista.

Added movb #2 DDRJ to part017a.html program.

In part023b.html, Other Serial Interfaces, in the figure showing bit stuffing, the original value is $FE08, not $E8.

In part023a.html, Inter-Integrated Circuit Bus Interface, the phrase "being 0 instead of 1" should be "being 1 instead of 0"

All CDs shipped before June 1, 2007

It happened again -- another defective copy of asm12.exe (the 68HC12 assembler) made it out in AsmIDE. This defective asm12.exe will dump out the source listing when a listing file is specified but there are errors. If you see this problem, which is probably in CDs distributed after June, 2006, then do the following. Download the corrected assembler here. Unzip the archive to get a replacement as12.exe program for the file of the same name in the folder in which you installed the Designing with Microcontrollers CD. This is usually c:\Program Files\HCS12Text\.

Changes made March 2007 (CDs shipped after March 22, 2007)

In part018c.html, The Timer Module -- The Special Case of Channel 7, the next to last program (which is also runnable from the browser) has the wrong output frequency, 3 MHz. The line movw #3 TC7 should be movw #11 TC7. A typo, HS12, at the end of the page should be changed to HC12.

File 68HCS12Text_Printable.pdf has been revised to fix the errata to date.

Changes made February (CDs shipped after February 28, 2007)

Some minor changes were made to the simulator -- 1 megabyte was removed from the simulator's "footprint," corrected timing error when performing a non-aligned word read from flash ROM (it wasn't adding an additional memory cycle), and corrected a problem with links in the documentation.

The installer has been revised to use the latest version of the Java 1.4 runtime.

Note that Most CDs shipped during February have the changes below made on the CD but not in the installation. If you purchased in this period, you can copy these files from the CD over the older versions in Program Files.

In part010d.html, Decision Trees and Logic Instructions - Bitwise Boolean Summary - Clearing Bits, last line, the bset instruction should be bclr.

In part022b.html, Serial Communications Interface and Buffering -- Polled Operatiion of the Serial Communications Interface, in the last example, the two tstb instructions should be bitb.

The printed version of the text has not been revised.

Changes made November 25, 2006 (CDs shipped after November 26, 2006)

Some minor changes were made to the simulator -- changing the PC register, memory display address, and code viewer address fields will automatically update when the field is left without need to press Enter first. An empty error message (when loading an S19 file with bad syntax) has been fixed. The order of the registers in the register display has been changed to be more conventional.

Changes made July 23, 2006 (CDs shipped after July 23, 2006)

Revision 3 of the CD is now complete. It has new sections called Other Serial Interfaces covering the BDLC, CAN, and BDM, and Alarm Clock Example, and application example in C.

The printed version of the text has been revised to match the revised CD version and is now labeled "Second Edition".

Changes made July 13, 2006 (CDs shipped after July 12, 2006)

In the chapter Load Store and Move Instructions the sentence "There are two instructions which are synonyms for leax A,X and leay A,Y, namely abx and aby." changed to readread "There are two instructions which are synonyms for leax B,X and leay B,Y, namely abx and aby."

The printed version has not been updated.

Changes made May 29, 2006 (CDs shipped after May 29, 2006)

The figure showing the clock PLL should say "multiply by" instead of "divide by". Clarified that RTR bits are in RTICTL register in description of the Real Time Interrupt. Link to section before External Memory/Peripheral Interfacing corrected. Corrected small error in figure showing memory expansion in MC9S12DP256.

The printed version of the text has not been updated as changes are minor.

Changes made May 17, 2006 (CDs shipped after May 17, 2006)

The fixed version of the AsmIDE program is now being shipped on the CD. The simulator has a new feature -- it remembers the last directory accessed the last time the simulator was run.

Changes made April 11, 2006 (CDs shipped after April 15, 2006)

The chapter on the Analog to Digital Converter contains a number of small errors in describing the operation of the converter, as well as a few register name errors. Basically, when I rewrote the chapter for the 68HCS12 I missed a few things. All is now corrected. The printed version of the text has not been updated.

There have been problems with the latest AsmIDE not working properly when new files are opened.

Changes made January 21, 2006 (CDs shipped after January 21, 2006)

A change in the ASM12 assembler, version 1.2e, causes the listings it creates to not be sensed by the simulators (both the 68HCS12 and 68HC12) for the purpose of displaying source code. An easy solution is to download the modified assembler here. Unzip the archive to get a replacement as12.exe program for the file of the same name in the directory in which you installed AsmIDE.

Corrected an error in the simulator for the STX, STY, and STS instructions using auto pre/post increment/decrement indexed modes with the same register. This isn't a likely use, which is why it hasn't been spotted until now. Basically, when executing, for example stx 2,+x the value of X after incrementing was stored rather than the value before incrementing.

Changes made November 6, 2005 (CDs shipped after November 6, 2005)

Some cosmetic changes were made to the simulator. Some changes will give better font sizes when the DPI setting is changed in Windows, and the overall appearance is improved when run under Mac OS X and Linux. There were no functional changes.

Changes made in Revision 2 (CDs shipped after July 4, 2005)

Errata corrected -- "third argument" changed to "second argument" in two occurances in text file part021e.html. "SPIF" changed to "SPRF" and "LSBF" to "LSBFE" in part023.html.

Fundamental changes were made that now allow starting the example program simulations directly from the text in Firefox, or other browser that prevents running executable programs.

The AsmIDE, ASM12 programs, and the Freescale documentation have all been brought to the latest versions (as of June 2005). Simulator has been improved. Changed textbook references to refer to the new S12CPUV2 Reference Manual where appropriate.

A new section on the IIC was added to the text.

An interrupt, a mixed addition, and a floating point example programs added. Two C language example programs added (buffered SCI driver and RTI interrupt counter), as well as C language code segments in several locations. There is added text to help clarify beginning student issues concerning big versus little "endian", byte versus word, and signed versus unsigned. Some additions and changes made to the description of the assembler to clear up confusion and match the latest AS12 version.

Changes made in Revision 1B (CDs shipped after May 1, 2005)

In the example under Pulse Width Modulation, Connecting Channels for 16-Bit Counters, the example code should move 2 into PWMCLK and not 1. The example program part18d.asm has a couple of coding errors which do not appear in the text example.

The time to do an ATD conversion was incorrectly stated as 18 clock cycles (rather than 14 clock cycles) at one location in the text.

Some changes have been made to the simulator to improve appearance when running on other than Microsoft operating systems. An error in handling the FIFO bit in the ATD simulation has been fixed.

"stab DAC" should be "staa DAC" in the last example of binary scaled arithmetic. This change not in all CDs shipped.

Changes made in Revision 1A (CDs shipped after February 27, 2005)

February 27, 2005 - Simulator revised. Some issues with display initialization for parallel ports T and H fixed. The simulator now matches the Dragon-12 Revision E board in that port J pin 1 must be driven low to enable the row of LEDs. Previously, the simulator matched board revisions A-D.

February 7, 2005 - Change references of location $800 and $801 to $1000 and $1001 in files part003b.html, part009.html. Change references of location $4000 to $2000 in part009.html. Change reference to instructions tsta and tstb to bita and bitb in file part010d.html.
Change "l2: lsr $1900 ; Shift $800 to the right" to "l2: lsr $1000 ; Shift $1000 to the right" in part010c.html.

Changes made in Revision 1 (CDs shipped after December 23, 2004)

December 23, 2004 - Many typographical and grammatical errors corrected. A change in the simulator code makes it up to 30% faster simulating interrupt driven programs. A PDF file of the textbook is now provided. Sample program LST files now provided so the source lines appear in the simulator. A bug in setaccess was fixed. Previous customers desiring the fixed setaccess.exe, revised simulator JAR file, or the PDF textbook file be E-mailed to them should contact me. (Note that the textbook PDF is several megabytes when mailed.)

September 24, 2004 - Motorola Semiconductor has been changed to Freescale Semiconductor in the text and the assembler and simulator documentation. A newer version of AsmIDE is provided on the CD.