NXP S08LG Reference guide

Type
Reference guide
HCS08
Microcontrollers
freescale.com
DRM107
Rev. 0
04/2009
Designer Reference Manual
Cluster for Motor Bikes
and Four Wheelers using
MC9S08LG32
Cluster for Motor Bikes and Four Wheelers using MC9S08LG32, Rev. 0
Freescale Semiconductor 3
Cluster for Motor Bikes and Four Wheelers using
MC9S08LG32
Designer Reference Manual
by: Manish Kumar Sharma
Applications and Reference Design Team
Microcontroller Solutions Group, India Design Center
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
Date
Revision
Level
Description
Page
Number(s)
04/2009 0 Initial release. N/A
Revision History
Cluster for Motor Bikes and Four Wheelers using MC9S08LG32, Rev. 0
4 Freescale Semiconductor
Cluster for Motor Bikes and Four Wheelers using MC9S08LG32, Rev. 0
Freescale Semiconductor 5
Contents
Chapter 1
Preface
1.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.2 Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.3 Suggested Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Chapter 2
Introduction
2.1 Intended Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.2 MC9S08LG32 MCU Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.3 Reference Design Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.4 Design Benefits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Chapter 3
Hardware Description
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.2 Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.2.1 LG32 Cluster Reference Design Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.2.1.1 Microcontroller and Peripherals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.2.1.2 Power Supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.2.1.3 LG32 Cluster Reference Design Board Connectors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.2.1.4 Memory Map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.2.2 LG32 Cluster Reference Design Interface Board. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.3 Cluster Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Chapter 4
Embedded Software Description
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4.2 Embedded Software Flow Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4.3 Embedded Software Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.3.1 Speedometer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.3.2 Tachometer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.3.3 Odometer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.3.4 Clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.3.5 Temperature. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.3.6 Fuel Gauge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.3.7 Battery Power. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.3.8 Kilometer Left. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.3.9 Mileage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.3.10 HVAC Controls. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Cluster for Motor Bikes and Four Wheelers using MC9S08LG32
6 Freescale Semiconductor
4.3.11 Miscellaneous Indications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.3.12 Touch Sensor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Chapter 5
Development, Debugging, and Testing of the Embedded Software
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.2 Application Reprogramming. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Appendix A
Bill of Material (BOM)
Appendix B
Schematics
B.1 LG32 Cluster Reference Design Board Schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
B.2 LG32 Cluster Reference Design Interface Board Schematic. . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Appendix C
MC9S08LG32 Pin Connections on Cluster Reference Design Board
Appendix D
Digital Sensor Simulation on the Interface Board
D.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
D.2 Simulation Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Appendix E
LCD Glass Data Sheet
Appendix F
Enabling Touch Sensor Application
F.1 Hardware Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
F.2 Software Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Cluster for Motor Bikes and Four Wheelers using MC9S08LG32, Rev. 0
Freescale Semiconductor 7
Figures
Figure 3-1 Cluster for Motor Bikes and Four Wheelers Block Diagram . . . . . . . . . . . . . . . . . . . . . . . 14
Figure 3-2 LG32 Cluster Reference Design Board. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Figure 3-3 LG32 Cluster Reference Design Board Layout Top Layer . . . . . . . . . . . . . . . . . . . . . . . . 15
Figure 3-4 LG32 Cluster Reference Design Board Layout Bottom Layer . . . . . . . . . . . . . . . . . . . . . 16
Figure 3-5 Power Supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Figure 3-6 LG32 Cluster Reference Design Interface Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Figure 3-7 LG32 Cluster Reference Design Interface Board Layout Top Layer. . . . . . . . . . . . . . . . . 20
Figure 3-8 LG32 Cluster Reference Design Interface Board Layout Bottom Layer . . . . . . . . . . . . . . 20
Figure 4-1 System Level Main Loop Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Figure 4-2 Control Switches Press Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Figure 4-3 SW1 and SW2 Switches Press Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Figure 5-1 Host PC to LG32 Cluster Reference Design Board via. PEMicro USB to BDM . . . . . . . . 29
Figure 5-2 BDM Connector. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Figure B-1 LG32 Cluster Reference Design Board Schematic Page 1 . . . . . . . . . . . . . . . . . . . . . . . 34
Figure B-2 LG32 Cluster Reference Design Board Schematic Page 2 . . . . . . . . . . . . . . . . . . . . . . . 35
Figure B-3 LG32 Cluster Reference Design Interface Board Schematic . . . . . . . . . . . . . . . . . . . . . . 36
Figure 5-3 PWM Output and Analog Input Graphs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Figure E-1 LCD Glass Data Sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Figure F-1 LG32 Cluster Reference Design Interface Board with Touch Pad Positions . . . . . . . . . . 43
Cluster for Motor Bikes and Four Wheelers using MC9S08LG32, Rev. 0
Freescale Semiconductor 8
Tables
Table 3-1 Power Connector (J1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Table 3-2 BDM Connector (J2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Table 3-3 Signal Input Connector (J3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Table 3-4 Module Statistic. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Table A-1 LG32 Cluster Reference Design Board BOM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Table A-2 LG32 Cluster Reference Design Interface Board BOM . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Table C-1 MC9S08LG32 Pin Connections on Cluster Reference Design Board . . . . . . . . . . . . . . . 37
Cluster for Motor Bikes and Four Wheelers using MC9S08LG32, Rev. 0
Freescale Semiconductor 9
Chapter 1
Preface
1.1 General
This designer reference manual provides all guidelines and considerations used in the development of
the cluster for motor bikes and four wheelers reference design. It contains descriptions of the hardware
and the application-specific software developed for creating the system.
1.2 Audience
This document is intended for application developers who wish to learn how to set up the cluster for motor
bikes and four wheelers reference design, as well as those who wish to use a specific part of this
reference design and append it to their own application.
1.3 Suggested Reading
MC9S08LG32 Reference Manual (document number MC9S08LG32RM)
MC9S08LG32 Data Sheet (document number MC9S08LG32)
MC9S08QD2 Data Sheet (document number MC9S08QD2)
MPR084 Data Sheet (document number MPR084)
VID29-05 Data Sheet (document number VID29-05)
74ACT125 Data Sheet (document number 74ACT125)
Application note titled Interfacing an LCD with MC9S08LG32 (document AN3802)
Application note titled Interfacing Stepper Motor with MC9S08LG32 (document AN3817)
Application note titled How To Handle Dual Flash Architecture In MC9S08LG32 (document
AN3821)
Application note titled Emulated EEPROM Implementation in Dual Flash Architecture on
MC9S08LG32 (document AN3822)
Application note titled The LCD Driver for MC9S08LG32 (document AN3823)
Application note titled The EEPROM Emulation Driver for MC9S08LG32 (document AN3824)
Application note titled Stepper Motor Motion Control Driver for MC9S08LG32 (document AN3828)
Additional documentation may be found at http://www.freescale.com.
Preface
Cluster for Motor Bikes and Four Wheelers using MC9S08LG32, Rev. 0
10 Freescale Semiconductor
Cluster for Motor Bikes and Four Wheelers
Cluster for Motor Bikes and Four Wheelers using MC9S08LG32, Rev. 0
Freescale Semiconductor 11
Chapter 2
Introduction
2.1 Intended Functionality
This manual describes the reference design of a cluster board using MC9S08LG32. This design is an
integrated solution for real world cluster applications like two wheelers, low-end four wheelers, and the
industrial market. It provides an example of the speedometer, odometer, tachometer, fuel gauge
functionality, and various indicators like left and right turn, check oil, side stand, fog light, head light high
beam along with AC flow control indicators found in vehicle dash board applications. This design
demonstrates the application of the LCD glass display and stepper motor together by using MC9S08LG32
microcontroller unit (MCU).
2.2 MC9S08LG32 MCU Features
Up to 40 MHz high-performance HCS08 CPU core
Up to 32 KB on-chip dual flash
Up to 2 KB on-chip RAM
8-bit modulo timer (MTIM) with configurable clock inputs
Up to 16-channel 12-bit resolution successive approximation analog-to-digital converter (ADC)
One internal clock source (ICS): precision trimming of internal reference allows 0.2% resolution
and 2% deviation over temperature and voltage
Two serial communication interface (SCI) modules
One serial peripheral interface (SPI) module
One inter-integrated circuit (I2C) module
LCD driver, configurable up to 8 × 37 or 4 × 41. Active in lowest power mode. All LCD pins are
multiplexed with GPIOs
One 2-channel and one 6-channel timer/pulse-width modulator (TPM)
Real-time background debug mode (BDM) with ICE
Up to 69 standard GPIOs
Eight keyboard (KBI) and one IRQ interrupt with selectable polarity
8-bit real time counter (RTC) with low-power operation and wakeup
Two temperate range options: –40 °C to +85 °C and –40 °C to +105 °C
Available in 48 LQFP, 64 LQFP, and 80 LQFP packages
2.3 Reference Design Features
Speedometer
Odometer
–Trip A
–Trip B
Digital clock
Engine temperature
Introduction
Cluster for Motor Bikes and Four Wheelers using MC9S08LG32, Rev. 0
12 Freescale Semiconductor
Check oil indicator
Fuel gauge
Battery power
Mileage calculation
Kilometer left application
Fan ON\OFF
Heating, ventilating, and air conditioning (HVAC) control indications
Tachometer indication through stepper motor
Buzzer for generation of audio
2 key switch
For selecting different options
For programming the clock parameters
System diagnostic at power up
6 LEDs for different feature indications
Fog light
Head light
–Side stand
Neutral gear
Left turn
Right turn
2.4 Design Benefits
The cluster uses a modular concept. The main board with the microcontroller is able to perform the entire
cluster and display functionality. The interface board simulates various input signals to drive the main
board for vehicle cluster dash board.
In addition, this reference design can be used as a hardware platform for software development. For this
purpose, the board is equipped with an interface for reprogramming, and the MCU is programmed with
the 6-pin single-wire BDM interface for MC9S08 devices. This tool allows the MCU memory to be
reprogrammed in-circuit, using the standard 6-pin BDM connector.
The module is designed to be housed in a standard 9 × 5-inch case.
The cluster for motor bikes and four wheelers demo kit is distributed with the following components:
Cluster demo module
CD-ROM
12-V power supply
Cluster for Motor Bikes and Four Wheelers using MC9S08LG32, Rev. 0
Freescale Semiconductor 13
Chapter 3
Hardware Description
3.1 Introduction
The reference design is based on the MC9S08LG32 high-performance MCU for LCD display and current
driver ICs 74125 that are analog products driven from the MCU and controlling one VID 29-05, the
2-phase instrumentation stepper motor.
NOTE
MC9S08LG32 cluster reference design is based on LG32_AH_V10_0409
hardware version.
3.2 Architecture
The cluster for motor bikes and four wheelers is an integrated system designed to demonstrate the
performance of the Freescale MC9S08LG32 device. This design uses a modular concept and consists of
the following:
LG32 Cluster Reference Design Board — This contains the MC9S08LG32 MCU, VID29-05
stepper motor, LCD glass (28 × 4), LEDs, switches (SW1, SW2), and 20-pin connector.
LG32 Cluster Reference Design Interface Board — This contains MC9S08QD2, potentiometers,
and switches to simulate various analog and digital sensors.
Figure 3-1 provides the module block diagram.
Hardware Description
Cluster for Motor Bikes and Four Wheelers using MC9S08LG32, Rev. 0
14 Freescale Semiconductor
Figure 3-1. Cluster for Motor Bikes and Four Wheelers Block Diagram
This design consists of two layer printed circuit boards (PCBs) for the LG32 cluster reference design and
interface boards For schematics, refer to
Appendix B, “Schematics.”
The gerber for both the boards is distributed with the MC9S08LG32 Reference Design CD. Cadence SPB
16.01 Design Entry CIS is used for schematic design. The Cadence PCB editor tool is used for layout
design and gerber generation.
3.2.1 LG32 Cluster Reference Design Board
This board consists of the MC9S08LG32 MCU for controlling various peripherals and the power supply.
Figure 3-2, Figure 3-3, and Figure 3-4 provides the layouts of LG32 cluster reference design board, top
layer, and bottom layer.
Architecture
Cluster for Motor Bikes and Four Wheelers using MC9S08LG32, Rev. 0
Freescale Semiconductor 15
Figure 3-2. LG32 Cluster Reference Design Board
Figure 3-3. LG32 Cluster Reference Design Board Layout Top Layer
20-pin connector for sensor inputs
6-pin BDM
Buzzer
Stepper
Motor
12-V Input
SW2
SW1
MC9S08LG32 MCU
LCD Glass
28 × 4
LED
Indicators
Hardware Description
Cluster for Motor Bikes and Four Wheelers using MC9S08LG32, Rev. 0
16 Freescale Semiconductor
Figure 3-4. LG32 Cluster Reference Design Board Layout Bottom Layer
3.2.1.1 Microcontroller and Peripherals
The Freescale 8-bit MC9S08LG32 high-performance microcontroller unit (MCU) controls the entire
application and is the heart of the main board. The MCU (U1) uses enhanced central processor unit and
embedded peripheral modules.
The application occupies the following peripheral modules:
One 16-bit timer/PWM interface module (TPM2), 2 channels in the input capture mode and 1
channel in PWM mode
One 16-bit timer/PWM interface module (TPM1) in the PWM mode
Liquid crystal display driver (LCD)
General-purpose input/output pins (I/O)
Keyboard interrupts (KBI)
12-bit successive approximation analog-to-digital converter (ADC)
For pin muxing of MC9S08LG32 80-pin LQFP and its use in this design, refer to Appendix C,
“MC9S08LG32 Pin Connections on Cluster Reference Design Board.”
The MCU uses one channel (ADC4) of the ADC to perform fuel-level sensing, one channel (ADC5) for
temperature sensing, and one channel (ADC11) for gear-number sensing. The resolution of the ADC is
12 bits. The ADC measures the corresponding voltage provided at its channel input through the header
(J3).
The MCU can drive a maximum of 41 front planes and 4 back planes of an LCD display. The application
uses an LCD display with 28 front planes and 4 back planes. Because of the 4 back planes, a 1/4 duty of
the output waveform is set. When the LCD driver is enabled, the back plane waveforms for the selected
duty are driven out through the back plane pins. The back plane waveforms are periodic. The speed in
km/h, odometer, trip A, and trip B data in km, mileage in kmpl, time in hour and minute, HVAC indicators,
fuel levels, check oil, service mode, temperature, engine hot/cold, battery level, etc. are displayed on the
32-pin LCD glass (U5).
The MCU uses one channel of TPM (TPM2CH3) for speed input and one channel of TPM (TPM2CH5)
for rpm input in input capture mode and one channel of TPM (TPM2CH0) in edge-aligned PWM mode to
drive the piezoelectric buzzer for left/right turn audio indication through one channel of 74AC125 tri-state
quad buffer.
Architecture
Cluster for Motor Bikes and Four Wheelers using MC9S08LG32, Rev. 0
Freescale Semiconductor 17
For speed and rpm sensor inputs, the appropriate pulse shaping circuit has been added.
For the stepper motor application, the MCU drives the stepper motor through a 74AC125 Tri-stated Quad
Buffer driver using two channels of TPM (TPM1CH0 and TPM1CH1) in edge-aligned PWM mode along
with two GPIOs (PTA4 and PTA5).
The KBI provides eight independently maskable external interrupts. The KBI pins are shared with
standard I/O pins. The application uses all eight of them:
KBI7 for SW1
KBI1 for SW2
KBI2 for left turn input
KBI0 for right turn input
KBI3 for fog light input
KBI4 for head light input
KBI5 for touch sensor input
KBI6 for side stand input
The MCU drives the following GPIOs for LED indicators through two 74AC125 ICs:
PTC4 for head light indication red LED
PTA0 for side stand indication red LED
PTA2 for fog light indication red LED
PTA1 for neutral gear indication green LED
PTG2 for right turn indication green LED
PTG3 for left turn indication green LED
The MCU also controls the backlighting control of the cluster through one of its GPIO PTB0 and monitors
the check oil at PTB1.
The MCU is interfaced to a touch sensor on the interface board using I2C interface. The pin PTB1 is
connected to the
ATTN pin of touch sensor, MPR084, for the MCU to establish connection. For more
details on touch sensor application, refer to
Appendix F, “Enabling Touch Sensor Application.”
The standard 6-pin BDM interface along with USB to BDM wiggler is used to communicate with the PC
for reprogramming and debugging the application.
The emulated EEPROM is used to store the trip and odometer data.
3.2.1.2 Power Supply
The cluster is turned on from the 12-V DC. A simple linear voltage regulator 33269DT-5 is used to provide
a 5-V power supply for the cluster devices.
The schematic of the power supply can be seen in Figure 3-5.
Figure 3-5. Power Supply
Hardware Description
Cluster for Motor Bikes and Four Wheelers using MC9S08LG32, Rev. 0
18 Freescale Semiconductor
It is necessary to save odometer and trip meter data if the power supply from the battery is switched off.
The resistor dividers, R1 and R2, monitor the battery power supply and generate an interrupt signal in
case a power off occurs. The capacitors C5, C6, and C9 hold a voltage long enough for the microcontroller
to perform an interrupt service routine to save the data. C9 can be replaced by a higher value for better
discharge time.
3.2.1.3 LG32 Cluster Reference Design Board Connectors
Table 3-1, Table 3-2, and Table 3-3 describe the cluster board connector pin assignments and their
description.
Table 3-1. Power Connector (J1)
Pin Function Description
1 VCC Supply 12 V supply I/P
2 GND Power ground
3 GND Power ground
Table 3-2. BDM Connector (J2)
Pin Name Description
1 BKGD Single wire BDM signal
2 GND MCU ground
3 NC Not connected
4 RESET Reset In and Out from MCU
5 NC Not connected
6 VDD MCU supply
Table 3-3. Signal Input Connector (J3)
Pin Function Description
1 ADC5 For temperature IP
2 ADC4 For fuel IP
3 ADC11 For gear IP
4 KBI0 Right turn IP
5 KBI5 Touch sensor IP
6 KBI2 Left turn IP
7 T2CH3 For speed IP
8 KBI4 For head light IP
9 KBI6 For side stand IP
10 PTI3 SDA
11 T2CH5 For rpm IP
12 PTI0 Check oil IP
13 KBI3 For fog light IP
14 PTI1 TX2
15 PTB1 GPIO
16 PTF4 SCL
Architecture
Cluster for Motor Bikes and Four Wheelers using MC9S08LG32, Rev. 0
Freescale Semiconductor 19
3.2.1.4 Memory Map
Table 3-4 shows the organization of cluster reference design software in various files for all tasks and
drivers. It also shows the RAM (data) and the flash (code) area occupancy in bytes for running the
software.
17 GND Power ground
18 NC Not connected
19 VDD 5 V
20 NC Not connected
Table 3-4. Module Statistic
Name Data Code Const
main.c 0 243 0
MC9S08LG32.c 228 0 0
Start08.c 0 132 0
RTSHC08.c (ansifs.lib) 0 3828 0
ref_design.c 60 2591 12
stepper_int.c 0 1308 0
stepper_data.c 9 0 864
stepper_driver.c 0 942 2
lcd_functions.c 0 1344 0
lcd.c 6 1375 224
EED_Para.asm 34 0 0
FlashErase.asm 0 46 0
FlashInit.asm 0 33 0
FlashProgram.asm 0 57 0
HighVoltage.asm 0 30 0
DataVerify.asm 0 67 0
EED_HighLevel.asm 0 852 0
EED_MidLevel.asm 0 811 0
eeprom_wrapper.c 0 57 0
touch_sensor.c 3 638 0
Other 112 12 2
Total 452 14366 1104
Table 3-3. Signal Input Connector (J3) (continued)
Pin Function Description
Hardware Description
Cluster for Motor Bikes and Four Wheelers using MC9S08LG32, Rev. 0
20 Freescale Semiconductor
3.2.2 LG32 Cluster Reference Design Interface Board
This board consists of the MC9S08QD2 MCU for simulating speed and rpm sensors, potentiometer, and
switches for simulating other analog and digital sensors.
Figure 3-6, Figure 3-7, and Figure 3-8 provides
the layouts of LG32 cluster reference design interface board, top layer, and bottom layer.
Figure 3-6. LG32 Cluster Reference Design Interface Board
Figure 3-7. LG32 Cluster Reference Design Interface Board Layout Top Layer
Figure 3-8. LG32 Cluster Reference Design Interface Board Layout Bottom Layer
The interface board simulates various analog and digital sensor inputs to the main board. The interface
board consists of a MC9S08QD2 MCU that accepts varying analog input through the potentiometers and
generates two PWM signals at its output. The frequency of these PWM signals depends on the ADC input
through the potentiometer and these PWM signals work as speed and rpm input to the reference design
board. Three additional potentiometers are directly connected to the reference design board to simulate
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23
  • Page 24 24
  • Page 25 25
  • Page 26 26
  • Page 27 27
  • Page 28 28
  • Page 29 29
  • Page 30 30
  • Page 31 31
  • Page 32 32
  • Page 33 33
  • Page 34 34
  • Page 35 35
  • Page 36 36
  • Page 37 37
  • Page 38 38
  • Page 39 39
  • Page 40 40
  • Page 41 41
  • Page 42 42

NXP S08LG Reference guide

Type
Reference guide

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI