OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a...

42
Freescale Semiconductor Application Note Document Number: AN3415 Rev. 0, 03/2007 Contents © Freescale Semiconductor, Inc., 2007. All rights reserved. This application note describes how to interface an HCS08 device to an OLED display. Organic light-emitting diode (OLED) displays can provide a graphical user interface to various applications. They can be found in television screens, MP3 players, portable meters (electrical, medical), home automation equipment (thermostats, alarm controls), mobile phones, vending machines, coffee machines, white goods, etc. The code was written for MCUs with limited RAM and flash memory, with a minimum of I/Os used to drive an OSRAM Pictiva 128x64 OLED Display, Elegance Yellow with 16 gray scales (Part No. OS128064PK27MY0B00). The code is provided as a zip file, AN3415SW.zip, and can be downloaded from the Freescale website, www.freescale.com. The example code can be easily modified for other OLED displays. A hardware daughter card is also described. The card layout allows either the Freescale DEMO9S08AW60 board or the DEMO9S08QG8 board to to interface the 1 OLED Display Description . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1 Basic Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2 Command Description . . . . . . . . . . . . . . . . . . . . . . . 5 1.3 Power Up / Power Down Sequence . . . . . . . . . . . 10 1.4 Display Initialization . . . . . . . . . . . . . . . . . . . . . . . . 11 2 Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.1 OLED Daughter Card . . . . . . . . . . . . . . . . . . . . . . 13 2.2 Setup with DEMO9S08QG8 Board . . . . . . . . . . . . 14 2.3 Setup with DEMO9S08AW60 Board . . . . . . . . . . . 15 3 Software and CodeWarrior Development Tool . . . . . . . 15 3.1 OLED Driver Software Description . . . . . . . . . . . . 18 4 Demo Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 4.1 MC9S08QG8 Example Demo . . . . . . . . . . . . . . . . 24 4.2 9S08AW60 Example Demo. . . . . . . . . . . . . . . . . . 25 5 Image format and BMP2C.EXE Utility . . . . . . . . . . . . . . 27 6 Font Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 7 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 8 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Appendix AOLED Daughter Card . . . . . . . . . . . . . . . . . . . . . 33 A.1 Schematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 A.2 Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 A.3 OLED Daughter Card BOM (Bill of Materials) . . . . 37 A.4 DEMO9S08QG8 Board . . . . . . . . . . . . . . . . . . . . . 39 A.5 DEMO9S08AW60 Board . . . . . . . . . . . . . . . . . . . . 40 OLED Display Driver for the HCS08 Family OLED Driver Demonstration for 4 Bits-per-Pixel Displays by: Wolfgang Bihlmayr Systems Engineering Munich, Germany

Transcript of OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a...

Page 1: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

Freescale SemiconductorApplication Note

Document Number: AN3415Rev. 0, 03/2007

Contents

OLED Display Description . . . . . . . . . . . . . . . . . . . . . . . . 21.1 Basic Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2 Command Description. . . . . . . . . . . . . . . . . . . . . . . 51.3 Power Up / Power Down Sequence . . . . . . . . . . . 101.4 Display Initialization. . . . . . . . . . . . . . . . . . . . . . . . 11Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

2.1 OLED Daughter Card . . . . . . . . . . . . . . . . . . . . . . 132.2 Setup with DEMO9S08QG8 Board . . . . . . . . . . . . 142.3 Setup with DEMO9S08AW60 Board . . . . . . . . . . . 15Software and CodeWarrior‘ Development Tool . . . . . . . 15

3.1 OLED Driver Software Description . . . . . . . . . . . . 18Demo Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

4.1 MC9S08QG8 Example Demo . . . . . . . . . . . . . . . . 244.2 9S08AW60 Example Demo. . . . . . . . . . . . . . . . . . 25Image format and BMP2C.EXE Utility . . . . . . . . . . . . . . 27Font Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28Conclusion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

ppendix AOLED Daughter Card . . . . . . . . . . . . . . . . . . . . . 33A.1 Schematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33A.2 Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34A.3 OLED Daughter Card BOM (Bill of Materials) . . . . 37A.4 DEMO9S08QG8 Board . . . . . . . . . . . . . . . . . . . . . 39A.5 DEMO9S08AW60 Board . . . . . . . . . . . . . . . . . . . . 40

OLED Display Driver for the HCS08 FamilyOLED Driver Demonstration for 4 Bits-per-Pixel Displaysby: Wolfgang Bihlmayr

Systems EngineeringMunich, Germany

This application note describes how to interface an HCS08 device to an OLED display. Organic light-emitting diode (OLED) displays can provide a graphical user interface to various applications. They can be found in television screens, MP3 players, portable meters (electrical, medical), home automation equipment (thermostats, alarm controls), mobile phones, vending machines, coffee machines, white goods, etc.

The code was written for MCUs with limited RAM and flash memory, with a minimum of I/Os used to drive an OSRAM Pictiva™ 128x64 OLED Display, Elegance Yellow with 16 gray scales (Part No. OS128064PK27MY0B00). The code is provided as a zip file, AN3415SW.zip, and can be downloaded from the Freescale website, www.freescale.com. The example code can be easily modified for other OLED displays.

A hardware daughter card is also described. The card layout allows either the Freescale DEMO9S08AW60 board or the DEMO9S08QG8 board to to interface the

1

2

3

4

5678A

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

Page 2: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

OLED Display Description

OLED. The OLED daughter card contains the interface, a DC/DC converter to provide the OLED voltage (12 V), and the actual OLED display itself.

The OLED displays are a self-emissive technology that typically require less power than LCDs with backlights. Only an “on” pixel consumes power. This feature makes OLED displays suitable for battery-powered devices.

Advantages of OLED displays: • Less power than LCDs — Better for portable/handheld applications• Self-emissive technology • Vivid color — High brightness and contrast• Video capability• Wide viewing angle• Thin form factor — No backlight required• Long-lasting lifetime — Up to 55,000 hours• Monochrome (yellow, orange, green, white, blue) with one- or four-bit gray-scale capability • Full color capability

1 OLED Display DescriptionThe OLED display used in this application note offers a parallel- or serial-interface-connection option. The BS1 and BS2 pins are used to select the interface to be used. In this example only the serial interface is used (Figure 1).

Figure 1. OLED Module Interface (Serial Mode)

The main advantage of using the serial interface rather than the parallel interface is the number of I/Os required to drive the display. For the serial interface, only 5 I/Os (D/C, CS, SDIN, SCLK, RST) are required, compared with 13 I/Os (D/C, CS, R/W, E/RD, D0:D7, RST) for the parallel interface.

Table 1 briefly describes the OLED pin functions for the serial interface.

OLED Module

D/C

CS

SDIN

SCLK

RST

VCC

VSS

VDD

15

17

11

12

16

29

21

2

BS1 BS2

20 21

COMHIREFH

VSL

3

4

30

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor2

Page 3: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

OLED Display Description

1.1 Basic OperationThe OLED display contains a chip-on-glass (COG) controller (SSD0323 128 x 80, 16 Gray Scale Dot Matrix OLED/PLED Segment/Common Driver with Controller from Solomon Systech) with display RAM (graphic display data RAM — GDDRAM) that holds the data for the pattern/images to be displayed.

Four bits of data are required for each pixel (4 bpp = bits per pixel) allowing 16 possible gray values. One byte is used to store the information for two pixels. In total, 4 Kbytes (4096 bytes) are required to hold the complete display content for the 128_x_64 pixels. The MCU needs to transfer data only if the display content needs updated. Cyclic refresh of the display is not necessary .

The data transfer is done byte-wise, first sending the most significant bit (MSB) (Figure 2). The data is applied with the rising edge of the SCLK signal and is sampled at the falling edge of the SCLK signal. The data/command signal D/C is used to distinguish between graphic display data access and control commands sent to the display. Table 3 outlines the available display-control commands.

Table 1. OLED Pin Description

Pin Pin Name Description

15 D/C Data/Command

17 CS Chip-select control

11 SDIN Serial-data input

12 SCLK Serial-clock input

16 RST Reset

20, 21 BS1, BS2 Interface selectionBS1 = 0; BS2 = 0 for serial

2 VCC OLED power-supply voltage (12 V)

21 VDD Logic-supply voltage (3.3 V)

29 VSS Ground

3 COMH Common (row) high voltage — A capacitor should be connected between this pin and VSS.

4 IREFH Segment (column) current reference — A resistor should be connected between this pin and VSS.

30 VSL Voltage segment low — A capacitor should be connected between this pin and VSS.

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor 3

Page 4: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

OLED Display Description

Figure 2. Serial Data Transfer (Command)

The display data is sent byte-by-byte. Each byte automatically increments the address pointer to the next position. The display supports different GDDRAM to pixel mappings for mounting flexibility (regarding display orientation). You can rotate the display output by 180 degrees. Figure 3 and Table 2 show the default pixel mapping the software uses.

Figure 3. Pixel Mapping

D/C

CS

SDIN

SCLK

B7 B6 B5 B4 B3 B2 B1 B0

(0,0)

(127,63)

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor4

Page 5: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

OLED Display Description

To update a portion of the display partially, you can use the set-column-address and set-row-address commands. They allow defining a portion (canvas) of the display to be updated without updating the whole 128 x 64 pixels. Also, each transferred data byte increases the address pointer to the next (two) pixel within the defined area. Basically, this mechanism allows you to individually update any (two) pixel (respectively, any byte in the GDDRAM).

One constraint of using the serial interface is that it supports only unidirectional data transfer (write-only). Basically, in the serial mode you cannot read back the GDDRAM content; you cannot update only a single pixel of two pixel in a byte by using a read-modify-write one byte method.

1.2 Command DescriptionTable 3 briefly explains the available commands (for the serial interface) and their corresponding parameters. For a more detailed description, consult the OSRAM Pictiva or SSD0323 documentation (Section 8, “References,” on page 32). Most commands are used to parametrize the COG for a specific display under specific ambient conditions. Recommendations for setup for various displays are provided by the display manufacturers (for OSRAM OLED see Table 4).

Table 2. GDDRAM Address Mapping (Data-Byte Sequence D0, D1, ..., D5119)

Column

0 1 ... 63 Address

0 1 2 3 ... 126 127 Pixel

Row

0 D0[7:4] D0[3:0] D1[7:4] D1[3:0] ... D63[7:4] D63[3:0]

1 D64[7:4] D64[3:0] D65[7:4] D65[3:0] .... D127[7:4] D127[3:0]

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

... ...

.

.

.

63 D5056[7:4] D5056[3:0] D5057[7:4] D5057[3:0] ... D5119[7:4] D5119[3:0]

Address

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor 5

Page 6: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

OLED Display Description

Table 3. Command Table (Sheet 1 of 5)

D/C Hex Command Length Description1

000

0x15A[5:0]B[5:0]

Set Column Address 3 bytes This command specifies column start address and end address of the display data RAM. It also sets the column address pointer to column start address.Second byte A[5:0] sets the column start address from 0–63. POR = 0.Third byte B[5:0] sets the column end address from 0–63, POR = 63

000

0x75A[5:0]B[5:0]

Set Row Address 3 bytes This command specifies row start address and end address of the display data RAM. It also sets the row address pointer to row start address.Second byte A[5:0] sets the row start address from 0–79, POR= 0.Third byte B[5:0] sets the row end address from 0–79, POR = 79

00

0x81A[6:0]

Set Contrast Control Register 2 bytes This command is to set contrast setting of the display. The COG chip has 128 contrast steps from 0x00 to 0x7F. The segment output current increases linearly with the increase of contrast step. Second byte A[6:0] sets the contrast in 128 steps. Contrast increases as level increases. POR = 0x40.

0 0x84–0x86 Set Current Range 1 byte This command is used to select quarter range or half range or full range current mode. With the same contrast level, quarter range mode gives a quarter of the current output of the full range mode. Similar to half-range current mode, it gives a half of the current output of the full-range mode. 0x84 = Quarter-current range (POR)0x85 = Half-current range0x86 = Full-current range

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor6

Page 7: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

OLED Display Description

00

0xA0A[6:0]

Set Re-map 2 bytes This command changes the mapping between the display data column address and segment driver, row address and common driver. It allows flexibility in layout during OLED module assembly.

Column Address Re-mapIf column address re-map is set, columns 0–63 map to SEG127–0, regardless of star-column and end-column commands.

Nibble Re-mapIf nibble re-map is set, the two nibbles of the data bus for RAM access are re-mapped, such that B7, B6, B5, B4, B3, B2, B1, B0 acts like B3, B2, B1, B0, B7, B6, B5, B4.This feature working with column address re-map produces an effect of flipping outputs SEG0–127 to SEG127–SEG0.

Address Increment ModeIf horizontal increment mode is set, the column address pointer advances after each RAM access. If vertical increment mode is set, the row-address pointer advances after each RAM access.

COM Re-mapIf COM re-map is set, ROW 0–79 maps to COM79–0, regardless of start and end row commands.

A[0]=0, Disable Column Address Re-map (POR)A[0]=1, Enable Column Address Re-mapA[1]=0, Disable Nibble Re-map (POR)A[1]=1, Enable Nibble Re-mapA[2]=0, Horizontal Address Increment (POR)A[2]=1, Vertical Address IncrementA[4]=0, Disable COM Re-map disable (POR)A[4]=1, Enable COM Re-mapA[5]=0, Reserved (POR)A[5]=1, ReservedA[6]=0, Disable COM Split Odd Even (POR)A[6]=1, Enable COM Split Odd Even

00

0xA1A[6:0]

Set Display Start Line 2 bytes This command sets the display-start-line register, determining the display RAM address that can be shown by selecting a value from 0 to 79.Second byte A[6:0] sets the display RAM start-line register from 0 to 79. POR = 0.

Table 3. Command Table (Sheet 2 of 5)

D/C Hex Command Length Description1

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor 7

Page 8: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

OLED Display Description

00

0xA2A[6:0]

Set Display Offset 2 bytes This command is to set the display-offset register to determine the mapping of the display start line to one of COM0–79. (It is assumed that COM0 is the display start line, display start line register equals 0.)For example, to move the COMX toward the COM0 direction for L lines, the 7-bit data in the second command should be given by L. In other words, to move the COMX towards the COM79 direction for L lines, the 7-bit data in the second command should be given by 80–L.Second byte A[6:0] sets the vertical scroll by COM from 0–79. POR = 0.

0 0xA4–0xA7 Set Display Mode 1 byte This command is used to set normal display, entire display on, entire display off, and inverse display.

Normal Display turns the data to ON at the corresponding gray levels GS0–GS15 (see Set Gray Scale Table).

Entire Display On forces the entire display to be at gray level GS15, regardless of the contents of the display data RAM. Entire Display Off forces the entire display to be at gray level GS0 regardless of the contents of the display data RAM. Inverse Display uses the gray scale table in reverse order gray level 0–15 uses GS15–GS0, and so on.

0xA4 = Normal Display (POR)0xA5 = Entire Display On (GS15)0xA6 = Entire Display Off (GS0)0xA7 = Inverse Display

00

0xA8A[6:0]

Set Multiplex Ratio 2 bytes This command sets multiplex ratio N from 16 to 80.Second byte A[6:0] determines multiplex ration N. POR = 0x4F (80).

00

0xADA[1:0]

Set Master Configuration 2 bytes This command is used to enable or disable the internal DC–DC voltage converter. This command is executed when display is on.A[0] = 0, Disable DC–DC converterA[0] = 1, Enable DC–DC converter (POR)A[1] = 0, Disable internal VCOMHA[1] = 1, Enable internal VCOMH (POR)

0 0xAE–0xAF Set Display On/Off 1 byte This command turns the display on or off. When the display is off, the segment and common output are in high impedance state.0xAE = display off (sleep mode) (POR)0xAF = display on

00

0xB0A[5:0]

Set Pre-chargeCompensation Enable

2 bytes This command enables the pre-charge voltage.A[5:0] = 0x08 (POR)A[5:0] = 0x28, enable pre-charge compensation

00

0xB4A[2:0]

Set Pre-chargeCompensation Level

2 bytes This command sets the pre-charge voltage level.A[2:0] = 0 (POR)A[2:0] = 3, recommended level

Table 3. Command Table (Sheet 3 of 5)

D/C Hex Command Length Description1

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor8

Page 9: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

OLED Display Description

00

0xBFA[3:0]

Set Segment LowVoltage (VSL)

2 bytes This command is used to set segment low voltage (VSL). The value of VSL is the same for display all on, display all off pattern with internal or external DC–DC voltage converter.The second byte A[3:0] sets the VSL voltage as follow: 1000–1110A[3:0] = 0010 connects to VSSA[3:0] = 1110 (POR)(When VDD > 2.5 V)

00

0xBEA[5:0]

Set VCOMH Voltage 2 bytes This command is used to set VCOMH voltage level.The second byte A[5:0] specifies the VCOMH voltage level 000000–011111A[5:0] = 1xxxxx = 1.0*VREFA[5:0] = 010001(POR)

00

0xBCA[7:0]

Set Pre-charge Voltage 2 bytes This command is used to set the pre-charge voltage level.The second byte A[7:0] sets the pre-charge voltage level 00000000–00011111A[7:0] = 1xxxxxxx connects to VCOMHA[7:0] = 001xxxxx equals 1.0*VREFA[7:0] = 00011000(POR)

00

0xB1A[7:0]

Set Phase Length 2 bytes This command sets the phase length. The lower nibble of the second byte selects phase 1 period (no pre-charge and current drive) from 1 to 16 DCLKs. The higher nibble of the second byte is used to select phase 2 period (pre-charge) from 1 to 16 DCLKs. A[3:0] = P1, phase 1 period of 1–15 DCLK clocks, POR = 3DCLKS = 3A[7:4] = P2, phase 2 period of 1–15 DCLK clocks, POR = 5DCLKS = 5

00

0xB2A[7:0]

Set Row Period 2 bytes This command is used to set the row period. It is defined by multiplying the internal display clock period by the number of DCLKSs per row (value from 2–158).The larger the value, the more precise tuning of each gray scale level. See set gray scale table command for details.Also, it is used to define the frame frequency with the display clock divide ratio command.Row period equal to the sum of phase 1, 2 periods and the pulse width of GS15. Second byte sets the number of DCLKs, K, per row between 2–158DCLKS, POR = 37DCLKS = 0x25The K value should be set as K = P1+P2+GS15 pulse width (POR: 3+5+29DCLKS)

Table 3. Command Table (Sheet 4 of 5)

D/C Hex Command Length Description1

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor 9

Page 10: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

OLED Display Description

1

1.3 Power Up / Power Down SequenceTo protect the OLED display and to extend the display life time the power up/down sequence should be controlled, specifically, the display voltage VCC (typ. 12–15 V).

1.3.1 Power-Up Sequence

To power-up the OLED display follow the steps below:1. Power-up VDD (3.3 V) and wait until stable2. OLED display hardware reset3. Send display-off command

00

0xB3A[7:0]

Set Display Clock DivideRatio/OscillatorFrequency

2 bytes This command is used to set the frequency of the internal display clocks, DCLKs. It is defined by dividing the oscillator frequency by the divide ratio (Value from 1 to 16). Frame frequency is determined by divide ratio, number of display clocks per row, MUX ratio and oscillator frequency. The lower nibble of the second byte is used to select the oscillator frequency. The lower nibble of the next byte sets the divide ratio of the display clocks: Divide ratio = 1–16, POR = 2The higher nibble of the next byte sets the Oscillator Frequency. Oscillator Frequency increases with the value of A[7:4] and vice versa. POR=0

000000000

B8A[2:0]B[6:4][2:0]C[6:4][2:0]D[6:4][2:0]E[6:4][2:0]F[6:4][2:0]G[6:4][2:0]H[6:4][2:0]

Set Gray Scale Table 9 bytes This command is used to set the gray scale table for the display. The next 8 bytes set the gray scale level of GS1–15 as below:A[2:0] = L1, POR=1B[2:0] = L2, POR=1B[6:4] = L3, POR=1C[2:0] = L4 POR=1C[6:4] = L5, POR=1D[2:0] = L6, POR=1D[6:4] = L7, POR=1E[2:0] = L8, POR=1E[6:4] = L9, POR=1F[2:0] = L10, POR=1F[6:4] = L11, POR=1G[2:0] = L12, POR=1G[6:4] = L13, POR=1H[2:0] = L14, POR=1H[6:4] = L15, POR=1

00

0xCFA[7:4]

Set Biasing Current forDC–DC converter

1 byte F0H = High (POR)70H = Low

0 0xE3 NOP 1 byte Command for no operation

POR indicates the default value after power on reset

Table 3. Command Table (Sheet 5 of 5)

D/C Hex Command Length Description1

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor10

Page 11: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

OLED Display Description

4. Power-up VCC (12 V) and wait until stable5. Delay 100 ms6. Send display-on command

1.3.2 Power-Down Sequence

To power-down the OLED display follow the steps below:1. Send display-off command2. Power down VCC (12 V)3. Delay 100 ms (when VCC has reached 0 V and panel is completely discharged)4. Power down VDD (3.3 V)

1.4 Display InitializationTable 4 shows the manufacturers (OSRAM) recommended initialization sequence after power-up for the Pictiva 2.7-inch 128x64 OLED Display, Elegance Yellow with the following parameters:

• VDD = 3.3 V• VCC = 12 V• Frame frequency = 100 Hz

CAUTIONConsult the manufacturer documentation for the latest information and for different displays (for example, spring green instead of elegance yellow) and/or parameters (for example, different VCC voltages).

Table 4. Initialization Sequence After Power-Up

Command Code POR Default ValueInitialization

(Dual Voltage Supply)

Set column address 0x15 0x000x3F

0x000x3F

Set row address 0x75 0x000x4F

0x000x3F

Set contrast control 0x81 0x40 0x661

Set current range 0x84–0x86 quarter (0x84) full (0x86)

Set re-map 0xA0 0x00 0x41

Set display start line 0xA1 00 default

Set display offset 0xA2 0x00 0x44

Set multiplexer ratio 0xA8 0x4F 0x3F

Set display ON/OFF 0xAE (OFF) 0xAF (ON)

Set display mode 0xA4 default

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor 11

Page 12: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

OLED Display Description

Table 5 shows the corresponding recommended gray-scale settings.

Set DC-DC converter 0xAD 0x02 0x02 (disabled)

Set DC-DC bias current 0xCF 0xF0 default

Set row period 0xB2 0x25 0x46

Set pre-charge compensation enable

0xB0 0x08 0x28

Set pre-charge compensation level

0xB4 0x00 0x07

Set clock divide 0xB3 0x02 0xF1

Set phase length 0xB1 P1=3, P2=5 0x22 (P1=2, P2=2)

Set VSL 0xBF 0x0E 0x0D

Set VCOMH 0xBE 0x11 0x021

Set Vprecharge 0xBC 0x18 0x04

Set gray scale table 0xB8 all 1 see Table 5

1 This setting represents maximum luminance for proper operation of the display. A lower setting can be used for dimming. A higher setting adversely affects the operating lifetime, as defined in this specification.

Table 5. Gray-Scale Settings

GS Level Phase 1 Phase 2 S/W Set GS Pulse Total DCLK

L0 2 2 0 0 4

L1 2 2 1 1 5

L2 2 2 1 3 7

L3 2 2 1 5 9

L4 2 2 2 8 12

L5 2 2 2 11 15

L6 2 2 2 14 18

L7 2 2 3 18 22

L8 2 2 3 22 26

L9 2 2 4 27 31

L10 2 2 4 32 36

L11 2 2 5 38 42

L12 2 2 5 44 48

L13 2 2 6 51 55

L14 2 2 6 58 62

L15 2 2 7 66 70

Table 4. Initialization Sequence After Power-Up (continued)

Command Code POR Default ValueInitialization

(Dual Voltage Supply)

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor12

Page 13: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

Hardware

2 HardwareThe system is set up using the standard DEMO9S08AW60 and DEMO9S08QG8 boards with a second pcb board called an OLED daughter card (Figure 4).

Figure 4. System Setup Example

2.1 OLED Daughter CardThe OLED daughter card allows the OLED display to connect to the DEMO9S08QG8 or DEMO9S08AW60 demo boards. The OLED daughter card contains the socket for the flat flex cable (FFC) of the OLED display, a DC/DC converter (12 V, 120 mA boost converter) to supply the OLED display with the necessary 12 V derived from the 3.3 V supply of the DEMO9S08AW60 and DEMO9S08QG8 boards. It has two separate 0.1-inch pinheader connectors, J1 and J2, that can be directly connected to the DEMO9S08AW60 and DEMO9S08QG8 boards, respectively.

Further details of the OLED Daughter Card, like schematics, layout and bill of materials (BOM), can be found in Section Appendix A, “OLED Daughter Card.”

2.1.1 Interface• OLED daughter-card interface — Requires six signals and two power-supply connections (Table 6,

Table 7).• MCU serial peripheral interface — Used to transfer data and commands to the OLED display.

Three SPI pins—slave select (SS), serial clock (SPSCK), and master-out slave-in (MOSI)—are used for the unidirectional data flow from the MCU to the OLED display. The master-in slave-out (MISO) pin is available for other use.

• 12VEN signal — Controls DC/DC converter output voltage. Allows a controlled power up/down of the OLED power voltage VCC.

OLED Daughter CardQG8DEMO Board

Power Supply

2 Switches

Potentiometer

Light Sensor

OLED Display 128x64pixel (Yellow 4bit)

DC/DC 3.3 V

to 12 V

3.3 V Logic Supply

12 V Enable

GND

Data/Command

MOSI

SPCLK

RESET

SS

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor 13

Page 14: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

Hardware

• RST signal — Connected to an MCU general-purpose input output (GPIO) pin to control the OLED display hardware reset by software.

2.2 Setup with DEMO9S08QG8 BoardFigure 4 indicates the OLED driver setup using the DEMO9S08QG8 board.

To protect the system and for proper operation, set up the DEMO9S08QG8 board before the system powers up.

Use the documentation provided with the board for more details about the DEM09S08QG8 board.

2.2.1 Jumpers

Jumper VX_EN must be closed to provide the OLED daughter card with power (3.3 V).

Table 6. OLED Daughter-Card Connector J1 (DEMO9S08QG8)

Pin Signal Description

1 3.3 V 3.3 V power supply input

3 GND Ground

17 SDIN Serial data input

19 12VEN 12 V enable control input

21 SCLK Serial clock input

23 CS Chip Select input

27 D/C Data/command input

29 RST Reset input

all other pins Unused — not connected

Table 7. OLED Daughter-Card Connector J2 (DEMO9S08AW60)

Pin Signal Description

1 3.3 V 3.3 V power supply input

3 GND Ground

13 D/C Data/command input

15 RST Reset input

17 SDIN Serial data input

19 12VEN 12 V enable control input

21 SCLK Serial clock input

23 CS Chip Select input

All other pins Unused — not connected

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor14

Page 15: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

Software and CodeWarrior‘ Development Tool

The Jumper PWR_SEL must be in position VDD. This selects the external power supply as the power source.

The Jumper USER_EN should be closed for full demo functionality.

Figure 5 summarizes the jumper settings.

Figure 5. DEMO9S08QG8 Jumper Settings

2.3 Setup with DEMO9S08AW60 BoardFigure 13 indicates the OLED Driver setup using the DEMO9S08AW60 board.

To protect the system and for proper operation, set up the DEMO9S08AW60 board before the system powers up.

WARNINGSet up the DEMO9S08AW60 board correctly to avoid system damage or malfunction! The board must be configured for 3 V (see Section 2.3.1, “Jumpers”).

Use the documentation provided with the board for more details about the DEM09S08AW60 board.

2.3.1 Jumpers• Jumper W1 — VDD_SEL must be in position 3 V. This selects the 3 V operation.• Jumper W2 — 5V_SEL must be in position EXT. This selects the external power supply as the

power source.• Jumper W3 — P_IO_5V must be closed to provide the OLED daughter card with power (3.3 V).• Jumpers from J3 to J31 — Should be closed for full demo functionality.

Figure 6 summarizes jumper settings.

Figure 6. DEMO9S08AW60 Jumper Settings

3 Software and CodeWarrior™ Development ToolThe application software was developed for the DEMO9S08QG8 and the DEMO9S08AW60 boards driving an OSRAM Pictiva OSRAM Pictiva 2.7-inch 128x64 OLED Display, Elegance Yellow with 16 gray

VX_EN PWR_SELVB VDD

SW1SW2LED1LED2RV1RZ1

USER_EN

5V_SELUSB EXT

J3

VDD_SEL5V 3V

J31

W3

P_IO_5V

W2

W1

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor 15

Page 16: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

Software and CodeWarrior‘ Development Tool

scales (Part.No. OS128064PK27MY0B00). It is written in a way which should make it easy to adopt for different MCUs or different OLED displays.

The software is also tested to be used with the OSRAM Pictiva 1.6-inch 128x64 OLED display, elegance yellow with 16 gray scales (Part.No. OS128064PK16MY0A01).

The driver project was developed with the CodeWarrior for HC08 V5.1 — Special Edition development tool.

Application features:• Serial interface to OLED display using SPI module (low number of I/Os used)• Low-level routines:

— Send data byte — Send command byte— OLED power voltage ON/OFF— OLED hardware reset

• High-level routines:— Display initialization— Set drawing area — Fill drawing area— Draw text using bitmap font— Draw bitmap graphic

• Two bitmap type fonts 5x7 and 8x15 pixel size are included • Adaptable for other OLED displays or MCUs

To open the OLED driver demo project, open file OLEDDemo.mcp in the CodeWarrior integrated development environment (IDE). Figure 7 shows the project view.

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor16

Page 17: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

Software and CodeWarrior‘ Development Tool

Figure 7. OLED Driver Demo Project Tree

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor 17

Page 18: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

Software and CodeWarrior‘ Development Tool

3.1 OLED Driver Software DescriptionThe OLED driver project contains the following files:

3.1.1 Driver Configuration

The OLED.H header file can adapt the driver for different microcontrollers. Currently, it supports the MC9S08QG8 and the MC9S08AW60 MCUs.

To change the microcontroller, click on the “Change MCU/Connection ...” button and select the MCU derivative and the debugger connection you want to use (Figure 8 and Figure 9).

NOTEYou must select the correct MCU derivative and debugger interface to download the software into the microcontroller flash memory.

Figure 8. Change MCU

Table 8. OLED Driver Files

Files Description

OLED.H OLED driver header file— Constants (defines) for OLED commands— Preparation for different OLED displays— Definition of MCU hardware interface

OLED.C OLED driver c file— OLED initialization sequence (array)— OLED functions (Table 9)

FONT.H Font include file

FONT.C Font c file— Definition of two fonts 5x7pixel and 8x16pixel

IMAGES.H Image include file

IMAGES.C Image c file— Example images

DERIVATIVE.H Header file to include the derivative specific header file — This and the MCU derivative-specific files (for example, MC9S08QG8.H and MC9S08QG8.C) are controlled by the CodeWarrior IDE (Section 3.1.1, “Driver Configuration”).

MYTYPES.H Type definitions

MAIN.C Shows an example implementation of the OLED driver

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor18

Page 19: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

Software and CodeWarrior‘ Development Tool

Figure 9. Select MCU Derivative and Debugger Connection

The CodeWarrior IDE automatically modifies the DERIVATIVE.H file and inclues the right MCU derivative files.

For example, after changing to the MC9S08QG8 MCU the DERIVATIVE.H file looks like this:/* * Note: This file is recreated by the project wizard whenever the MCU is * changed and should not be edited by hand */ /* Include the derivative-specific header file */#include <MC9S08QG8.h>

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor 19

Page 20: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

Software and CodeWarrior‘ Development Tool

And now, the project contains the MC9S08QG.C and MC9S08QG8.H files:

Figure 10. IDE Updates MCU Derivative Files

The MC9S08QG8.H file defines a macro with the derivative name, for example, _MC9S08QG8_H, which

is used to implement the hardware interface-specific code.

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor20

Page 21: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

Software and CodeWarrior‘ Development Tool

To adapt the driver software for a different OLED display, modify the initialization routine. This is currently limited to only 4 bpp displays. Different color resolutions require further adaptations.

In the OLED.H file, a define, based on the manufacturer part number (for example, OS128064PK27MY0B00), is used to select which display is connected. A second definition _UP_SIDE_DOWN allows to select the display orientation.

// ----------------------------------------------------------------------------// macros for hardware interface // ----------------------------------------------------------------------------

// ------------------------------// pinout for DEMO9S08QG8 board:#ifdef _MC9S08QG8_H

// use PTB4/MISO pin to enable 12V for OLED display#define _12V_Init() PTBD_PTBD4 = 0; PTBDD_PTBDD4 = 1 #define _12V_Enable() (PTBD_PTBD4 = 1) #define _12V_Disable() (PTBD_PTBD4 = 0)

// use PTB7 pin to drive reset signal OLED display#define _RST_Init() PTBD_PTBD7 = 1; PTBDD_PTBDD7 = 1#define _RST_Assert() (PTBD_PTBD3 = 0)#define _RST_Release() (PTBD_PTBD3 = 1)

// use PTB6 pin to drive D/#C (Data/Command) signal to OLED display#define _DC_Init() {PTBD_PTBD6 = 1; PTBDD_PTBDD6 = 1;}#define _DC_Set() (PTBD_PTBD6 = 1)#define _DC_Clr() (PTBD_PTBD6 = 0)

// SPI init#define _SPI_Init() { \ SPIC1 = SPIC1_SPE_MASK|SPIC1_MSTR_MASK|SPIC1_SSOE_MASK; \ SPIC2 = SPIC2_MODFEN_MASK|SPIC2_BIDIROE_MASK|SPIC2_SPC0_MASK; \ SPIBR = 0; \}

#define _SPI_Send(v) {while(!SPIS_SPTEF) {;} SPID = (v);}

#endif

// ----------------------------------------------------------------------------// macros for display selection and orientation // ----------------------------------------------------------------------------// select which display to use, if necessary add new display and init sequence//#define OS128064PK27MY0B00#define OS128064PK16MY0A01

// select if display is mounted up side down //#define _UP_SIDE_DOWN // define to rotate output 180 degrees

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor 21

Page 22: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

Software and CodeWarrior‘ Development Tool

In the OLED.C file, modify the actual initialization sequence.

3.1.2 OLED Driver API

Table 9 summarizes the services provides by the OLED driver:

//-----------------------------------------------------------------------------// OLED Init Sequence for Pictiva 128x64 2.7" Yellow OS128064PK27MY0B00// is used by OLED_Display_Init()//-----------------------------------------------------------------------------#if defined(OS128064PK27MY0B00)

const UINT8 _Display_Init_Seq[] = { OLED_SETCONTRAST,0x5D, // for yellow OLED_SETCURRENTRANGE_100,

#if defined (_UP_SIDE_DOWN) OLED_SETREMAP,0x52, OLED_SETDISPLAYOFFSET,0x4C, // mapping of RAM to display#else OLED_SETREMAP,0x41, OLED_SETDISPLAYOFFSET,0x44, // mapping of RAM to display#endif

OLED_SETDISPLAYSTARTLINE,0, // TOP OLED_SETMULTIPLEXRATIO,63, // 64 MUX OLED_SETDISPLAYMODE_NORM, OLED_SETPHASELENGTH,0x22, OLED_SETROWPERIOD,0x46, OLED_SETDISPLAYCLOCKDIVIDE,0x41, OLED_SETSEGMENTLOWVOLT,0x0D, OLED_SETVCOMH,0x00, OLED_SETPRECHAGEVOLT,0x10, OLED_SETGREYSCALETABLE,0x01,0x11,0x22,0x32,0x43,0x54,0x65,0x76, OLED_SETMASTERCONFIG,0x02, // DC-DC 0x02 disabled, 0x03 enabled};

#endif

Table 9. OLED Driver Services

Function Name Type Parameters Description

OLED_Interface_Init void void Initialization of MCU <> OLED hardware-interface (I/O ports, SPI)

OLED_VCC_On void void Turn ON VCC OLED power voltage (12 V)

OLED_VCC_Off void void Turn OFF VCC OLED power voltage (12 V)

OLED_Reset void void Applies hardware reset (RST) to OLED display

OLED_WriteCmd void UINT8 cmd Transfers one byte of command data (D/C = 0)

OLED_WriteData void UINT8 data Transfers one byte of display data (D/C = 1)

OLED_Display_Init void void Initialization sequence for OLED display.The actual command sequence is specified as a const array for easy adaptation, for example, for a different display type.

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor22

Page 23: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

Demo Functionality

4 Demo FunctionalityThe demo functionality varies slightly between the DEMO9S08QG8 and the DEMO9S08AW60 setups.

Figure 11 depicts the basic program flow and the OLED display outputs for DEMO9S08QG8 example.

OLED_Fill void UINT8 leftUINT8 topUINT8 widthUINT8 heightUINT8 fill

Fills a specified area with a color: — Left/top are the x/y coordinates of the top/left corner of the area— Width/height of the area — Fill is the pattern=color to fill the area (high/low nibble specifying the color) (4bpp)Attention: 4bpp is the supported color depth. An even number must be set for left and width.

OLED_SetCanvas void UINT8 left UINT8 topUINT8 widthUINT8 height

Sets a canvas (an sub-set of the display area) to be active— Left/top are the x/y coordinates of the top/left corner — Width/height of the area Attention: 4bpp is the supported color depth. An even number must be set for left and width.

OLED_DrawImage void UINT8 leftUINT8 topUINT8 maskUINT8* image

draws a image (bitmap) to the specified position — Left/top are the x/y coordinates of the top/left corner — Mask allows to modify the color of the image to be modified. Darkens an onscreen button to indicate it has been pressed (see demo).— *Image is a pointer to the image dataAttention: for 4bpp left and the width of the image must be an even number.

OLED_WriteString5x7 void UINT8 leftUINT8 topUINT8 ccchar* text

Writes the text with the Font 5x7 to the specified position— Left/top are the x/y coordinates of the top/left corner — cc is the color of the font (high/low nibble specifying the color) (4bpp)Attention: for 4bpp left must be an even number.

OLED_WriteString8x15 void UINT8 leftUINT8 topUINT8 ccchar* text

Writes the text with the Font 8x15 to the specified position— Left/top are the x/y coordinates of the top/left corner — cc is the color of the font (high/low nibble specifying the color) (4bpp)Attention: On the left side for 4bpp, set an even number.

Table 9. OLED Driver Services (continued)

Function Name Type Parameters Description

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor 23

Page 24: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

Demo Functionality

Figure 11. Basic Program Flow

4.1 MC9S08QG8 Example DemoThe demo software demonstrates the OLED display drive and displays some real-time data (see Figure 4):

• Status of two switches • Analog-voltage reading set by potentiometer• Analog-voltage reading of ambient-light sensor

MCU initialization (Real Time Interrupt modules

RTI used for timing)

OLED_Interface_Init()

OLED Power Up Sequence

Display Welcome Message(for about 1 second)

Display example GUI with real time data(about 10 second)

Display Freescale Logo(scrolls in)

Display Memory Information Message

(for about 3 seconds)

Power On (Reset)

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor24

Page 25: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

Demo Functionality

Figure 12. Demo Setup with DEMO9S08QG8 (Photo)

4.2 9S08AW60 Example DemoThe demo software demonstrates the drive of the OLED display and displays some real-time data:

• Status of four switches • Analog-voltage reading set by potentiometer• Analog-voltage reading of ambient light sensor• Two analog-voltage readings of a X/Y accelerometer

Switches SW1,SW2

Potentiometer Light Sensor

BDM Interface

OLED Daughter Card

9S08QG8

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor 25

Page 26: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

Demo Functionality

Figure 13. Demo Setup with DEMO9S08AW60 Board

OLED Daughter CardAW60DEMO Board

Power Supply

4 Switches

Potentiometer

Light Sensor

OLED Display 128x64pixel (Yellow 4bit)

DC/DC 3.3 V

to 12 V

3.3 V Logic Supply

12 V Enable

GND

Data/Command

MOSI

SPCLK

RESET

SSX/Y Accelerometer

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor26

Page 27: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

Image format and BMP2C.EXE Utility

Figure 14. Demo Setup with DEMO9S08AW60 (Photo)

5 Image format and BMP2C.EXE UtilityThe BMP2C.EXE utility (freeware from Freescale) is a command-line tool to convert a Windows bitmap file (*.bmp) to a C-language structure used with the OLED driver software. To convert a bitmap file, open a command window and run the BMP2C.EXE, as described below:

Usage:BMP2C.exe bmpfile outfile bmpfile bitmap file to be converted outfile output "C" file created

Switches SW1-SW4

Potentiometer

Light Sensor

BDM Interface(bottom side)

OLED Daughter Card

9S08AW60

Accelerometer

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor 27

Page 28: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

Font Format

The tool converts bitmap pixel from the RGB format to the 4 bpp format using the following equation:

R, G, B are the 8bit values representing the red, green, and blue portion of the pixel.

All converted pixel are packed into a C-language structure (byte array).

Each byte contains the information for two pixels.

NOTEThe software and the BMP2C.EXE requires that the source bitmap file horizontal resolution is an even number.

This structure can be included into the IMAGE.C source file (for example, in the CodeWarrior IDE).

6 Font FormatBitmap type fonts are stored in a format where one bit represents one pixel of information — monochrome font. Each letter can then be displayed in one of 16 gray levels.

To explain how the font data is represented, the character 1 is used as an example.

For the 5x7 font, five bytes are used to store each character:

const char Image[] = {128,40, // first two byte are size in pixel (x * y)0x00, 0x00, .........}; // pixel data

const char FONT5X7 [][5] = { ....................{ 0x00, 0x42, 0x7F, 0x40, 0x00 }, // 1....................}

Pixel R G B+ +3 16⋅

------------------------=

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor28

Page 29: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

Font Format

For the 8x15 font, 8 times 2 = 16 bytes are used to store each character:

Byte

0 1 2 3 4

0

Bit

1

2

3

4

5

6

7

0x00 0x42 0x7F 0x40 0x00

Figure 15. Number “1” in FONT 5x7 Format

const char FONT8X15 [][8][2] = {.....................{ {0x00, 0x00}, {0x04, 0x08}, {0x06, 0x08}, {0xFF, 0x0F}, {0xFF, 0x0F}, {0x00, 0x08}, {0x00, 0x08}, {0x00, 0x00} } , // 1.....................}

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor 29

Page 30: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

Font Format

Byte

0 2 4 6 8 10 12 14

0

Bit

1

2

3

4

5

6

7

0x00 0x04 0x06 0xFF 0xFF 0x00 0x00 0x00

Byte

1 3 5 7 9 11 13 15

0

Bit

1

2

3

4

5

6

7

0x00 0x08 0x08 0x0F 0x0F 0x08 0x08 0x00

Figure 16. Number “1” in FONT8x15 Format

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor30

Page 31: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

Conclusion

7 ConclusionThe provided documentation and software show how to control an OLED display with an HCS08 microcontroller, even with a limited amount of memory or GPIOs. The software can be used as the basis for other projects and further enhancements, such as:

• Support for monochrome (1bpp) OLED displays• Support for full-color OLED displays• Support for software SPI or parallel interface• Scalable fonts• Use of power-down sequence (controlled shut down)• Implementation of a screen saver• Power-consumption optimization• Implementation of drawing functions, for example, lines, rectangulars, etc.(requires sufficient

amount of RAM memory)• Use of compressed storage of data to enhance memory efficiency• Utility to generate fonts

More information on how to use an OLED in a real-world application can be found on the OSRAM Pictiva website (see Section 8, “References”).

For more information on CodeWarrior tools, see Section 8, “References”.

To get to a small memory footprint, some specific actions were incorporated (the storage of the Freescale Logo image). Only the logo itself was stored and not the surrounding background. Like this the size of the bitmap could be reduced by 37.5% from 4096 bytes (128 x 64 x 4 Bit) to 2560 bytes (128 x 40 x 4 Bit).

A second method used for the push buttons (Figure 11) is the ability to “darken” a bitmap during runtime when it is drawn (OLED_DrawImage function — see Table 9). Like this, the storage of two images—button released and button pressed—can be reduced to only one image. This saves 258 bytes (50% reduction).

Table 10 summarizes the memory consumption for the example applications. This differences are mainly caused by demonstration functionalities.

Table 10. Memory Consumption Overview

MC9S08QG8 MC9S08AW60

Images 3912 bytes 5260 bytes

Fonts 1995 bytes 1995 bytes

Text 187 bytes 134 bytes

Program 1951 bytes 1987 bytes

Flash total 8045 bytes 9376 bytes

RAM <100 bytes <100 bytes

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor 31

Page 32: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

References

8 References Further details can be found in the following documentation

• MC9S08QG8 Data Sheet• MC9S08AW60 Advanced Information Data Sheet• SSD0323 Data sheet (128x80, 16 gray scale dot matrix controller)

Useful web sites:• Freescale website http://www.freescale.com• OSRAM Pictiva website http://www.pictiva.com• Wikipedia website http://en.wikipedia.org/wiki/Oled• OLED Information website http://www.oled-info.com

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor32

Page 33: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

References

Appendix A OLED Daughter Card

A.1 Schematics

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor 33

Page 34: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

References

A.2 Layout

Figure 17. Placement

Figure 18. Solderstop Mask (Top)

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor34

Page 35: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

References

Figure 19. Copper (Top)

Figure 20. Copper (Bottom)

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor 35

Page 36: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

References

Figure 21. Solderstop Mask (Bottom)

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor36

Page 37: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

References

A.3 OLED Daughter Card BOM (Bill of Materials)

Table 11. OLED Daughter Card Bill of Materials

Quantity Reference Description Supplier PartNo. Supplier

1 U1 TPS7634ID (Texas Instruments)IC, DC/DC 120 mA, 12 V

SMD-SOIC8

8458111 Farnell

2 C1, C2 Ceramic Capacitor4.7 μF 6.3 V 20%

SMD–0805

9227857 Farnell

1 C3 Tantal Capacitor4.7 μF 16 V 20%

SMC–A

197269 Farnell

1 C4 Tantal Capacitor10 μF 16 V 20%

SMC–B

498737 Farnell

2 C5, C6 Tantal Capacitor33 μF 16 V 10%

SMC–D

757858 Farnell

1 C7 Ceramic Capacitor47pF 50 V 10%

SMD–0603

722042 Farnell

1 C8 Ceramic Capacitor1 pF 50 V 10%

SMD–0603

721840 Farnell

1 D1 Schottky DiodeMBRA130LT3 ONSEMI

SMD–SMA (DO–214AC)

3004120 Farnell

1 J1 PinHeader 2x160.1 inch pitch

9729070 Farnell

1 J2 PinHeader 2x200.1 inch pitch

9729070 Farnell

1 J3 FCB Flex 30 pin socket0.5 mm pitch

SFV30R1–ST FCI

1 L1 Inductor 15 μH, max. 850 mA, 0.15 ΩPanasonic ELL6RH150M

3837403 Farnell

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor 37

Page 38: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

References

1 LED1, LED2 LED greenlow powerSMD–ChipLED 0603

8554609 Farnell

1 R1 Resistor 820 kΩ, 5%, 0.1 WSMD–0805

9334920 Farnell

1 R2 Resistor 3 kΩ, 5%, 0.1 WSMD–0805

9334319 Farnell

1 R3 Resistor 330 Ω, 5%, 0.1 WSMD–0805

9334351 Farnell

Table 11. OLED Daughter Card Bill of Materials (continued)

Quantity Reference Description Supplier PartNo. Supplier

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor38

Page 39: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

References

A.4 DEMO9S08QG8 Board

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor 39

Page 40: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

References

A.5 DEMO9S08AW60 Board5 5

4 4

3 3

2 2

1 1

DD

CC

BB

AA

VIN

_F RE

SE

T_B

BKG

DR

ES

ET_

B

EXTA

L

XTAL

XTAL

_R

EXTA

L_R

RE

SE

T_B

BKG

D

P3_3

V

P_EX

T_5V

P_EX

T_5V

P_IO

_5V

VD

D_5

V

VD

D_5

V

VCC

_TG

T_5V

VC

CV

CC

_3V

VD

D

P3_3

V

VD

D

VD

D

VD

DV

DD

VD

D

Dra

win

g Ti

tle:

Siz

eD

ocum

ent N

umbe

rR

ev

Dat

e:S

heet

of

Page

Titl

e:

PD

F: S

PF-

2080

5 S

OU

RC

E: S

CH

-208

05B

DE

MO

9S08

AW

60

C

Thur

sday

, Sep

tem

ber 2

2, 2

005

POW

ER, C

LOC

K, A

ND

RES

ET

35

Dra

win

g Ti

tle:

Siz

eD

ocum

ent N

umbe

rR

ev

Dat

e:S

heet

of

Page

Titl

e:

PD

F: S

PF-

2080

5 S

OU

RC

E: S

CH

-208

05B

DE

MO

9S08

AW

60

C

Thur

sday

, Sep

tem

ber 2

2, 2

005

POW

ER, C

LOC

K, A

ND

RES

ET

35

Dra

win

g Ti

tle:

Siz

eD

ocum

ent N

umbe

rR

ev

Dat

e:S

heet

of

Page

Titl

e:

PD

F: S

PF-

2080

5 S

OU

RC

E: S

CH

-208

05B

DE

MO

9S08

AW

60

C

Thur

sday

, Sep

tem

ber 2

2, 2

005

POW

ER, C

LOC

K, A

ND

RES

ET

35

7V t

o 12

V CE

NTER

POS

ITIV

E

D7

SML-

LXL1

206G

CD

7SM

L-LX

L120

6GC

2 1

+C

5410

0uf

0.1

+C

5410

0uf

0.1

1 2

U50

ZR43

1U

50ZR

431

12

3

+C

5210

0uf

0.1

+C

5210

0uf

0.1

1 2

R50

10K

+/-5

%

R50

10K

+/-5

%

1 2

R54

510o

hm5%R

5451

0ohm

5%

12

C60

22pF

0.2

C60

22pF

0.2

1 2

J1 PJ-

002A

-SM

T

J1 PJ-

002A

-SM

T1 23

R59

10.0

K+/

-1%

R59

10.0

K+/

-1%

12

J6 DIP

14N

O_P

OP

J6 DIP

14N

O_P

OP

IO1

1

IO8

8

IO14

14

IO7

7

IO4

4IO

1111

IO2

2IO

33

IO5

5IO

66

IO9

9IO

1010

IO12

12IO

1313

+C

5010

0uf

0.1

+C

5010

0uf

0.1

1 2

Q51

IRLM

L640

2TR

PB

FQ

51IR

LML6

402T

RP

BF

1

32

C61

22pF

0.2

C61

22pF

0.2

1 2

R56

10M

+/-5

%

R56

10M

+/-5

%

12

R61

0ohm

5%R61

0ohm

5%

12

C63

0.1u

F0.

1

C63

0.1u

F0.

1

1 2R1

510

OH

M+/

-5%R1

510

OH

M+/

-5%

12

+C

5710

0uf

0.1

+C

5710

0uf

0.1

1 2

R70

10.0

K+/

-1%

R70

10.0

K+/

-1%

12

R3

510

OH

M+/

-5%R3

510

OH

M+/

-5%

12

C62

0.1u

F0.

1

C62

0.1u

F0.

1

1 2

C55

10uF

0.6

C55

10uF

0.6

12

C51

10uF

0.6

C51

10uF

0.6

1 2

Y1

4MH

z

Y1

4MH

z

12

+C

5810

0uf

0.1

+C

5810

0uf

0.1

1 2

Q50

MG

SF1

N02

LT1G

Q50

MG

SF1

N02

LT1G

1

23

JP4

HD

R_1

X1

NO

_PO

P

JP4

HD

R_1

X1

NO

_PO

P1

R53

820

+/-5

%

R53

820

+/-5

%

1 2

C59

10uF

0.6

C59

10uF

0.6

12

C53

0.1u

F0.

1

C53

0.1u

F0.

1

1 2

R4

10K

+/-5

%

R4

10K

+/-5

%

1 2

R2

1.5K

+/-5

%

R2

1.5K

+/-5

%

1 2

U2

LT10

86

U2

LT10

86V

IN3

AD

J1

VO

UT

2V

OU

T4

C56

10uF

0.6

C56

10uF

0.6

1 2

R7

10.0

K+/

-1%

R7

10.0

K+/

-1%

12

W2

6919

0-60

3W

269

190-

603

123

SW

3

SPST

PB

NO

SW

3

SPST

PB

NO

13 4

2

C65

0.1u

F0.

1

C65

0.1u

F0.

1

1 2

JP1

HD

R_1

X1

NO

_PO

P

JP1

HD

R_1

X1

NO

_PO

P

1

F50

0.75

A

F50

0.75

A

12

W1

6919

0-60

3

W1

6919

0-60

3

123

U1

LT10

86

U1

LT10

86

VIN

3

AD

J1

VO

UT

2V

OU

T4

W3

HD

R_2

X1W3

HD

R_2

X1

12

R57

0ohm

5%R57

0ohm

5%

12

R60

10.0

K+/

-1%

R60

10.0

K+/

-1%

12

1 O

F 2

U3A MC

9S08

AW

60

1 O

F 2

U3A MC

9S08

AW

60

BK

GD

/MS

56

RE

SE

T3

PTG

5/XT

AL57

PTG

6/E

XTA

L58

VD

D22

VS

S21

VS

S59

VR

EFH

54V

RE

FL55

VD

DA

D44

VS

SA

D45

D50

MB

RS

130L

D50

MB

RS

130L

21

J18

TSW

-103

-07-

S-D

NO

_PO

P

J18

TSW

-103

-07-

S-D

NO

_PO

P

12

34 6

5

OLED Display Driver for the HCS08 Family, Rev. 0

Freescale Semiconductor40

Page 41: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

5 5

4 4

3 3

2 2

1 1

DD

CC

BB

AA

PTE1

PTG

0

IRQ

PTG

4PT

B0PT

B1PT

B2PT

B3PT

B4PT

B5PT

B6PT

B7PT

C1

PTC

0

PTF

4

PTC

5

PTG

1

PTE3

PTE2

PTE5

PTE4

PTE7

PTE6

PTA0

PTA2

PTA1

PTA4

PTA6

PTA5

PTA3

PTA7

PTA7

PTA6

PTA5

PTA4

PTA3

PTA2

PTA1

PTA0

PTE7

PTE6

PTE5

PTE4

PTE3

PTE2

PTE1

PTE0

PTB7

PTB6

PTB5

PTB4

PTB3

PTB2

PTB1

PTB0

PTC

6PT

C5

PTC

4PT

C3

PTC

2PT

C1

PTC

0

PTD

7PT

D6

PTD

5PT

D4

PTD

3PT

D2

PTD

1PT

D0

PTF

7P

TF6

PTF

5P

TF4

PTF

3P

TF2

PTF

1P

TF0

PTG

4PT

G3

PTG

2PT

G1

PTG

0

PTG

2PT

G3

PTF

[0:7

]

PTB[

0:7]

PTA[

0:7]

PTG

[0:4

]

PTC

3

PTF

5

PTE[

0:7]

LT_P

TC4_

SW

PTE0

_TXD

PTE1

_RXD

PTF0

_SW

PTF1

_SW

PTC

4

PTD

4

PTD

5

PTD

3

PTD

0

PTD

1

PTD

2

PTD

1_SW

RE

SE

T_B

BKG

D

PTC

[0:6

]

PTE0

PTE1

PTF

0

PTF

1

PTF

2

PTF

3

PTD

4_SW

PTD

2_SW

PTD

0_SW

PTF2

_SW

PTF3

_SW

PTD

5_SW

PTC

4_SW

PTE0

PTD

6

PTD

7

PTD

6_SW

PTD

7_SW

PTD

3_SW

PTF

4PT

F4_S

W

PTF

5PT

F5_S

W

PTF

6PT

F6_S

W

PTF

7PT

F7_S

W

PTE0

PTE0

_SW

PTE1

PTE1

_SW

PTE2

PTE2

_SW

PTE3

PTE3

_SW

PTE4

PTE4

_SW

PTE5

PTE5

_SW

PTE6

PTE6

_SW

PTE7

PTE7

_SW

PTC

2_SW

PTC

6_SW

PTC

2PT

C6

RE

SE

T_B

BKG

D

P3_3

V

P_IO

_5V

VD

D

VD

D

VD

D

VD

D

VD

DVD

D

P3_3

V

VD

D

VD

D

VD

D

Dra

win

g Ti

tle:

Siz

eD

ocum

ent N

umbe

rR

ev

Dat

e:S

heet

of

Page

Titl

e:

PD

F: S

PF-

2080

5 S

OU

RC

E: S

CH

-208

05B

DE

MO

9S08

AW

60

C

Mon

day,

Sep

tem

ber 2

6, 2

005

USER

FUN

CTIO

NS

45

Dra

win

g Ti

tle:

Siz

eD

ocum

ent N

umbe

rR

ev

Dat

e:S

heet

of

Page

Titl

e:

PD

F: S

PF-

2080

5 S

OU

RC

E: S

CH

-208

05B

DE

MO

9S08

AW

60

C

Mon

day,

Sep

tem

ber 2

6, 2

005

USER

FUN

CTIO

NS

45

Dra

win

g Ti

tle:

Siz

eD

ocum

ent N

umbe

rR

ev

Dat

e:S

heet

of

Page

Titl

e:

PD

F: S

PF-

2080

5 S

OU

RC

E: S

CH

-208

05B

DE

MO

9S08

AW

60

C

Mon

day,

Sep

tem

ber 2

6, 2

005

USER

FUN

CTIO

NS

45

C7

0.1u

F0.

1

C7

0.1u

F0.

1

12

J17

HD

R_2

X1

J17

HD

R_2

X1

12

R97

510o

hm5%

R97

510o

hm5%

12

SW

8

SPST

PB

NO

SW

8

SPST

PB

NO

13 4

2

J29

HD

R_2

X1 J29

HD

R_2

X112

SW

7

SPST

PB

NO

SW

7

SPST

PB

NO

13 4

2

J12

HD

R_2

X1J1

2H

DR

_2X1

12

- +

V+ V-

U51

LMV

321D

BV

- +

V+ V-

U51

LMV

321D

BV

14

3

5 2

R89

0ohm

5%

R89

0ohm

5%

12

J9

HD

R_2

X1

J9

HD

R_2

X1

12

R81

0 ZE

RO

OH

M+/

-5%

NO

_PO

PR

810

ZER

O O

HM

+/-5

%

NO

_PO

P

1 2

2 O

F 2U

3B

MC

9S08

AW

60

2 O

F 2U

3B

MC

9S08

AW

60

IRQ

2

PTA

026

PTA

127

PTA

228

PTA

329

PTA

430

PTA

531

PTA

632

PTA

733

PTB

7/A

D1P

741

PTB

6/A

D1P

640

PTB

5/A

D1P

539

PTB

4/A

D1P

438

PTB

3/A

D1P

337

PTB

2/A

D1P

236

PTB

1/A

D1P

135

PTB

0/A

D1P

034

PTC

69

PTC

5/R

XD2

64PT

C4

1PT

C3/

TXD

263

PTC

2/M

CLK

62P

TC1/

SD

A1

61P

TC0/

SC

L160

PTD

7/A

D1P

15/K

BI1

P7

53P

TD6/

AD

1P14

/TP

M1C

LK52

PTD

5/A

D1P

1351

PTD

4/A

D1P

12/T

PM

2CLK

50P

TD3/

AD

1P11

/KB

I1P

647

PTD

2/A

D1P

10/K

BI1

P5

46P

TD1/

AD

1P9

43P

TD0/

AD

1P8

42

PTE0

/TXD

113

PTE1

/RXD

114

PTE2

/TPM

1CH

015

PTE3

/TPM

1CH

116

PTE

4/S

S1

17P

TE5/

MIS

O1

18P

TE6/

MO

SI1

19P

TE7/

SP

SC

K1

20

PTF0

/TPM

1CH

24

PTF1

/TPM

1CH

35

PTF2

/TPM

1CH

46

PTF3

/TPM

1CH

57

PTF4

/TPM

2CH

08

PTF5

/TPM

2CH

111

PTF6

12PT

F710

PTG

0/K

BI1

P0

23P

TG1/

KB

I1P

124

PTG

2/K

BI1

P2

25P

TG3/

KB

I1P

348

PTG

4/K

BI1

P4

49

R16

10.0

K+/

-1%

R16

10.0

K+/

-1%

12

J3

HD

R_2

X1

J3

HD

R_2

X1

12

R83

10.0

K+/

-1%

R83

10.0

K+/

-1%

12

SW

6

76SB

10ST

SW

6

76SB

10ST

1 2 3 4 5 109876

11121314151617181920

- +

V+ V-

U57

LMV

321D

BV

- +

V+ V-

U57

LMV

321D

BV

14

3

5 2

C75

0.1u

F0.

1

C75

0.1u

F0.

1

12

J30

HD

R_2

X1 J30

HD

R_2

X112

C68

0.1u

F0.

1

C68

0.1u

F0.

1

12

R80

10.0

K+/

-1%

R80

10.0

K+/

-1%

12

C69

0.1u

F0.

1

C69

0.1u

F0.

1

12

VR1

10K

+/-1

0%

VR1

10K

+/-1

0%

13

2

J13

HD

R_2

X1J1

3H

DR

_2X1

12

R82

47K

+/-5

%

R82

47K

+/-5

%

12

J23

HD

R_2

X1J2

3H

DR

_2X1

12

C74

0.1u

F0.

1

C74

0.1u

F0.

1

12

J24

HD

R_2

X1 J24

HD

R_2

X112

R79

10.0

K+/

-1%

R79

10.0

K+/

-1%

12

J5

HD

R_2

X1

J5

HD

R_2

X1

12

U4 MM

A62

60Q

_QFN

16

U4 MM

A62

60Q

_QFN

16

ST

12

XO

UT

15

YOU

T14

VD

D3

VS

S4

NC

11

NC

22

NC

35

NC

46

NC

57

NC

68

NC

79

NC

810

NC

911

NC

1013

NC

1116

VS

S17

U59

EL7

900I

LCZU59

EL7

900I

LCZ

VC

C1

EN

_B3

OU

T5

NC

4

GN

D1

2G

ND

26

R63

20K

+/-5

%

R63

20K

+/-5

%

12

SW

4

SPST

PB

NO

SW

4

SPST

PB

NO

13 4

2

J4

HD

R_2

X1

J4

HD

R_2

X1

12

J22

7887

50-1

J22

7887

50-1

594837261

M2

M1

J11

HD

R_2

X1J1

1H

DR

_2X1

12

R73

510o

hm5%

R73

510o

hm5%

12

J31

HD

R_2

X1 J31

HD

R_2

X112

C8

0.1u

F0.

1

C8

0.1u

F0.

1

12

R74

510o

hm5%

R74

510o

hm5%

12

C77

0.1u

F0.

1

C77

0.1u

F0.

1

12

J8

HD

R_2

X1

J8

HD

R_2

X1

12

U54 SN

74LV

C1T

45

U54 SN

74LV

C1T

45

VC

CA

1

GN

D2

A3

B4

DIR

5V

CC

B6

J14

HD

R_2

X1J1

4H

DR

_2X1

12

J2

HD

R_2

X1

J2

HD

R_2

X112

R71

510o

hm5%

R71

510o

hm5%

12

C67

0.1u

F0.

1

C67

0.1u

F0.

1

12

J34

HD

R_2

X1J3

4H

DR

_2X1

12

J20

HD

R_2

X1

J20

HD

R_2

X1

12

R91

1.0K

+/-5

%

R91

1.0K

+/-5

%

1 2

R65

47K

+/-5

%

R65

47K

+/-5

%

12

R94

510o

hm5%

R94

510o

hm5%

12

C66

0.1u

F0.

1

C66

0.1u

F0.

1

12

J10

HD

R_2

X1J1

0H

DR

_2X1

12

U58 MAX

3243

U58 MAX

3243

R5I

N8

R1I

N4

R2I

N5

R3I

N6

R4I

N7

R5O

UT

15R

4OU

T16

R3O

UT

17R

2OU

T18

R1O

UT

19R

2OU

TB20

T3IN

12T2

IN13

T1IN

14T1

OU

T9

T2O

UT

10T3

OU

T11

C1+

28

C1-

24

V+

27

V-

3C

2+1

C2-

2

INV

ALI

D21

FOR

CE

OFF

22FO

RC

EO

N23

VC

C26

GN

D25

C76

0.1u

F0.

1

C76

0.1u

F0.

1

12

R90

0ohm

5%

R90

0ohm

5%

12

LED

1

LED

_BA

R_1

0

LED

1

LED

_BA

R_1

0

1 2 3 4 5 6 7 8 9 101120 19 18 17 16 15 14 13 12

J7

HD

R_2

X1

J7

HD

R_2

X1

12

R15

10.0

K+/

-1%

R15

10.0

K+/

-1%

12

J32

HD

R_2

X1J3

2H

DR

_2X1

12

R72

510o

hm5%

R72

510o

hm5%

12

R77

1K+/

-5%

R77

1K+/

-5%1

2

J15

HD

R_2

X1J1

5H

DR

_2X1

12

J19

HD

R_2

X1

J19

HD

R_2

X1

12

R75

10.0

K+/

-1%

R75

10.0

K+/

-1%

12

R69

1K+/

-5%

R69

1K+/

-5%1

2

J25

HD

R_2

X1 J25

HD

R_2

X112

C5

0.1u

F0.

1

C5

0.1u

F0.

1

12

J26

HD

R_2

X1 J26

HD

R_2

X112

R95

510o

hm5%

R95

510o

hm5%

12

R8

10.0

K+/

-1%R8

10.0

K+/

-1%

12

SW

5

SPST

PB

NO

SW

5

SPST

PB

NO

13 4

2

R78

20K

+/-5

%

R78

20K

+/-5

%

12

J33

HD

R_2

X1J3

3H

DR

_2X1

12

J27

HD

R_2

X1 J27

HD

R_2

X112

R64

10.0

K+/

-1%

R64

10.0

K+/

-1%

12

J16

HD

R_2

X1

J16

HD

R_2

X1

12

J50

CO

NN

_SKT

_20X

2

J50

CO

NN

_SKT

_20X

2

12

34 6

5 78

910

1112

1314

1516

1718

1920

2122

2324

2526

2728

2930

3132

3334

3536

3738

3940

C9

0.1u

F0.

1

C9

0.1u

F0.

1

1 2

R96

510o

hm5%

R96

510o

hm5%

12

J28

HD

R_2

X1 J28

HD

R_2

X112

Page 42: OLED Display Driver for the HCS08 Family · OLED. The OLED daughter ca rd contains the interface, a DC/DC c onverter to provide the OLED voltage (12 V), and the actual OLED display

Document Number: AN3415Rev. 003/2007

How to Reach Us:

Home Page:www.freescale.com

E-mail:[email protected]

USA/Europe or Locations Not Listed:Freescale SemiconductorTechnical Information Center, CH3701300 N. Alma School RoadChandler, Arizona 85224+1-800-521-6274 or [email protected]

Europe, Middle East, and Africa:Freescale Halbleiter Deutschland GmbHTechnical Information CenterSchatzbogen 781829 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.HeadquartersARCO Tower 15F1-8-1, Shimo-Meguro, Meguro-ku,Tokyo 153-0064Japan0120 191014 or +81 3 5437 [email protected]

Asia/Pacific:Freescale Semiconductor Hong Kong Ltd.Technical Information Center2 Dai King StreetTai Po Industrial EstateTai Po, N.T., Hong Kong+800 2666 [email protected]

For Literature Requests Only:Freescale Semiconductor Literature Distribution CenterP.O. Box 5405Denver, Colorado 802171-800-441-2447 or 303-675-2140Fax: [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. 2007. 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.