Home >Documents >DRM084, Cluster (Dashboard) Using S12HZ256 as a cache. Cluster (Dashboard) Using S12HZ256 as a...

DRM084, Cluster (Dashboard) Using S12HZ256 as a cache. Cluster (Dashboard) Using S12HZ256 as a...

Date post:08-Mar-2018
Category:
View:213 times
Download:1 times
Share this document with a friend
Transcript:
  • HCS12Microcontrollers

    freescale.com

    Cluster (Dashboard) Using S12HZ256 as a Single-Chip SolutionDesigner Reference Manual

    DRM084Rev. 010/2006

  • Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc.This product incorporates SuperFlash technology licensed from SST.

    Freescale Semiconductor, Inc., 2006. All rights reserved.

    Cluster (Dashboard) Using S12HZ256 as a Single-Chip SolutionDesigner Reference Manual

    by: Kenny Lam8/16-Bit Applications Engineering, APTSPGFreescale Semiconductor, Inc.

    To provide the most up-to-date information, the revision of our documents on the World Wide Web will be the most current. Your printed copy may be an earlier revision. To verify that you have the latest information available, refer to:

    http://www.freescale.com

    The following revision history table summarizes changes contained in this document. For your convenience, the page number designators have been linked to the appropriate location.

    Revision History

    DateRevision

    LevelDescription

    PageNumber(s)

    October,2006

    0 Initial release N/A

    Cluster (Dashboard) Using S12HZ256 as a Single-Chip Solution Designer Reference Manual, Rev. 0

    Freescale Semiconductor 3

    http://www.freescale.com

  • Revision History

    Cluster (Dashboard) Using S12HZ256 as a Single-Chip Solution Designer Reference Manual, Rev. 0

    4 Freescale Semiconductor

  • Table of Contents

    Chapter 1 Introduction

    1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71.2 System Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

    Chapter 2 Benefits and Features of the 9S12HZ256 Controller

    2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92.2 Basic Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92.3 Modes of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.3.1 User Modes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.3.2 Low-Power Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

    Chapter 3 Stepper Motor Drive Theory

    3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133.2 Stepper Motor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133.3 Stepper Motor Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143.4 Stepper Motor Micro-Stepping Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173.5 Stepper Stall Detection (SSD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193.6 LCD Driver for LCD Display Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213.7 LCD2 Panel Initialization and Checking. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223.8 LCD2 Panel Firmware (API) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

    Chapter 4 Software Integration

    4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254.2 Micro-Stepping Control Using Internal Timer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254.3 Motor Running and LCD2 Panel Display Demonstration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274.4 Cluster System Demonstration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

    Chapter 5 Hardware Schematics

    Chapter 6 Bill of Materials

    Cluster (Dashboard) Using S12HZ256 as a Single-Chip Solution Designer Reference Manual, Rev. 0

    Freescale Semiconductor 5

  • Table of Contents

    Cluster (Dashboard) Using S12HZ256 as a Single-Chip Solution Designer Reference Manual, Rev. 0

    6 Freescale Semiconductor

  • Chapter 1 Introduction

    1.1 Introduction

    This manual describes the design of a cluster board (dashboard) using Freescales S12HZ256 microcontroller unit (MCU). This is a single-chip design for the whole system.

    The traditional cluster board uses a cross coil motor to drive the analog pointers (actuator) which move either clockwise or counterclockwise to indicate the car speed, engine rotation speed, fuel level, engine temperature, etc. This technology is well established and widely used throughout the world. However, when the cross coil motor is being assembled, it requires an alignment process. The cross coil motor displacement linearity is also a drawback in regards to the displacement accuracy (linearity), as it may need motor fine tuning during cluster board manufacturing. In view of this, stepper motors can be one alterative solution in this application. In addition, the Moving Magnet Technology (MMT) is more mature for stepper motors nowadays.

    The following are some advantages in having the magnet of a stepper motor move relative to a stationary coil set.

    1. The stationary drive coils are beneficial to a motor structure, as they can deal effectively with heat dissipation.

    2. There are no flying leads since the coils are stationary which leads to improved longevity of the motor.

    3. The weight of the stationary coils does not affect the maximum velocity of the motor. 4. There is no frictional wear out because the moving magnet concept does not make contact with

    any of the stationary elements of motor.

    For cluster applications in the automotive segment, Freescale offers the S12H family of devices which can support up to six stepper motors. These devices also include, as a single-chip solution, a 32 x 4 segment LCD driver to show time and mileage updates on a LCD panel. The designers have also integrated Stepper Stall Detection (SSD) in the new derivative of the S12HZ family. This derivative supports up to four stepper motors with SSD.

    This manual is based on the 9S12HZ256 features for designing a cluster application.

    NOTEThis document is written for the user who is familiar with the S12H256 family and CodeWarrior for S12 and cluster applications. All hardware schematic diagrams and firmware source codes are available as reference materials.

    Cluster (Dashboard) Using S12HZ256 as a Single-Chip Solution Designer Reference Manual, Rev. 0

    Freescale Semiconductor 7

  • Introduction

    1.2 System Overview

    Figure 1-1 provides a pictorial overview of the system.

    Figure 1-1. S12HZ256 Dashboard System

    Vehicle Speed

    CAN Physical Interface

    PWMGaugeDrivers

    LED

    CAN

    5V Vcc

    PWM

    InputSignalCondn(as reqd)

    LM2902MC33174MC33184TL064

    Engine RPM

    Engine Temp.

    Batt. Voltage

    Fuel Level

    I/C0

    I/C1

    ADC5

    ADC4

    ADC3

    ADC2

    Vreg*Vreg*

    I / O

    LCDDRIVER

    MC9S12Hx16 Bit MCU Integrated LCD Driver

    32x4 (112 QFP package) Integrated Drive for 4 Stepper Motors

    With Motor Stall Detection (MSD)(16 hi-current PWM outputs)

    Easier PCB Routing

    Fewer Components

    Higher Reliability

    Cost Effective

    Keys

    RS232SCI

    Cluster (Dashboard) Using S12HZ256 as a Single-Chip Solution Designer Reference Manual, Rev. 0

    8 Freescale Semiconductor

  • Chapter 2 Benefits and Features of the 9S12HZ256 Controller

    2.1 Introduction

    As shown in this chapter, the S12HZ family of devices offers an excellent complement of peripherals and a broad range of memory and packages.

    2.2 Basic FeaturesSome of the S12HZ family benefits are shown below. Features have been broken down by type for your convenience.

    HCS12 Core:

    16-bit HCS12 CPU Upward compatible with M68HC11 instruction set Interrupt stacking and programmers model identical to M68HC11 20-bit ALU Instruction queue Enhanced indexed addressing

    Multiplexed external bus interface (MEBI)

    Module mapping control (MMC)

    Interrupt control (INT)

    Debugger and breakpoints (DBG)

    Background debug mode (BDM)

    Memory:

    256K, 128K, 64K Flash EEPROM

    2K, 1K byte EEPROM

    12K, 6K, 4K byte RAM

    CRG:

    Low current oscillator

    Phase locked loop (PLL)

    Reset, clocks

    Computer operating properly (COP) watchdog

    Real time interrupt

    Clock monitor

    Cluster (Dashboard) Using S12HZ256 as a Single-Chip Solution Designer Reference Manual, Rev. 0

    Freescale Semiconductor 9

  • Benefits and Features of the 9S12HZ256 Controller

    Analog-to-digital converter (ADC):

    16 channels, 10-bit resolution

    External conversion trigger capability

    Two 1M bit per second, CAN 2.0 A, B software compatible modules:

    Five receive and three transmit buffers

    Flexible identifier filter programmable as 2 x 32 bit, 4 x 16 bit, or 8 x 8 bit

    Four separate interrupt channels for Rx, Tx, error, and wake-up

    Low-pass filter wake-up function

    Loop-back for self test operation

    Timer:

    16-bit main counter w

Click here to load reader

Embed Size (px)
Recommended