8-bit Microcontrollers MC9S08LG32 Family MCU with LCD driver up to 5V operation Target Applications • Industrial HVAC system • Electric metering • Home appliance • Medical application • Instrumentation • Personal care devices • Wireless sensor applications • Security systems • Automotive S08LG32 Block Diagram 1 x SPI 2 x 16 KB Dual Flash 1 x I 2C 2 KB RAM 2 x SCI Overview COP 8 KBI 12-bit, 16-ch. ADC 16-bit Timer and PWM, (6+2)-channel, 8-bit MTIM BDM ICE RTC ICS 37 x 8/41 x 4 LCD GPIO S08 CPU 40 MHz 80 LQFP 64 LQFP 48 LQFP The S08LG family of microcontrollers offers enhanced EMI/EMC performance and an advanced LCD driver for value line industrial applications of interest with LCD display needs. Freescale provides an array of advanced LCD driver solutions for diverse industrial Family Differences requirements from electric metering to medical Feature MC9S08LG32 MC9S08LG32 MC9S08LG32 MC9S08LG16 MC9S08LG16 applications. Each device is offered in the Package 80-pin LQFP 64-pin LQFP 48-pin LQFP 64-pin LQFP 48-pin LQFP FLASH 32768 (Dual 16K Arrays) 32768 (Dual 16K Arrays) 32768 (Dual 16K Arrays) 18432 (Dual 16+2K Array) 18432 (Dual 16+2K Array) RAM 1984 bytes 1984 bytes 1984 bytes 1984 bytes 1984 bytes LCD 8 x 37 or 4 x 41 8 x 29 or 4 x 33 8 x 21 or 4 x 25 8 x 29 or 4 x 33 8 x 21 or 4 x 25 ADC 16-ch., 12-bit 12-ch., 12-bit 9-ch., 12-bit 12-ch., 12-bit 9-ch., 12-bit I2C Yes Yes yes Yes Yes temperature range option of -40°C to +85°C for industrial-grade products and -40° to +105°C for automotive-grade products. CodeWarrior™ Development Studio for Microcontrollers V6.2—Complimentary Special Edition • Suite of tools that supports software IRQ Yes Yes yes Yes Yes development for Freescale’s 8-bit and 32-bit KBI 8 pin 8 pin 8 pin 8 pin 8 pin V1 ColdFire® MCU devices. Designers can SCI 2 2 2 2 2 further accelerate application development SPI Yes Yes yes Yes Yes TPM (2+6)-ch. (2+6)-ch. (2+6)-ch. (2+6)-ch. (2+6)-ch. MTIM Yes Yes Yes Yes Yes RTC Yes Yes Yes Yes Yes GPIOs 69 53 39 53 39 with the help of Processor Expert™, an award-winning rapid application development tool integrated into the CodeWarrior tool suite. Complete your enablement solution with cost-effective development tools DEMO9S08LG32—$99 • Full-featured, ready to use demo board system • 80-LQFP silicon soldered Package Options Part Number Package Temp. Range MC9S08LG32CLK 80 LQFP -40°C to +85°C MC9S08LG32CLH 64 LQFP -40°C to +85°C MC9S08LG32CLF 48 LQFP -40°C to +85°C MC9S08LG16CLH 64 LQFP -40°C to +85°C MC9S08LG16CLF 48 LQFP -40°C to +85°C Features Benefits S08 Central Processor Unit (CPU) • Up to 40 MHz HCS08 CPU up to 5V and across a temperature range of -40°C to +85°C • HCS08 instruction set with added BGND instruction • • • • Easy to learn and use Backward object code compatibility with 68HC08 and 68HC05 for reuse of existing libraries Allows for efficient, compact module coding in assembly or C compiler BGND allows user to enter background debug mode that takes advantage of the on-chip in-circuit emulator (ICE) LCD Driver and Internal Charge Pump • Integrated LCD driver supports both standard 3V and 5V LCD glass • Configurable display for 8 x 37 or 4 x 41 segment display • Low-power blinking mode • Support both internal charge pump mode and Rbias mode • Front plane (FP) and black plane (BP) re-assignments • Capable of running in STOP3 and STOP2 mode • LCD driver pins are muxed with GPIO and other functions • Gives you flexibility when selecting the ideal glass for your application with respect to display quality, cost and power • Does not require expensive “chip-on-glass” display • Up to 16 alpha-numeric display (12 segments based), perfect for scrolling text with simple display • Allows high mix of numbers, text and icons • Low-power blinking mode does not require CPU intervention. Blinking mode can be activated and CPU can go to sleep, but segments will remain blinking at the pre-set frequency. Plus, an alternate display feature can be activated to display alternate data (i.e., to blink temperature and time). • Charge Pump Mode can decrease current consumption, and Rbias Mode can save BOM cost as no external capacitors are required • FP and BP can be software selectable, making layout an easier task and very flexible for design changes • Enables driving the display while the CPU sleeps, lowering overall system power consumption • Any LCD pin can be FP (segment) or BP (common), based on software configuration Electro Magnetic Interference (EMI)/Electro Magnetic Compatibility (EMC) • Multiple VDD, VSS pairs for 80- and 64-pin devices • Robust I/O design • Increased immunity to I/O switching noise • Input filters enabled by default On-Chip Memory • Up to 32 KB flash comprised of two separate arrays to facilitate read/program/erase over full operating voltage and temperature • 2V to 5.5V RAM • Allows you to take full advantage of operating voltage and temperature in-application reprogrammability benefits in virtually any environment • Security circuitry prevents unauthorized access to flash and RAM contents can be retained till 2.2V Peripherals • Analog-to-digital converter (ADC)—16-channel, 12-bit resolution; 2.5 μs conversion time; automatic compare function; internal temperature sensor; internal bandgap reference channel; operation in stop mode • Timers— MTIM: simple 8-bit timer with four software-selectable clock sources and a programmable interrupt. • One 2-channel (TPM1); and one 6-channel (TPM2) selectable input capture, output compare, buffered-edge or center-aligned PWM on each channel • Two Serial communications interfaces (SCI)—module offering asynchronous communications,13-bit break option, flexible baud rate generator, double buffered transmit and receive and optional HW parity checking and generation • Serial peripheral interface (SPI)—one module with full-duplex or single-wire bidirectional; double-buffered transmit and receive; master or slave mode; MSB-first or LSB-first shifting • I2C with up to 100 kbps with maximum bus loading; multi-master operation; programmable slave address; interrupt-driven byte-by-byte data transfer; supports broadcast mode and 10-bit addressing • The Real-Time Counter (RTC) module consists of one 8-bit counter, one 8-bit comparator, several binary-based and decimal-based prescaler dividers, three clock sources and one programmable periodic interupt Input/Output • Up to 69 general purpose input/output (GPIO), two output-only pins • Eight keyboard interrupt (KBI) pins with selectable polarity with KBI interrupt • IRQ: External pin for wakeup from low-power modes System Protection • Watchdog computer operating properly (COP) reset with option to run from dedicated 1 kHz internal clock source or bus clock • Low-voltage detection with reset or interrupt; selectable trip points • Illegal op code and illegal address detection with reset • Flash block protection • Having 16 channels allows up to 16 analog devices to be sampled at extremely high speeds • Accuracy and full functionality guaranteed up to 5V operating voltage of the MCU • Two TPMs allow for two different time bases, with a total of 8 timer channels • MTIM can be used as a third timebase to support application timing requirements • Provides standard UART communications peripheral • Allows full-duplex, asynchronous NRZ serial communication between MCU and remote devices • Edge interrupt can wake up MCU from low-power mode • Allows high-speed (up to 5 Mbps) communications to other MCUs or peripherals, such as MC1319x RF transceivers • I2C port enables increased system memory by using an additional I2C EEPROM. This also creates an opportunity to add an additional I2C device. • This module can be used for time-of-day, calendar, or any task scheduling functions. It can also serve as a cyclic wake up from low-power modes without the need for external components. • Results in large number of flexible I/O pins that allow developers to easily interface devices into their own designs • Can be used for reading input from a keypad or used as general pin interrupts • Allows device to recognize runaway code (infinite loops) and resets processor to avoid lock-up states • Warns the developer of voltage drops outside of the typical operating range • Allows the device to recognize erroneous code and resets the processor to avoid lock-up states • Prevents unintentional programming of protected flash memory, which greatly reduces the chance of losing vital system code for vendor applications Development Support • Single-wire background debug interface • Breakpoint capability • ICE debug module containing three comparators and nine trigger modes. Eight deep FIFO for storing change-of-flow addresses and event-only data—debug module supports both tag and force breakpoints. • Allows developers to use the same hardware cables between S08 and V1 ColdFire® platforms • Allows single breakpoint setting during in-circuit debugging (plus three more breakpoints in on-chip debug module) • Provides built-in full emulation without expense of traditional emulator Learn More: 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. 2009 Document Number: MC9S08LG32FS / REV 0 Agile Number: 926-78311 / REV A For current information about Freescale products and documentation, please visit www.freescale.com/mcu.