8-bit Microcontrollers MC9S08SH8/4 Fact sheet Target Applications • Personal care devices • AC-powered consumer goods, including power tools, small appliances and hand-held devices • Fire alarms • Wireless sensor applications, including those enabled by a simple media access controller (SMAC) • Watchdog coprocessors • Secure boot coprocessors • Security systems Features 8-bit HCS08 Central Processor Unit (CPU) • Up to 40 MHz HCS08 CPU (20 MHz bus frequency) for 50 ns minimum instruction time • Offering high performance up to 5V, ideal for industrial applications • HC08 instruction set with added BGND instruction • Backward object-code compatibility with 68HC08 and 68HC05 so existing code libraries can still be used • Allows for efficient, compact module coding in assembly or C compiler • Support for up to 32 interrupt/reset sources • Allows for software flexibility and optimization for real-time applications Integrated Third-Generation Flash Memory and RAM • Embedded flash that is in-application reprogrammable over the full operating voltage and temperature range with a single power supply • Provides users a single solution for multiple platforms or a single platform that is field reprogrammable in virtually any environment • Does not require an additional pin or power supply for flash programming, simplifying the interface for in-line programming and allowing for more GPIO pins • Extremely fast, byte-writable programming; as fast as 20 us/byte • Helps reduce production programming costs through ultra-fast programming as well as lower system power consumption due to shorter writes • Up to 100,000 write/erase cycles at typical voltage and temperature (10k minimum write/erase); 100 years typical data retention (15 years minimum) • Allows electrically erasable programmable read-only memory (EEPROM) emulation, reducing system costs and board real estate Overview The MC9S08SH8/4 strengthens Freescale’s entry-level 8-bit microcontroller portfolio by extending the advantages of the HCS08 core and peripherals to 5V. The highly integrated SH controller family is Freescale’s first low-pin-count S08 with 40 MHz internal clock source (ICS). It includes an additional ganged output that can use one bit to toggle multiple pins, which allows for higher current drive. The family also features strong analog capabilities, a complete set of serial modules, a temperature sensor and robust memory options ideal for general-purpose consumer and industrial applications in the 2.7V to 5.5V range. MC9S08SH8/4 Block Diagram HCS08 CPU On-chip ICE (DBG) 4/8 KB Flash BDC 256/512B RAM 12-ch., 10-bit ADC LVI SCI COP SPI I2C Two 2-ch., 16-bit Timers Int/Ext Osc. 8-bit Modulo Timer w/Prescaler Internal Clock Source w/FLL Up to 17 GPIO Temperature Sensor Analog Comparator Up to 5V Benefits Flexible Clock Options • Internal clock source (ICS) module containing a frequencylocked loop (FLL) controlled by internal or external reference • Can eliminate the cost of all external clock components, reduce board space and increase system reliability • Precision trimming of internal reference allows typical 0.1 percent resolution and +0.5 percent to -1 percent deviation over operating temperature and voltage • Provides one of the most accurate internal clock sources on the market for the money • Internal reference can be trimmed from 31.25 kHz to 39.065 kHz, allowing for 16 MHz to 20 MHz FLL output • Can use trimming to adjust bus clocks for optimal serial communication baud rates and/or timer intervals • Low-power oscillator module (XOSC) with software selectable crystal or ceramic resonator range, 31.25 kHz to 38.4 kHz or 1 MHz to 16 MHz, and supports external clock source input up to 40 MHz • 32 kHz oscillator provides low-power option for systems requiring time-keeping functionality (i.e., time and date) while in low-power modes 17 Bidirectional Input/Output (I/O) Lines; One Output Only Line • Outputs 10 mA each; 60 mA max for package • High-current I/O allows direct drive of LED and other circuits to virtually eliminate external drivers and reduce system costs • Software selectable pull-ups on ports when used as input; internal pull-up on reset and interrupt request (IRQ) pin • Reduces customer system cost by eliminating need for external resistors • Software selectable slew rate control and drive strength on ports when used as output • Can configure ports for slower slew rate and weaker drive to minimize noise emissions from the MCU • 8-pin keyboard interrupt module with software selectable polarity on edge or edge/level modes • Keyboard scan with programmable pull-ups/pull-downs virtually eliminates external glue logic when interfacing to simple keypads Ganged Output Option for PTB (5:2) and PTC (3:0) • Allows single write to change state of multiple pins • Drives up to 80 mA without risk of runaway code shorting • Provides option to tie multiple pins from different ports to same control registers • Safely drives multiple outputs Multiple Serial Communication Options • Serial communications interface module with option for 13-bit break capabilities and double-buffered transmit and receive • Serial peripheral interface module and I2C bus module • All serial peripherals available for use in parallel on 16-pin devices 8-bit Microcontrollers Features Benefits Cost-effective Development Tools • Easy interface to analog inputs, such as sensors DEMO9S08SH8 Integrated Analog Peripherals • 12-ch., 10-bit analog-to-digital converter (ADC) Automatic compare function, software programmable for greater than/equal to or less than conditions • Used to set conversion complete and generate interrupt only when result matches condition Asynchronous clock source • Can be used to run ADC when MCU clocks are off, such as in STOP3 low-power mode Temperature sensor • Calculates temperature without any external components and saves an ADC input channel for other use Internal bandgap reference channel • Constant voltage source for calibrating ADC results requires no external components Hardware triggerable using the RTI counter • Takes periodic measurements without CPU involvement; can be used in STOP3 with compare function to take measurement and wake MCU from STOP3 only when compare level is reached Low-power and high-speed options • Flexible configuration to meet high-performance and low-power requirements $59* Cost-effective demonstration board with potentiometer, LEDs, serial port and built-in USB-BDM cable for debugging and programming M68CYCLONEPRO $499* HC08/HCS08/HC12/HCS12 stand-alone flash programmer or in-circuit emulator, debugger and flash programmer with USB, serial or Ethernet interface options • Analog comparator module (ACMP) Option to compare to internal reference • Requires only single pin for input signal Option to route comparator output directly to pin • Allows other components in system to see results of comparator with minimal delay Output can be optionally routed to timer/pulse width modulation (TPM) module as input capture trigger • Can be used for single slope ADC and resistancecapacitance (RC) time constant measurements flash programmer with USB PC interface • Free running on-chip low-power oscillator (1 kHz) for cyclic wake-up without external components; runs in all MCU modes CWS-H08-STDED-CX USBMULTILINKBDM $99* Universal HC08 in-circuit debugger and • Real-time counter (RTC) 8-bit modulus counter with binary- or decimal-based prescaler Free** CodeWarrior™ Special Edition for Microcontrollers includes integrated External clock source for prescise time base, time-of-day, calendar or task scheduling functions development environment (IDE), linker, Three Timer Modules debugger, unlimited assembler, Processor • Programmable 16-bit timer/PWM modules (TPM1 and TPM2) • Each channel can be independently programmable for input capture, output compare, buffered edge-aligned pulse width modulation (PWM) or buffered center-aligned PWM • 8-bit modulo timer module (MTIM) with 8-bit prescaler • Timer overflow interrupt can be enabled to generate periodic interrupts for time-based software loops System Protection • Watchdog computer operating properly (COP) reset with option to run from dedicated 1 kHz internal clock source or bus clock • Resets device in instance of runaway or corrupted code, and independent clock source provides additional protection in case of loss of clock • Low-voltage detection with reset or interrupt • Allows system to write/save important variables before voltage drops too low • Can hold device in reset until reliable voltage levels are reapplied to the part • Illegal opcode detection with reset • Resets device in instance of runaway or corrupted code • Flexible block protection • Secures code sections to prevent accidental corruption by runaway code • Option to protect various block sizes • Option to put bootloader code in protected space and clear flash for reprogramming • Security feature for flash and RAM • Prevents unauthorized access to memory to protect a customer’s valuable software IP • Always-on power-on reset (POR) circuitry • Significantly reduces risk of code runaway due to brownout situations Background Debugging System and On-chip In-circuit Emulation (ICE) with Real-time Bus Capture • On-chip ICE • Provides single-wire debugging and emulation interface; eliminates need for expensive emulation tools • Provides circuit emulation without the need for additional, expensive development hardware Expert™ auto-code generator, full-chip simulation and 16 KB C compiler *Prices indicated are MSRP. **Subject to license agreement and registration. Package Options Part Number Package Temp. Range MC9S08SH8CSC MC9S08SH4CSC MC9S08SH8CTG MC9S08SH4CTG MC9S08SH8CPJ MC9S08SH4CPJ MC9S08SH8CTJ MC9S08SH4CTJ MC9S08SH8CWJ MC9S08SH4CWJ MC9S08SH8CFK MC9S08SH4CFK MC9S08SH8MSC MC9S08SH4MSC MC9S08SH8MTG MC9S08SH4MTG MC9S08SH8MPJ MC9S08SH4MPJ MC9S08SH8MTJ MC9S08SH4MTJ MC9S08SH8MWJ MC9S08SH4MWJ MC9S08SH8MFK MC9S08SH4MFK 8-pin SOIC 8-pin SOIC 16-pin TSSOP 16-pin TSSOP 20-pin PDIP 20-pin PDIP 20-pin TSSOP 20-pin TSSOP 20-pin SOIC 20-pin SOIC 24-pin QFN 24-pin QFN 8-pin SOIC 8-pin SOIC 16-pin TSSOP 16-pin TSSOP 20-pin PDIP 20-pin PDIP 20-pin TSSOP 20-pin TSSOP 20-pin SOIC 20-pin SOIC 24-pin QFN 24-pin QFN -40°C to +85°C -40°C to +85°C -40°C to +85°C -40°C to +85°C -40°C to +85°C -40°C to +85°C -40°C to +85°C -40°C to +85°C -40°C to +85°C -40°C to +85°C -40°C to +85°C -40°C to +85°C -40°C to +125°C -40°C to +125°C -40°C to +125°C -40°C to +125°C -40°C to +125°C -40°C to +125°C -40°C to +125°C -40°C to +125°C -40°C to +125°C -40°C to +125°C -40°C to +125°C -40°C to +125°C Learn More: For current information about Freescale products and documentation, please visit www.freescale.com/8bit. Freescale and the Freescale logo are trademarks or registered trademarks of Freescale Semiconductor, Inc. in the U.S. and other countries. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008 Document Number: MC9S08SH84FS REV 1