background image

Document Number: 

AN3280

Rev. 0
07/2006

How to Reach Us:

Home Page:

www.freescale.com

E-mail:

[email protected]

USA/Europe or Locations Not Listed:

Freescale Semiconductor
Technical Information Center, CH370
1300 N. Alma School Road
Chandler, Arizona 85224
+1-800-521-6274 or +1-480-768-2130
[email protected]

Europe, Middle East, and Africa:

Freescale Halbleiter Deutschland GmbH
Technical Information Center
Schatzbogen 7
81829 Muenchen, Germany
+44 1296 380 456 (English)
+46 8 52200080 (English)
+49 89 92103 559 (German)
+33 1 69 35 48 48 (French)
[email protected]

Japan:

Freescale Semiconductor Japan Ltd.
Headquarters
ARCO Tower 15F
1-8-1, Shimo-Meguro, Meguro-ku,
Tokyo 153-0064
Japan
0120 191014 or +81 3 5437 9125
[email protected]

Asia/Pacific:

Freescale Semiconductor Hong Kong Ltd.
Technical Information Center
2 Dai King Street
Tai Po Industrial Estate
Tai Po, N.T., Hong Kong
+800 2666 8080
[email protected]

For Literature Requests Only:

Freescale Semiconductor Literature Distribution Center
P.O. Box 5405
Denver, Colorado 80217
1-800-441-2447 or 303-675-2140
Fax: 303-675-2150
[email protected]

Information in this document is provided solely to enable system and software 
implementers to use Freescale Semiconductor products. There are no express or 
implied copyright licenses granted hereunder to design or fabricate any integrated 
circuits or integrated circuits based on the information in this document.

Freescale Semiconductor reserves the right to make changes without further notice to 
any products herein. Freescale Semiconductor makes no warranty, representation or 
guarantee regarding the suitability of its products for any particular purpose, nor does 
Freescale Semiconductor assume any liability arising out of the application or use of any 
product or circuit, and specifically disclaims any and all liability, including without 
limitation consequential or incidental damages. “Typical” parameters that may be 
provided in Freescale Semiconductor data sheets and/or specifications can and do vary 
in different applications and actual performance may vary over time. All operating 
parameters, including “Typicals”, must be validated for each customer application by 
customer’s technical experts. Freescale Semiconductor does not convey any license 
under its patent rights nor the rights of others. Freescale Semiconductor products are 
not designed, intended, or authorized for use as components in systems intended for 
surgical implant into the body, or other applications intended to support or sustain life, 
or for any other application in which the failure of the Freescale Semiconductor product 
could create a situation where personal injury or death may occur. Should Buyer 
purchase or use Freescale Semiconductor products for any such unintended or 
unauthorized application, Buyer shall indemnify and hold Freescale Semiconductor and 
its officers, employees, subsidiaries, affiliates, and distributors harmless against all 
claims, costs, damages, and expenses, and reasonable attorney fees arising out of, 
directly or indirectly, any claim of personal injury or death associated with such 
unintended or unauthorized use, even if such claim alleges that Freescale 
Semiconductor was negligent regarding the design or manufacture of the part. 

Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. 
All other product or service names are the property of their respective owners.

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

RoHS-compliant and/or Pb-free versions of Freescale products have the functionality 
and electrical characteristics as their non-RoHS-compliant and/or non-Pb-free 
counterparts. For further information, see 

http://www.freescale.com

 or contact your 

Freescale sales representative.

For information on Freescale’s Environmental Products program, go to 

http://www.freescale.com/epp

.

Summary of Contents for MC9S08LC60

Page 1: ...8LC60 enters stop3 sleep mode Figure 1 provides a block diagram of the MC9S08LC60 In addition to the built in LCD driver the MC9S08LC60 has notable peripherals such as a 12 bit ADC and dual Flash arrays for EEPROM emulation as shown in the block diagram 1 MC9S08LC60 Introduction 1 1 1 Type of LCD Glass Compatible with MC9S08LC60 2 1 2 Number of Segments and Using Segments in LCD 3 1 3 LCD Glass Sp...

Page 2: ...and a quickstart for the demo All code for the demo is provided in the file AN3280SW1 zip which can be found on the Freescale web page freescale com 1 1 Type of LCD Glass Compatible with MC9S08LC60 Two common LCD types are TN twisted nematics and STN super twisted nematics TN type LCD glass is very cost effective and is compatible with multiplexing LCD drivers using fewer than 16 backplanes The mu...

Page 3: ...e relevant 1 2 Number of Segments and Using Segments in LCD Depending on package and LCD configuration the MC9S08LC60 can support up to 160 segments The number of segments is equal to the number of backplanes times the number of frontplanes With multiplex LCD drivers like the MC9S08LC60 each frontplane pin can be connected to as many segments as there are backplanes With up to 160 segments the MC9...

Page 4: ...erating temperature Varies 2 LCD Module Overview 2 1 LCD Module Power Supply Configuration The LCD module provides several configurations for its power supply The LCD module can be powered via VDD or alternatively by an external LCD power supply connected to the VLCD pin the VLCD voltage range is 1 4 to 1 8 V The LCD module power supply configuration is determined by the VSUPPLY 1 0 bit field A bl...

Page 5: ...h the LCD module voltage supply switch VSUPPLY 1 0 configured to generate VLL2 from VDD 2 1 2 Configuration Options for 5 V LCD Glass When driving 5 V LCD glass the following configurations are available Power LCD module via VLCD where VLCD is nominally 1 67 volts with the LCD module configured for tripler mode Power the LCD module via VDD where VDD is nominally 3 3 volts with the LCD module volta...

Page 6: ...ctionality is available in stop3 mode The LCDDRMS bit in the LCDCMD register is used in conjunction with the LCDRAM registers to provide blinking control for individual segments If the LCDDRMS bit is cleared the LCDRAM registers control the display on off state for segments on the LCD display If LCDDRMS bit is set the LCDRAM registers control the blink enable on off state for the corresponding seg...

Page 7: ...B to detail the requirements for interfacing an LCD glass to the MC9S08LC60 Figure 4 shows the top layer silk screen of the DEMO9S08LC60 with the LCD glass panel The LCD glass panel is shown with all LCD segments turned on This section will review the LCD glass design in detail and discuss the interfacing of the LCD module to the LCD glass via hardware and software Figure 4 DEMO9S08LC60 ...

Page 8: ...groups are labeled 1 to 9 starting from the leftmost character position The LCD panel is manufactured by S Tek Displays part number GD3980P Figure 5 Custom LCD from S Tek Displays The LCD panel s segment layout is not the only important aspect of its design Other LCD glass specifications such as those mentioned in Section 1 1 also dictate how the LCD glass must be driven by an LCD driver for optim...

Page 9: ... LCD to the MC9S08LC60 Rev 0 Freescale Semiconductor 9 Figure 6 shows all 160 segments labeled individually This information is provided by the LCD manufacturer See the appendix for the full GD3980P specification for S Tek Displays Figure 6 Segment Labels ...

Page 10: ... DT9 V1 3 COM3 25 V2 AM PM OM 4 COM4 26 KWh Amps Volts Program 5 1H 1F 1E 1N 27 VOL V3 V4 V5 6 1A 1J 1G 1M 28 T4 T3 T2 T1 7 1K 1L 1D TIME 29 6B 6C DT6 T 8 1B 1C DT1 DT 30 6K 6L 6D K3 9 2H 2F 2E 2N 31 6A 6J 6G 6M 10 2A 2J 2G 2M 32 6H 6F 6E 6N 11 2K 2L 2D DATE 33 5B 5C COL2 DT5 12 2B 2C COL1 DT2 34 5K 5L 5D VOLUME 13 7H 7F 7E 7N 35 5L 5J 5G 5M 14 7A 7J 7G 7M 36 5H 5F 5E 5N 15 7K 7L 7D P 37 4B 4C DT4...

Page 11: ...play segments and the MCU LCD RAM registers can be established The mapping is determined by both the MCU to LCD pin connections Figure 7 and the LCD pin out specification Table 3 Each bit in the MCU RAM registers is mapped to an individual segment on the LCD glass Table 4 shows the MCU LCD RAM registers where the individual bits are labelled FPxBPy Figure 7 shows both the BPy and the FPx relations...

Page 12: ...2 FP2BP1 FP2BP0 0x184A LCDRAM2 FP5BP3 FP5BP2 FP5BP1 FP5BP0 FP4BP3 FP4BP2 FP4BP1 FP4BP0 0x184B LCDRAM3 FP7BP3 FP7BP2 FP7BP1 FP7BP0 FP6BP3 FP6BP2 FP6BP1 FP6BP0 0x184C LCDRAM4 FP9BP3 FP9BP2 FP9BP1 FP9BP0 FP8BP3 FP8BP2 FP8BP1 FP8BP0 0x184D LCDRAM5 FP11BP3 FP11BP2 FP11BP1 FP11BP0 FP10BP3 FP10BP2 FP10BP1 FP10BP0 0x184E LCDRAM6 FP13BP3 FP13BP2 FP13BP1 FP13BP0 FP12BP3 FP12BP2 FP12BP1 FP12BP0 0x184F LCDRAM...

Page 13: ...6 the leftmost 13 segment display group is the first position With a 13 segment display layout each alphanumeric character will require 13 bits of MCU LCD RAM Figure 8 GP3980P Custom 13 Segment Display Layout Pattern 3 3 2 Alphanumeric Segment Group MCU LCD RAM Mapping This section gives an example of the mapping of an alphanumeric segment group for the leftmost 13 segment display position 1 on th...

Page 14: ...h the 13 segment display For these locations the bit value is irrelevant In this case for alphanumeric characters in character position 1 these are the bits for the labels TIME DT and DT1 Table 6 provides a more detailed tabular form of the decoding from MCU pins to LCD segments Table 5 LCD RAM Values for the Leftmost GD3890P Alphanumeric Character to Display an M LCDRAM0 FP1BP3 1M FP1BP2 1G FP1BP...

Page 15: ...sed for alphanumeric groups LCDRAM20 is not used at all because FP40 is not used in 1 4 duty mode In 1 4 duty mode the multiplexed BP3 FP40 pin is configured as BP3 Table 6 Detailed Alphanumeric Segment Mapping MCU Pin Function MCU Pin in 80 Pin Package MCU Pin in 64 Pin Package LCD Pin LCD Segment MCU LCD RAM Bit COM1 BP0 COM2 BP1 COM3 BP2 COM4 BP3 FP0 7 6 5 1H FP0BP0 1F FP0BP1 1E FP0BP2 1N FP0BP...

Page 16: ... MC9S08LC60 s SCI0 using a PC and a COM terminal program such as Hyperterminal or Tera Term Other features of the demo are Demonstrates the usage of an MC9S08LC60 with a 32 768 kHz external crystal clock source Demonstrates configuration of the ICG Demonstrates the reception of data via SCI0 Demonstrates configuration of the SCI0 baud rate Demonstrates the usage of the LCD modules Demonstrates the...

Page 17: ...ving similar functions have slightly different source code implementations The SofTech Microsystems demo source code is provided on a CD in the DEMO9S08LC60 kit 4 1 DEMO9S08LCD60 Overview and Configuration The DEMO9S08LC60 see Figure 4 is a full featured customer evaluation PCB with a built in USB to BDM programmer Besides providing a programming interface the USB cable can also be used to power t...

Page 18: ...ock FEE mode Both FBE and FEE use the on board 32 768 kHz crystal on the DEMO9S08LC60 For these modes the DEMO9S08LC60 CLK ENA jumper must be installed For the lowest power mode the FBE mode is recommended If the use of the LCD in stop3 is desired FBE mode is also recommended If lower system BOM bill of materials cost is the priority the FEI mode should be used Cpu h defines variables to select th...

Page 19: ...ely equal to the bus clock 16 desired baud rate In the demo application SCIDIVIDER can be configured in sci h In the case of a 32 768 kHz crystal in FBE mode SCIDIVIDER is selected in sci h such that the baud rate is 110 bps 4 2 3 LCD Configuration An LCD driver can be developed using a variety of approaches LCD drivers provide the ability to initialize the LCD module and write to the display Beca...

Page 20: ... parameters are compile time decisions Each of the functions called by LCD_init can be found in lcddrv c void LCD_init Configure clock source CONFIG_CLKSOURCE power supply configuration SET_CONFIG_VSUPPLY Configure operation in stop wait SET_LCDCR1_REG Configure frame frequncy SET_LCD_FRAME_FREQU Configure blink rate CONFIG_BLINKING 2 Hz OFF Enable Frontplanes ENABLE_FP Enable LCD ENABLE_LCD ON Ma...

Page 21: ...en calling these functions with lcdramm set to SEGBLINKEN the LCDRAM 20 0 bits control the blink enable on off function void SET_LOGO char lcdramm char k void SET_VOL char lcdramm char v byte numbars void SET_BATT char lcdramm char t byte numbars void SET_POWERSAVE char lcdramm char p void SET_TIMESEGS byte lcdramm byte am byte pm byte k3 void SET_TEMPSEGS byte lcdramm byte k1 byte k2 char col4 vo...

Page 22: ...shown below illustrates the usage of the lookup table and the manipulation of the proper LCDRAM registers to display the correct alphanumeric When a new value is to be written to the LCDRAM registers it must be ORed with the previous value This is necessary because there are other segments in the LCDRAM register that are not part of the 13 segment display and their values must be preserved see Fig...

Page 23: ... _ 0x00 0x4 4 2 3 2 3 Scrolling a String Across the LCD Display Scroll_String The example application provides the Scroll_String tU08 string byte local_length function to scroll an alphanumeric character string across the LCD display The complete source code for Scroll_String can be found in lcddrv c The Scroll_String function accepts a string argument of length n manipulates it and calls output_s...

Page 24: ...ation is very simple providing the following functionality Initialize ports ICG SCI LCD Initialize interrupts Display the default message Provide application loop Below is the source code for the program loop in main Program LOOP while 1 Check incoming data result AS1_RecvChar c if result ERR_OK sci_input inputcounter c toupper c inputcounter inputcounter 1 if c r sci_input inputcounter 1 0 string...

Page 25: ... configured to drive the LCD panel at 3 Volts with a 1 4 duty cycle and a frame frequency of 64 Hz The following instructions provide a walkthrough of the demo operation 1 Unpack the DEMO9S08LC60 and place jumpers as described in Table 8 2 Connect a serial cable from a PC to the DEMO9S08LC60 3 Connect an USB cable from a PC to the DEMO9S08LC60 4 Unzip the AN3280SW1 zip file 5 Start Code Warrior an...

Page 26: ...3280SW1 zip includes a pre configured HyperTerminal session file AN3280_Term ht that can be used for this part of the demo 12 Type an alphanumeric character sequence in the terminal program and then press the Enter key a The program will not change the display until the Enter key is pressed b You can press the Enter key without entering alphanumeric c Every time the Enter key is pressed the LCD ba...

Page 27: ...Interfacing an LCD to the MC9S08LC60 Rev 0 Freescale Semiconductor 27 THIS PAGE IS INTENTIONALLY BLANK ...

Page 28: ...ly disclaims any and all liability including without limitation consequential or incidental damages Typical parameters that may be provided in Freescale Semiconductor data sheets and or specifications can and do vary in different applications and actual performance may vary over time All operating parameters including Typicals must be validated for each customer application by customer s technical...

Reviews: