C167CS-32FM drives a TFT display

Application Note, V 2.0, Feb. 2004
AP16018
C167CS-32F M
T F T g r a p h ic d is p l a y
C1 67C S-3 2FM
d r ive n
Micr ocon tro l lers
N e v e r
s t o p
t h i n k i n g .
by
C167CS-32FM
Revision History:
2004-02
V 2.0
Previous Version:
V 1.0
Page
Subjects (major changes since last revision)
All
Updated layout to Infineon Corporate Design, updated revision to 2.0,
Content unchanged!
Controller Area Network (CAN): License of Robert Bosch GmbH
We Listen to Your Comments
Any information within this document that you feel is wrong, unclear or missing at all?
Your feedback will help us to continuously improve the quality of this document.
Please send your proposal (including a reference to this document) to:
[email protected]
AP16018
TFT graphic display driven by C167CS-32FM
Table of Contents
Table of Contents
Page
1
1.1
1.2
General description ....................................................................................... 2
Picture format design flow ............................................................................. 2
Blockdiagramm of the display configuration .................................................. 2
2
2.1
2.2
2.3
2.4
2.5
Hardware description .................................................................................... 2
KITCON connector C167CS Starterkit .......................................................... 2
Connection of the TFT controller card BT 040 .............................................. 2
Description of the Latch between the BT 040 / (SN74LS245N) .................... 2
Hardware description EDTCA07QEF / General specification data................ 2
Hardware description EDTCA07QEF / Pixel arrangement regarding the data
representation ............................................................................................. 2
Hardwaredescription EDTCA07QEF / View description of the display
hardware ..................................................................................................... 2
Hardwaredescription Adresse space and Address range ............................. 2
2.6
2.7
3
3.1
3.2
3.3
3.4
3.5
3.6
3.7
3.8
3.9
3.10
Software ........................................................................................................ 2
Specialities regarding the Start UP file.......................................................... 2
First loop for the two 64 K data blocks in main.c ........................................... 2
Second loop for the two 64 K data blocks realizing the blinking mode in
main.c ......................................................................................................... 2
Generating a one second blinking time in main.c.......................................... 2
Timer 0 initialization routine........................................................................... 2
Timer 0 interrupt routine generating a one second blinking repeat frequency2
Main program ................................................................................................ 2
Locator Setting .............................................................................................. 2
BUSCON 4 Settings ...................................................................................... 2
Monitor Driver Settings.................................................................................. 2
4
4.1
4.2
4.3
4.4
4.5
Miscellaneous ............................................................................................... 2
Pictures of the TFT Driver Module BT 040 (Data Modul) .............................. 2
Picture of the TFT Display EDTCA07QEF (Data Modul)............................... 2
Picture of the Backlighting module CXA – 0256 (Data Module) .................... 2
Picture of the Starterkit C167CS-32FM (Phytec)........................................... 2
Timing calculations / read timing ................................................................... 2
Application Note
3
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
General description
1
General description
1.1
Picture format design flow
Realization of the Hardware and Software connectiong an C167CS-32FM starterkit to
an TFT display with a screen diagonal of 7“ for e.g. dashboard / cluster / multifuncional
terminal as an application example.
This application should show easily, how to realize the access to a TFT display by
using a C167CS-32FM and 8 bit non mux bus with 3 waitstates and asynchronous
ready via BUSCON 4.
A blinking oilcan is to be shown on the display as an alert announcement for the driver
in order to check his ammount of oil regarding the combustion engine.
The oilcan will be designed in COREL DRAW or an another suitable grafic design tool.
Figure 1
Oilcan in Corel Draw
Application Note
4
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
General description
Adapted to the pixel format with PAINT SHOP PRO 6 according the size of the used
display.
Figure 2
Changing the pixel format with Paint Shop Pro
Application Note
5
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
General description
Figure 3
Transformed into a WIN / OS bit map format
Application Note
6
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
General description
Formated finally with ULTRA EDIT into a readable array in a HEADER file for KEIL or
TASKING C166 Compiler.
Figure 4
Formated with Ultra Edit
Application Note
7
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
General description
The output file for a 480 * 234 * 3 dot matrix TFT display contains 128 Kbyte of data,
which are to be split into two arrays of 64 Kbyte each (max. size of a huge const array
is limited to 64 Kbyte).
Figure 5
The output file for a 480*234*3 dot matrix TFT display
Application Note
8
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
General description
Here you can see the a part of data regarding the nozzle of the oil can.
Figure 6
The nozzle of the oil can
Application Note
9
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
General description
1.2
Blockdiagramm of the display configuration
RD
Or Gate
SN
74LS32
WR
CXA-0256
Back lighting
unit
( Data Modul )
RES
V
c
c
Vcc
BIF CS WR RD
4K7
RDY
RDY
RES
18 Bbit Adress
Bus
CS 4
G
C167CS
Starterkit
Figure 7
A
8 Bbit
Data Bus
DIR
B
BT 040
TFT control
unit
( Data Modul )
8 Bit Latch
SN
74LS245
EDTCA07QE
F
TFT display
( Data Modul )
block diagram of the display configuration
Application Note
10
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Hardware description
2
Hardware description
2.1
KITCON connector C167CS Starterkit
KitCON interface connection – Connector to the BT 040 unit
Table 1
Pindescription C167CS-32FM to BT 040
PIN
Des
BT
040
PIN
Des
BT
040
PIN
Des
BT
040
PIN
Des
BT
040
1
Vcc
34
2
Vcc
34
3
GND
35
4
GND
35
5
D0
1
6
D2
3
7
D4
5
8
D6
7
9
D1
2
10
D3
4
11
D5
6
12
D7
8
A6
15
13
14
15
17
18
19
21
20
A0
9
25
A1
10
29
A8
17
33
A9
18
34
37
A16
25
38
39
40
42
43
44
41
22
16
A2
11
23
A4
13
24
26
A3
12
27
A5
14
28
A7
16
30
A10
19
31
A12
21
32
A14
23
A11
20
35
A13
22
36
A15
24
RES#
27/ NRES
45
RD
*1
46
47
48
49
WR
*1
50
51
52
53
54
55
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Application Note
CS4#
11
*1
56
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Hardware description
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
Application Note
12
RDY#
32/ NRDY
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Hardware description
Connection of a couple of neccessary signals
BIF (BT 040) go to Intel Mode -> Low -> GND via Pull Down resistor 10 KΩ
RES (BT 040) aktive connected -> Low -> GND vis Pull Down resistor 10 KΩ
CS (BT 040) aktive connected -> High -> via Portpin P 2.7 (SW enable TFT, no CS in
origin sense)
LCDCLK (BT 040) already in BT 040 generated, leave unconnected
RDY (BT 040) aktive connected -> Low -> GND via Pull Down resistor 10 KΩ
NRDY (BT 040) via Pull Up resistor 4,7 KΩ against Vcc
Connection CS 4# with RD# and WR# (C167CS-32FM) to RD# and WR# (BT 040)
Figure 8
Connection CS 4# with RD# and WR#
Application Note
13
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Hardware description
Connecting BT 040 to the PCB adapting unit
Flat cabel has to be adjusted with the right side regarding the dedicated connector,
otherwise short circuits over will be the consequence!
Figure 9
Connecfing BT 040
Note: Please connect the cable conclusive!
Application Note
14
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Hardware description
2.2
Connection of the TFT controller card BT 040
Table 2
Connection of the controller card
Pin
1
Function
D0
Description
Data bit 0, bi-directional
2
3
D1
D2
Data bit 1, bi-directional
Data bit 2, bi-directional
4
5
D3
D4
Data bit 3, bi-directional
Data bit 4, bi-directional
6
7
D5
D6
Data bit 5, bi-directional
Data bit 6, bi-directional
8
9
D7
A0
Data bit 7, bi-directional
Address bit 0, Input
10
11
A1
A2
Address bit 1, Input
Address bit 2, Input
12
13
A3
A4
Address bit 3, Input
Address bit 4, Input
14
15
A5
A6
Address bit 5, Input
Address bit 6, Input
16
17
A7
A8
Address bit 7, Input
Address bit 8, Input
18
19
A9
A10
Address bit 9, Input
Address bit 10, Input
20
21
A11
A12
Address bit 11, Input
Address bit 12, Input
22
23
A13
A14
Address bit 13, Input
Address bit 14, Input
24
25
A15
A16
Address bit 15, Input
Address bit 16, Input
26
27
RES
NRES
28
29
CS
RD
Application Note
Reset, Input, High-active
Reset; Input, Low-active
Chip Select, Input, Low-active
Read Signal, Input, (see setting Bus-Interface)
15
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Hardware description
30
WR
31
32
RDY
NRDY
33
34
BIF
VCC
35
36
GND
LCDCLK
2.3
Figure 10
Write Signal, Input, Low-active, (see setting BusInterface)
Ready Signal, Output, High active
Ready Signal, Output, Low active, Open Collector
Bus-Interface, Input, (see setting Bus-Interface)
Power Supply, +5V
Ground
LCD-Clock, Input / Output
Attention: Use only when the oscillator is not equipped!
(see LCD-Clock)
Description of the Latch between the BT 040 / (SN74LS245N)
The Latch between the BT 040 / SN74LS245N
Application Note
16
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Hardware description
2.4
Hardware description EDTCA07QEF / General specification
data
Table 3
General specification data EDTCA07QEF
Characteristic Item
1. Display technology
Specification
a-Si active-matrix
2. Display mode
1)
3. Module outer dimension
NW (normally white)
170.0 (W) * 106.8 (H) * 8.3(D) mm
4. Effective display area
5. Number of dots
155.52 * 87.28 mm
480 (W) * 3 (RG3) * 234 (H)
6. Color-filter-array
7. Weight
RGB vertical stripe
205 ± 10g
8. Backlight
9. Front surface treatment
CCFL with 3 wave-length spectrum straight type 2
AG coat (Haze ratio 12%) (with WV film)
10. Polarizer protective sheet
11. Appearance
None
There are no remarkable defects
12. Metal frame condition
Not be connected to inner circuit
1)
Detailed dimensions are shown per attached drawing
Application Note
17
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Hardware description
2.5
Figure 11
Hardware description EDTCA07QEF / Pixel arrangement
regarding the data representation
Pixel arrangement and I/O interface pin assignment
Application Note
18
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Hardware description
2.6
Figure 12
Hardwaredescription EDTCA07QEF / View description of the
display hardware
Description of the display hardware
Application Note
19
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Hardware description
2.7
Hardwaredescription Adresse space and Address range
The TFT Display start address should be 10:0000 h, the address range 128 Kbyte.
The BUSCON 4 Register will be used, because it is freely usable on the Starterkit. The
BT 040 should be accessed more or less like a static RAM with asyncronous ready.
The resulting window size is given with RGSZ = 5 (Manual C167CS V2.0 Page 8-21).
ADDRSEL4_RGSZ
SET
5
The remaining number of address lines are A23 to A17.
Table 4
Conversion Hex -> Decimal
1h
0h
0h
0h
0h
0h
0001
0000
0000
0000
0000
0000
A23
A19
A15
A11
A7
A3
Bit field RGSZ
0000
0001
Resulting Window
Size
4 KBytes
8 KBytes
Relevant Bits (R) of Start Addr. (A12
…)
R R R R R R R R R R R R
R R R R R R R R R R R x
0101
128 KBytes
R R R R R R R x
A23 A21 A19 A17
x x
A15
x x
A13
1001
1010
2 MBytes
4 MBytes
R R R x
R R x x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
1011
11xx
8 MBytes
Reserved
R x
x
x
x
x
x
x
x
x
Application Note
20
x
x
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Hardware description
So we have to enter the below mentioned value into the RGSAG area.
SFR (FE1EH / CF H)
ADDRSEL4
15
14
13
12
11
10
9
8
7
6
[Reset Value: 0000H]
5
4
3
RGSAD
2
0
0
1
0
0
0
RGSZ
rw
0
1
rw
0
0
0
0
0
0
The entire value inserted into ADDRSEL is 1005h.
The values which are to be inserted into BUSCON 4 you can see below (2 Waitstates
asyncronous ready, bus typ -> 8 bit non mux).
; Bus Configuration Register 4
BUSCON4_ALECTL4
SET
0
BUSCON4_BTYP
SET
0
BUSCON4_BUSACT4
SET
1
BUSCON4_CSREN4
SET
0
BUSCON4_CSWEN4
SET
0
BUSCON4_MCTC
SET
13
BUSCON4_MTTC4
SET
0
BUSCON4_RDYEN4
SET
1
BUSCON4_RWDC4
SET
0
(S- 8-18 Manual V2.0 C167CR)
BUSCON4
Bus Control Register 4
15
14
CSW CSR
EN4 EN4
rw
rw
13
12
11
-
RDY
EN4
-
-
rw
-
Application Note
SFR (FF1A H / 8D H)
10
9
BUS ALE
ACT CTL
4
4
rw
rw
8
7
-
BTYP
-
rw
21
6
[Reset Value: 0000H]
5
4
MTT RWD
C4 C4
rw
rw
3
2
1
0
MCTC
rw
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Software
3
Software
3.1
Specialities regarding the Start UP file
The PLL factor has to be arranged by implementing a sequence concerning the
RSTCON register.
Figure 13
Application Note
22
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Software
Figure 14
Application Note
23
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Software
3.2
First loop for the two 64 K data blocks in main.c
Figure 15
Application Note
24
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Software
Figure 16
Application Note
25
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Software
3.3
Second loop for the two 64 K data blocks realizing the blinking
mode in main.c
Figure 17
Application Note
26
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Software
Figure 18
Application Note
27
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Software
3.4
Generating a one second blinking time in main.c
Figure 19
Application Note
28
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Software
3.5
Timer 0 initialization routine
//**********************************************************************
// @Module
CC1
// @Filename
CC1_Int .C
//
//---------------------------------------------------------------------// @Controller
Infineon C167CS-32FM
//
// @Compiler
KEIL C166
//**********************************************************************
// @Capture Compare Channel / Timer 0 initialization
//================================================================
// Timer 0
:
Initialisierung 10 ms Interrupt
// Goal
:
Key active checking
// Date cahange :
21.08.00
// Name
:
Kattw.
//================================================================
//**********************************************************************
//**********************************************************************
// @Project Includes
//**********************************************************************
#include "MAIN.H"
//**********************************************************************
//* definition of the portpin for the testpin 1 KHz P3.8
//**********************************************************************
sbit
sbit
P3_8 = P3^8;
DP3_8 = DP3^8;
// USER CODE END
//**********************************************************************
// @Global Variables
//**********************************************************************
//**********************************************************************
// @Function
void CC1_Initialization(void)
Application Note
29
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Software
//
//---------------------------------------------------------------------// @Description
This function initializes the CAPCOM 1
//
component.It effects all necessary configurations
//
of the SFR, depending on the selected operating
//
mode. The configuration determines whether the
//
CAPCOM interrupts are to be released, and the
//
priority of the released interrupt.
//
//---------------------------------------------------------------------// @Returnvalue
none
//
//---------------------------------------------------------------------// @Parameters
none
//
//---------------------------------------------------------------------// @Date
02.10.00 20:40:18
//
//**********************************************************************
void CC1_Timer0_Initialization(void)
{
T01CON = 0x0007;
//********************************************************************
//* reloadvalue defined that 1 KHz that Timer 0 interrupt willbe
//* called every 1 ms
//* ---- Timer 0 Configuration ------------//* timer 0 works in timer mode
//* prescaler factor is 1024
//********************************************************************
T0
T1
T0REL
T1REL
=
=
=
=
0xFFF6;
0x0000;
0xFFF6;
0x0000;
//
//
//
//
load
load
load
load
timer
timer
timer
timer
0
1
0
1
register
register
reload register
reload register
//********************************************************************
//* enable timer 0 interrupt
//* timer 0 interrupt priority level(ILVL) = 6
//* timer 0 interrupt group level (GLVL) = 3
//********************************************************************
T0IC = 0x005B;
//********************************************************************
//* P2.0 is used as output for CAPCOM channel 0
Application Note
30
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Software
//* P2.8 is used as output for CAPCOM channel 8
//* initializes port 2 for the capture/compare channels
//********************************************************************
P2
|= 0x0000;
ODP2 |= 0x0000;
DP2 |= 0x0101;
//
//
//
set port data register
set port open drain control register
set port direction register
//********************************************************************
//* ---- Capture Compare Channel 0 ------------//* compare mode 3: set output pin CC0IO on each match
//* CC0 allocated to timer T0
//********************************************************************
CCM0 = 0x0007;
CC0 = 0x0000;
// load CC0 register
//********************************************************************
//* ---- Capture Compare Channel 8 ------------//* compare mode 1: toggle output pin CC8IO on each match
//* CC8 allocated to timer T0
//********************************************************************
CCM2 = 0x0005;
//********************************************************************
//* Comparevalue of CC8 will realize 50 % duty cycle
//********************************************************************
CC8
= 0xFFFA;
// load CC8 register
//********************************************************************
//* timer 0 is running
//********************************************************************
T01CON |= 0x0040;
//********************************************************************
//* define P3.8 as an output an set portpin to high
//********************************************************************
P3_8
DP3_8
= 1;
= 1;
//
//
set port data register for Test Pin
set port direction register for Test Pin
}
Application Note
31
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Software
3.6
Timer 0 interrupt routine generating a one second blinking
repeat frequency
//**********************************************************************
// @Function
void Timer 0 Interrupt(void) interrupt T0INT
//
//---------------------------------------------------------------------//**********************************************************************
// @Timer 0 Interrupt routine
//================================================================
// Timer 0
:
Initialisierung 10 ms Interrupt
// Goal
:
Key active checking
// Date cahange :
21.08.00
// Name
:
Kattw.
//================================================================
//**********************************************************************
//**********************************************************************
//* includefiles
//**********************************************************************
#include "MAIN.H"
#include "CC1.H"
//**********************************************************************
//* definition of the portpin for the testpin 1 KHz P3.8
//**********************************************************************
sbit
P3_8
= P3^8;
//**********************************************************************
//* externla data variables
//**********************************************************************
extern unsigned int TimeBase;
//**********************************************************************
//* interrupt routine Timer 0
//**********************************************************************
void Timer_0_Interrupt(void) interrupt T0INT
{
//********************************************************************
//* increment time variable
//********************************************************************
Application Note
32
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Software
TimeBase++;
// will be used in main
//**********************************************************************
//* toggle P3.8 with an frequency of 1 KHz
//********************************************************************
P3_8 = !P3_8;
// test rectangle 1 KHz
}
Application Note
33
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Software
3.7
Main program
//**********************************************************************
// @Module
Main
// @Filename
MAIN.C
// @Project
TFT V 1.0
//---------------------------------------------------------------------// @Controller
Infineon C167CS-32FM DA Step
//
// @Compiler
KEIL C166 V2.05
//
// @Description
This file contains the Project initialization
function.
//
//---------------------------------------------------------------------// @Date
29.09.00
//
//**********************************************************************
//**********************************************************************
[email protected]
//*
//*
//* BUSCON 4 will be used for addressing TFT with asynchronous ready,
//* 3 waitstates, 128 KByte Adressraum
//*
//**********************************************************************
//*/
//**********************************************************************
// @Project Includes
//**********************************************************************
#include "MAIN.H"
//**********************************************************************
//* external background picture arrays
//**********************************************************************
extern unsigned char const Array1[118][480];
extern unsigned char const Array2[118][480];
//**********************************************************************
// @Global Variables
//**********************************************************************
Application Note
34
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Software
unsigned char xhuge TFT_RAM [0x20000];
unsigned char xhuge *pointer_anz;
unsigned char *pointer_bild;
unsigned int
TimeBase = 0;
//**********************************************************************
// @Test Variables
//**********************************************************************
sbit
sbit
P3_8 = P3^8;
DP3_8 = DP3^8;
sbit
sbit
P2_8 = P2^8;
DP2_8 = DP2^8;
sbit
sbit
P2_0 = P2^0;
DP2_0 = DP2^0;
sbit
sbit
P2_1 = P2^1;
DP2_1 = DP2^1;
//**********************************************************************
// @Project initialization
//**********************************************************************
void Project_Init(void)
{
//********************************************************************
// @Timer 0 initialization
//================================================================
// Timer 0
:
Initialisierung 10 ms Interrupt
// Goal
:
Key active checking
// Date cahange :
21.08.00
// Name
:
Kattw.
//================================================================
//********************************************************************
CC1_Timer0_Initialization();
P2_8
DP2_8
= 0;
= 1;
//
//
set port data register
set port data register
//********************************************************************
// @global interrupt enable
//********************************************************************
Application Note
35
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Software
IEN = 1;
}
//**********************************************************************
// @Function
void main(void)
//
//================================================================
// Timer 0
:
Initialisierung 10 ms Interrupt
// Goal
:
adressing TFT display
// Date cahange :
21.08.00
// Name
:
Kattw.
//================================================================
//**********************************************************************
void main(void)
{
//********************************************************************
//* define variables for the loops
//********************************************************************
int row, coloumn;
Project_Init();
//********************************************************************
//* define the value for several portpins
//*******************************************************************
P2_0
P2_1
= 1;
= 1;
//
//
set port data register
set port data register
//********************************************************************
//* define the value for portdirection of several portpins
//********************************************************************
DP2_0
DP2_1
= 0;
= 1;
//
//
set port data register
set port data register
//********************************************************************
//* define the value for several portpins
//* only siple version of testing without debruise function
//********************************************************************
while (P2_0 == 1)
{
Application Note
// Tastenabfrage P2.0
36
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Software
P2_1 = 1;
}
P2_1 = 0;
// Taste gedrückt ?
// Taste wurde gedrückt !
//******************************************************************
//* Initialize first 117 Rows of the 7" display
//* Initialize Pointer picture
//******************************************************************
pointer_anz = &TFT_RAM[0];
pointer_bild = &Array2[117][480];
//******************************************************************
//* loop for the first 117 rows
//* reason : C-Compiler allows only HCONST of max. 64 K Byte,
//* so we have to split the 128 K Byte of display data into 2
//* blocksof 64 K Byte each
//******************************************************************
for(row = 117 ; row >= 1 ; row--)
{
for(coloumn = 480 ; coloumn >=1 ; coloumn--)
{
*pointer_anz++ = Array2[row][coloumn];
}
}
//******************************************************************
//* Initialize second 117 Rows of the 7" display
//* Initialize Pointer picture
//******************************************************************
pointer_anz = &TFT_RAM[56160];
pointer_bild = &Array1[117][480];
//******************************************************************
//* loop for the second 117 rows
//* reason : C-Compiler allows only HCONST of max. 64 K Byte,
//* so we have to split the 128 K Byte of display data into 2
//* blocks of 64 K Byte each
//******************************************************************
for(row = 117 ; row >= 1 ; row--)
{
for(coloumn = 480 ; coloumn >= 1 ; coloumn--)
Application Note
37
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Software
{
*pointer_anz++ = Array1[row][coloumn];
}
}
//******************************************************************
//* loop for the second 117 rows begins here / blinking mode
//******************************************************************
while(1)
{
//****************************************************************
//* wait for one second
//* increment will be done in Timer 0 interrupt routine
//* every 1 ms
//****************************************************************
TimeBase = 0;
while (TimeBase <= 1000);
//****************************************************************
//* Initialize first 117 Rows of the 7" display
//* Initialize Pointer picture
//****************************************************************
pointer_anz = &TFT_RAM[56160];
pointer_bild = &Array1[117][480];
//****************************************************************
//* loop for the last 117 rows refers to blinking mode
//* clear screen part
//*
//****************************************************************
for(row = 117 ; row >= 1 ; row--)
{
for(coloumn = 480 ; coloumn >= 1 ; coloumn--)
{
*pointer_anz++ = '×';
// reserve 'Ô';0x00;
}
}
//****************************************************************
//* wait for one second
Application Note
38
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Software
//* increment will be done in Timer 0 interrupt routine
//* every 1 ms
//****************************************************************
TimeBase = 0;
while (TimeBase <= 1000);
//****************************************************************
//* Initialize second 117 Rows of the 7" display
//* Initialize Pointer picture
//****************************************************************
pointer_anz = &TFT_RAM[56160];
pointer_bild = &Array1[117][480];
//****************************************************************
//* loop for the last 117 rows refers to blinking mode
//* show oilcan
//****************************************************************
for(row = 117 ; row >= 1 ; row--)
{
for(coloumn = 480 ; coloumn >= 1 ; coloumn--)
{
*pointer_anz++ = Array1[row][coloumn];
}
}
}
while(1);
}
Application Note
39
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Software
3.8
Figure 20
Locator Setting
Locator Setting
Application Note
40
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Software
3.9
BUSCON 4 Settings
Figure 21
Application Note
41
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Software
Figure 22
Application Note
42
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Software
3.10
Figure 23
Monitor Driver Settings
Monitor Driver Settings
Application Note
43
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Miscellaneous
4
Miscellaneous
4.1
Pictures of the TFT Driver Module BT 040 (Data Modul)
This Modul delivers the necesary analogue Supply Voltages.
Figure 24
TFT Driver Module BT 040
Application Note
44
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Miscellaneous
4.2
Picture of the TFT Display EDTCA07QEF (Data Modul)
The picture with the blinking oilcan as an alarm announcement for the car driver. The
oilcan is drawn with Corel Draw, rearranged with Paint Shop Pro and finally confiured
into a sufficient data format by using Ultra Edit. This data are adapted ito two arrays of
64 Kbyte each. A SAK C167CS-32FM transfers the data to the TFT control unit of the
display (BT 040).
Figure 25
The TFT Display EDTCA07QEF
Application Note
45
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Miscellaneous
4.3
Figure 26
4.4
Figure 27
Picture of the Backlighting module CXA – 0256 (Data Module)
Backlighting module CXA - 0256
Picture of the Starterkit C167CS-32FM (Phytec)
Starterkit C167CS-32FM
Application Note
46
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Miscellaneous
4.5
Timing calculations / read timing
Consideration of the BT 040 Read Timings.
Figure 28
READ-Zyklus, Intel-Interface
Note: RES = Low, NRES = High
Table 5
Timing
Description
Symbol
Minimal
Typical
Maximal
Unit
RD
access time
Data
setup time
Data
hold time
Ready
hold time
tRD
150
300
1000
ns
tDS
0
-
-
ns
tDH
0
-
30
ns
tWH
0
-
30
ns
tHW
100
-
-
ns
RD
repeat time
Application Note
47
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Miscellaneous
Length of Read Signal in reading mode
The length of the low-phase of the RD# signal will be controlled inevitablen via the
READY# signal. At the earliest after 160 ns, and not later than 1 us the BT-040
delivers the valid data. From the viewpoint of the C167CS only that time has to be
bypassed by waitstates the BT-040 delivers a valid READY# signal. The first
assessment of the READY# input will be done (non-extended ALE) with the first rising
CLKOUT slope during a bus cycle.
Case 1: previous bus cycle has been no access to the BT-040: RDY or NRDY is stable
at status 'not ready'.
⇒ no WS necessay
Case 2: previous bus cycle has been an access to the BT-040 : RDY or NRDY is
stable again with status 'not ready' max. 30 ns after the last access.
⇒ 1 memory cycle time waitstate or tristate waitstate or extended ALE necessary @
20 MHz/non-mux bus.
As well the 'RD repeat time' will be min. 100 ns, so that in case of two each other
following accesses @ 20 MHz/Non-Mux bus a tristate waitstate or extended ALE is to
be used and R/W delay must not be disabled (bit RWDCx has to stay = 0).
Note: It is to be considered that the data driver of the BT 040 could be active 30
ns after the rising edge of he RD# signal (will be nor problem if R/W delay
is active (t 20/T21)).
Lenght of the write signal in write cycle
The lenght of the low phase of the WR# signal will be controlled inevitable by the
READY# signal. At the earliest after 130 ns an at the latest after 600 ns the BT-040
has taken over the write data. Regarding the consideration of the waitstates which will
be necessary during a write access in a roughly translated the same arguments are
valid as in the read cycle (s.o.).
Which slope is the reference slope?
Reference slope is the CLKOUT; in best case the rising CLKOUT slope corresponds to
the falling ALE slope.
t 37 = 2 TCL + 15, to enshure a secure recognition.
Window length is specified by t 58, t 59.
Application Note
48
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Miscellaneous
Change of the sample point as a function of the number of cycle time
waitstates?
The first relevant sample point will be shifted with n Waitstates (n = 0..7) by precise n *
2TCL.
The lenght of the window in relation to the rising edge of CLKOUT remains unchanged
specified by t 58, t 59.
When ready will be recognized?
Generally valid is: will READY# be recognized as ‚high‘ during the first relevant sample
point, wait states will be implemented as long as RAEDY# will be recognized as ‚low‘.
After that the bus cycle with the next but one falling CLKOUT slope will be stopped.
Is a tristate waitstate to be inserted?
A tristate waitstate is to be inserted on account of read/write repeat time of the BT-040.
Is there any code to be executed out of the internal flash by the SAK C167CS32FM during waiting on the low signal of the ready pin?
Two cases are to be considered:
• Reading operands: C167CS has to wait until valid data are available. Reason: The
µC needs the data for further instruction execution.
• Writing operands: write back of results can be done in parallel to the execution of
further instructions out of the internal flash. The C167CS has to wait if he needs
further operands from te external bus or from XBUS peripherals.
Is a tristate waitstate necesary?
A tristate waitstate will be necessary regarding the read/write repeat time of the BT040 (100 ns).
Further the consideration of the ready timings of the C167CS-32FM data sheet SAK
C167CS-32FM from 3 / 99.
Application Note
49
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Miscellaneous
Figure 29
CLKOUT and READY
And the appropriate times: Time after rising edge clockout = t37 + t 59 = 2 TCL + t 58 = 54
ns.
Application Note
50
V 2.0, 2004-02
AP16018
TFT graphic display driven by C167CS-32FM
Miscellaneous
Table 6
CLKOUT and READY
(Operation Conditions apply)
Parameter
Symbol
Max. CPU
Clock = 25 MHz
min
max
Variable CPU
Clock 1 / 2 TCL = 1
to 25 MHz
min
max
CLKOUT cycle time
t29
CC
40
40
2 TCL
2 TCL
ns
CLKOUT high time
t30
CC
14
-
TCL – 6
-
ns
CLKOUT low time
t31
CC
10
-
TCL – 10
-
ns
CLKOUT rise time
t32
CC
-
4
-
4
ns
CLKOUT fall time
t33
CC
-
4
-
4
ns
CLKOUT rising edge
to ALE falling edge
Synchronous
READY setup time
to CLKOUT
Synchronous
READY hold time
after CLKOUT
t34
CC
0 + IA
10 + IA
0 + IA
10 + IA
ns
t35
SR
14
-
14
-
ns
t36
SR
4
-
4
-
ns
Asynchronous
READY low time
1)
Asynchronous
READY setup time
1)
Asynchronous
READY hold time
2)
Asynchronous
READY hold time
after RD , WR high
(Demultiplexed Bus)
t37
SR
54
-
-
ns
t58
SR
14
-
2 TCL +
t58
14
-
ns
t59
SR
4
-
4
-
ns
t60
SR
0
0 + 2tA
+ tC + tF
0
TCL –
20 +
2tA + tC
2)
+ tF
ns
2)
Unit
1)
These timings are given for test purposes only, in order to assure recognition at a specific clock edge.
2)
Demultiplexed bus is the worst case. For multiplexed bus 2TCL are to be added to the maximum values.
This adds even more time for deactivating READY .
The 2tA and tC refer to the next following bus cycle, tF refers to the current bus cycle.
The maximum limit for t60 must fullfilled if the next following bus cycle is READY controlled.
Application Note
51
V 2.0, 2004-02
http://www.infineon.com
Published by Infineon Technologies AG
Similar pages