Motorola reserves the right to make changes without further notice to any product herein to improve
reliability, function, or design. Motorola does not assume any liability arising out of the application or
use of any product, circuit, or software described herein; neither does it convey any license under its
patent rights nor the rights of others. Motorola 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 life, or for any other application in which the failure of the Motorola product could create a
situation where personal injury or death may occur. Should Buyer purchase or use Motorola products for any
such intended or unauthorized application, Buyer shall indemnify and hold Motorola 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 Motorola was
negligent regarding the design or manufacture of the part. Motorola and theare registered trademarks
of Motorola Ltd.
3-6Possible Configuration of FLASH Memories....................................................3-20
3-7Signal Assignment for Touch Panel Controller.................................................3-24
3-8Pin Assignments of P7.....................................................................................3-26
3-9Pin Assignment of P9.......................................................................................3-27
Freescale Semiconductor, I
MOTOROLAM68VZ328ADS USER’S MANUALvi
For More Information On This Product,
Go to: www.freescale.com
Page 7
Freescale Semiconductor, Inc.
SECTION 1
GENERAL INFORMATION
1.1 INTRODUCTION
The DragonBallTM-VZ (MC68VZ328) Application Development System (M68VZ328ADS) is
designed to supply users with an environment to develop MC68VZ328 based application
software. Moreover, this board can be used as a reference for real-life product design.
M68VZ328ADS provides several interface ports for application software and target board
debug purpose. This document will discuss the usage and system details of the
M68VZ328ADS.
1.2 FEATURES
• MC68VZ328 CPU
nc...
• Memory Subsystem
—4 MB FLASH
—8 MB SDRAM (Expandable to 16 MB)
• Debug ports
—Two RS232 serial ports interface to MC68VZ328 internal UARTs
—Direct logic analyzer interface to system bus
• LCD and Touch Panel Interface
—MC68VZ328 LCD interface
—Burr-Brown 12-bit touch panel controller ADS7843E available for pen input
•LEDIndicators
—Red LED for power
—Green LED for system heart beat
—Yellow LED for status of MC68VZ328 pin PD0
—Yellow LED for status of MC68VZ328 pin PD1
• Board operation mode support
—MC68VZ328 normal mode
—MC68VZ328 bootstrap mode
Freescale Semiconductor, I
• Debug Monitor
—MetroWerks Codewarrior Target Monitor using serial port
—SDS source-leveldebugger monitor by Software Development SystemInc. using se-
rial port
• Clock Source
—32.768KHz for MC68VZ328 internal PLL
• Power Supply
—3.0V - 3.3V main power supply
MOTOROLAM68VZ328ADS USER’S MANUAL1-7
For More Information On This Product,
Go to: www.freescale.com
Page 8
nc...
General Information
Freescale Semiconductor, Inc.
1.3 RELATED DOCUMENTATION
The following documents can be used as references when using M68VZ328ADS.
• MC68VZ328 User’s Manual
• MC68VZ328 Product Information
1.4 TECHNICAL SUPPORT
1.4.1 M68VZ328ADS
For getting the latest information, please visit our web page:
There are three source-level debuggers for DragonBallTM-VZ. The contact information is
listed below.
1. Metrowerks
http://www.metrowerks.com
2. Single Step Development
http://www.sdsi.com
3. Microtek SLD
http://www.microtekintl.com
Freescale Semiconductor, I
1-8M68VZ328ADS USER’S MANUALMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Page 9
nc...
Freescale Semiconductor, Inc.
SECTION 2
QUICK INSTALLATION GUIDE
2.1 OVERVIEW
This section provides a description of the evaluation module, requirements, quick installation and test information. Detailed information on the M68VZ328ADS design and operation
is provided in the remaining sections of this manual.
2.2 EQUIPMENTS REQUIRED
The following equipments are required to use with the M68VZ328ADS Application Development System, some of them are already bundled with the ADS package.
• Powersupply − 3.0V-3.3V,1500mA, with 2 mm female (inside positive)power connector
• RS-232cable(DB9maletoDB9female)
• IBMPC compatible computer (486 class or higher) runningWindows3.1 and DOS 6.0
(or higher), or Windows 95, with an RS-232 serial port capable of 9600-115200 bit per
second operation
2.3 INSTALLATION PROCEDURE
Pls. follow the procedure below to set up M68VZ328ADS.
1. Prepare the M68VZ328ADS board
2. Connect the M68VZ328ADS board to PC and power supply
3. Install software debugger
2.3.1 Prepare the M68VZ328ADS board
Locate the DIP switches on the M68VZ328ADS board and select appropriate monitor and
debug port for your debugger.
Figure2-2 shows thefactory defaultDIP switches settings.This settingselects to useMetro-
Freescale Semiconductor, I
works monitor and UART1 of DragonBall-VZ as the debug port. Other possible settings are
showninFigure2-3,Figure2-4andFigure2-5.
For detail description of each switch. Pls. refer to Table 3-1 and Table 3-2.
For additional information on the M68VZ328ADS and its components. Pls refer to Section 3 .
MOTOROLAM68VZ328ADS USER’S MANUAL2-9
For More Information On This Product,
Go to: www.freescale.com
Page 10
nc...
Quick Installation Guide
Freescale Semiconductor, Inc.
Freescale Semiconductor, I
Figure 2-1. M68VZ328ADS Key Component Layout
2-10M68VZ328ADS USER’S MANUALMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Page 11
Quick Installation Guide
Monitor and Debug port selection
Freescale Semiconductor, Inc.
nc...
S1
ON
12345678
Figure 2-2. Default DIP Switch Options for Metrowerks monitor using UART1
S1
ON
12345678
Figure 2-3. DIP Switch Options for Metrowerks monitor using UART2
S2
ON
12345678
S2
ON
12345678
S1
ON
12345678
Freescale Semiconductor, I
Figure 2-4. DIP Switch Options for SDS monitor using UART1
S1
ON
12345678
Figure 2-5. DIP Switch Options for SDS monitor using UART2
S2
ON
12345678
S2
ON
12345678
2-11M68VZ328ADS USER’S MANUALMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Page 12
nc...
Quick Installation Guide
Freescale Semiconductor, Inc.
2.3.2 Connecting M68VZ328ADS to PC
Figure 2-6 shows connections among the PC, the external power supply and the
M68VZ328ADS board. Use the following steps to complete cable connections:
Host Computer
COM1
/COM2
RS232 Cable
3.0-3.3V
Power Supply
UART2
UART1
M68VZ328ADS
Figure 2-6. Connecting PC to UART1 of M68VZ328ADS
For m ost evaluation platforms, serial communication is the primary channel to link up PC
withthe target board.Both Microtek (SLD)and SoftwareDevelopment System (SDS)debug
monitor support serial communication through UART port. The procedure are as follows.
1. Connect a RS232 cable from COM port (COM1 or COM2) to connector P2 of
M68VZ328ADS.
2. Connect the power supply +3V or power adaptor to the P1 of M68VZ328ADS
3. Turn on the power supply. The RED LED will flash and the GREEN LED will illuminate
when power is correctly applied.
Freescale Semiconductor, I
2.3.3 Installing software debugger
The following software debugger supports M68VZ328ADS:
• Metrowerks Codewarrior
• Single Step Development System
•SLD
Metrowerks Codewarrior
A simple procedure for using Metrowerks Codewarrior Target Monitor:
1. Install the Metrowerks Codewarrior IDE
2-12M68VZ328ADS USER’S MANUALMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Page 13
nc...
Quick Installation Guide
2. Run Codewarrior IDE program.
3. Open a new project file with Embedded 68k Stationery.
Freescale Semiconductor, Inc.
4. Select ADS_68VZ328 Stationery for new project.
Freescale Semiconductor, I
2-13M68VZ328ADS USER’S MANUALMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Page 14
nc...
Quick Installation Guide
5. Choose "Enable Debugger" from the "Project" pull-down menu.
Freescale Semiconductor, Inc.
6. Change the connection settings in the Debug Settings Windows.
Freescale Semiconductor, I
2-14M68VZ328ADS USER’S MANUALMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Page 15
nc...
Quick Installation Guide
7. Edit the code inside the Codewarrior IDE program.
8. Press F5 to run the program.
Single Step Development System
A simple procedure for using Single Step Debugger:
1. Install the Single Step Debugger on your PC.
2. Run Single Step Debuger
3. Choose Debug in the File pull-downmenutoopentheDebug pop-up window.
4. InsidetheDebug pop-upwindow,choose theobjectfile todownloador "debugwithout
file" asshownin Figure 2-7, select the serial port(COM1 or COM2 ...) accordingto the
serial port of the PC connecting to the ADS, disable "hardware flow control" and the
baud rate should be 115200bps as shown in Figure 2-8.
5. The fileshould be downloadedand then you can start your development. (For details,
please refer to the SingleStep User’s Manual).
SECTION 3
HARDWARE DESCRIPTION AND BOARD OPERATION
3.1 OVERVIEW
Figure 3-1shows the block diagram of M68VZ328ADS.
Logic Analyzer
nc...
Extension
Connectors
Single
Tone
Generator
PWMO
Touch
Panel
Controller
Extension
MC68VZ328
Connector
FLASH
1M x 16-bit
SDRAM
4M x 16-bit
UART SIGNALS
RESET
FLASH
1M x 16-bit
SDRAM
4M x 16-bit
Reset
Circuit
Address Bus
Data Bus
Control Bus
UART
and
IRDA
Interface
IRDA
UART1
UART2
Power
Connector
Freescale Semiconductor, I
4-bit LCD
8-bit LCD
LCD Connectors
Figure 3-1. M68VZ328ADS Functional Block Diagram
MOTOROLAM68VZ328ADS USER’S MANUAL3-17
For More Information On This Product,
Go to: www.freescale.com
RESET
GND
ABORT
GND
Page 18
Hardware Description and Board Operation
Freescale Semiconductor, Inc.
3.2 CONTROL SWITCHES
There are two push buttons on the ADS which function as follows:
1. Reset Switch (SW2): When pressed, a hardware reset is generated to the
MC68VZ328 processor and resumes operation.
2. Abort Switch (SW1): This switch is used to generate a level 7 interrupt to the
MC68VZ328 processor for aborting normal software execution and returning control
to the debug monitor.
3.3 DIP SWITCHES
There are two DIP switch packs on the ADS board, S1 and S2. S1 is used to configure the
memory system and operation modes. S2 is used to enable the on-board peripheral such
as buzzer and touch panel controller. Table 3-1 and Table 3-2 show the description of each
switch.
* Used as monitor and debug port selection in provided monitor program
3.4 OPERATION MODES
M68VZ328ADS supports two operation modes of MC68VZ328: Normal Mode and Bootstrap Mode. Selection of those operation modes is controlled by setting DIP switch S2-8.
Operation mode has to be selected before resetting the system. Mode is not allowed to be
changed during normal runing. Table 3-3 shows the operation mode configuration.
Normal mode - After power up or system reset in this mode, CSA0 is default to cover the
whole memory map except MC68VZ328 internal registers and EMU space. Also, as reset
3-18M68VZ328ADS USER’S MANUALMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Page 19
nc...
Freescale Semiconductor, Inc.
Hardware Description and Board Operation
Table 3-3. Operation Mode Setting
DIP Switch S2-8Operation Mode
ONBootstrap
OFFNormal
vector fetch is at the beginning of CSA0 space, *CSA0 should be connected to the boot
ROM in which the first two words are reset vectors. The default boot ROM of the
M68VZ328ADS has been programmed with monitor when it is shipped out from factory. Pls.
refer to Quick Installation part for detailed description on the selection of monitor and debug
port.
Bootstrap mode - When this mode is selected, the DragonBall-VZ will start its embedded
bootloader. User can use this mode to do simple debugging or reprogram the flash memories. For detailed bootstrap mode operation, please refer MC68VZ328 user’s manual.
3.5 LED INDICATORS
There are four LED indicators on the ADS which function as shown in Table 3-4.
Table 3-4. Function of LED Indicators
Reference #ColorNameFunction
LED1YellowPD0Status of PD0
LED2YellowPD1Status of PD1
LED3RedHeart BeatBlinking heart beat indicates the system is "alive"
LED4GreenPowerPower is applied to the system with right polarity
The LED3 is connected to a counter. The counter is toggled by address line A1.
3.6 MEMORY
M68VZ328ADS provides on-board Flash memory and SDRAM, for application development. They can be enabled or disabled individually by setting the corresponding DIP
switches.
3.6.1 Memory Map
The defaultmemory map of M68VZ328ADSin normal mode is shownin Table 3-5. The chip
Freescale Semiconductor, I
select range to all of the memory are software programmable. Users can reconfigure the
memory map for their applications.
M68VZ328ADS is equipped with two 2M-byte Flash memory chips. Figure 3-2. shows the
interface of them. They are chip-selected by *CSA0 and *CSA1 signals. The connection of
these *CSAx signals to the Flash memories is controlled by DIP switches S2-1, S2-2 and
S2-3.
When S2-1 and S2-3 are close, *CSA0 connects Flash0 and *CSA1 connects Flash1.
Flash0 becomes the boot ROM. When S2-1 and S2-3 are open and S2-2 is close, *CSA0
connects Flash1 only. Flash1 will then be boot ROM instead. So, user can select either
FLASH0 or FLASH1 to be the boot ROM. These configuration allow users to put their application program to boot ROM without having to erase the on-board monitor program.
Table 3-6 summaries the possible configuration of the S2-1, S2-2 and S2-3.
Freescale Semiconductor, I
Table 3-6. Possible Configuration of FLASH Memories
For more details on flash memory programming, please refer to Appendix B .
3-20M68VZ328ADS USER’S MANUALMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Page 21
3.6.3 SDRAM
Freescale Semiconductor, Inc.
Hardware Description and Board Operation
nc...
MC68VZ328
VCC
S2-5
CSD1
S2-4
CSD0
SDCE
SDCLK
CSC0
CSC1
DQMH
DQML
SDWE
A[1..20]
D[0..15]
VCC
CS
CKE
CLK
RAS
CAS
UDQM
LDQM
WE
A[1..12], BS0,BS1
D[0..15]
Figure 3-3. Interface of SDRAMs
4MX16-Bit SDRAM
CS
4MX16-Bit SDRAM
SDRAM1
SDRAM0
Figure 3-3. shows the interface of SDRAMs. M68VZ328ADS supports two banks of 4Mx16bit SDRAMs. However, only one bank is installed when the board is shipped out from the
factory. This allows user to install and test their own SDRAM when needed. These two
banks of SDRAM are selected by *CSD0 and *CSD1, and enabled by closing DIP switches
S2-4 and S2-5.
Freescale Semiconductor, I
MOTOROLAM68VZ328ADS USER’S MANUAL3-21
For More Information On This Product,
Go to: www.freescale.com
Page 22
Hardware Description and Board Operation
Freescale Semiconductor, Inc.
3.7 UART AND IRDA
MC68VZ328
TXD1
RXD1
RTS1
CTS1
RS232 Transceiver
EN
P2
UART1
VCC
nc...
TXD2
RXD2
RTS2
CTS2
PD4
S1-3
VCC
RS232 Transceiver
EN
Buffer
EN
EN
P3
UART2
IRDA
GND
S1-1
VCC
S1-2
GND
Figure 3-4. UART and IRDA Interface.
Figure 3-4 shows the UART and IRDA interface. The M68VZ328 has two RS232 serial
ports, P2 and P3. P2 and P3 are using the UART1andUART2 of MC68VZ328 respectively.
BothP2andP3are9-pinfemaleD-TypeconnectorscontainingthesignalsasshowninFigure 3-5. The transceivers for UART1 and UART2 can be enabled by turning the DIP switch
S1-1 and S1-2 on respectively.
NC
Freescale Semiconductor, I
TXD
RXD
NC
GND
Figure 3-5. Serial Port Pin Assignment
The IRDA transceiver is connected to UART2 only with a buffer in between for controlling
its ON/OFF. If IRDA is being used, S1-2 should be switched OFF and S1-3 should be
3-22M68VZ328ADS USER’S MANUALMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
1
2
3
4
5
NC
6
CTS
7
RTS
8
NC
9
Page 23
Freescale Semiconductor, Inc.
Hardware Description and Board Operation
switchedON. Then, the enable/disableof IRDA istotally controlled bysoftware through PD4
(Port D4).
3.8 LCD AND TOUCH PANEL INTERFACE
3.8.1 LCD Interface
M68VZ328ADS consists of two LCD panel connectors, P1 and P12. P12 is designed for 8bit LCD panel while P1 is for 4-bit LCD panel. P1 is fully compatible with the one used on
M68EZ328ADS. The pin assignments of both LCD connectors are shown in Figure 3-6.
nc...
LACD
LLP
VO
GND
LD0
LD2
GND
NC
TOP
LEFT
P1
1
3
5
7
9
11
13
15
17
19
2
LFRM
4
LCLK
6
VCC
8
VEE
10
LD1
12
LD3
14
LCONTRAST
16
NC
18
BOTTOM
20
RIGHT
LCONTRAST
LACD
LLP
VO
GND
LD0
LD2
LD4
LD6
NC
TOP
LEFT
NC
P12
1
3
5
7
9
11
13
15
17
19
21
23
25
2
4
6
8
10
12
14
16
18
20
22
24
26
LD5
LD7
NC
RIGHT
NC
LFRM
LCLK
VCC
VEE
LD1
LD3
NC
BOTTOM
Figure 3-6. LCD and Touch Panel Connector Pin Assignment
For full description of the LCD signals, please refer to the MC68VZ328 User’s Manual.
Freescale Semiconductor, I
MOTOROLAM68VZ328ADS USER’S MANUAL3-23
For More Information On This Product,
Go to: www.freescale.com
Page 24
Hardware Description and Board Operation
Freescale Semiconductor, Inc.
3.8.2 Touch Panel Interface
nc...
RIGHT
TOP
LEFT
BOTTOM
MC68VZ328
PB6
IRQ5
SPMCLK
SPMTXD
SPMRXD
S1-6
S1-5
Touch Panel
VCC
ADS7843
CS
PENIRQ
DCLK
DIN
DOUT
Figure 3-7. Touch Panel Controller Interface
The VZADS boardis equipped with Burr-Brown TouchPanelController ADS7843. Figure37shows the interface of Touch Panel Controller. Totally one I/O signal,oneinterrupt capable
I/O signal and one set of SPIM signals from MC68VZ328 are used to implement the touch
panel circuitry. All of these signals can be shared for other devices when touch panel interface controller is being disabled. The on-board touch panel controller can be disabled by
turningbothDIPswitchesS1-5,S1-6off.
Table 3-7. Signal Assignment for Touch Panel Controller
SignalsFunction
This set of serial port interface signals performs data transfer with
SPMRXD, SPMTXD, SPMCLK
~IRQ5This signal is driven from an MC68VZ328 interrupt capable I/O pin.
PB6
Freescale Semiconductor, I
The ADS7843 is a 12-bit sampling analog-to-digital converter (ADC) with a synchronous
ADS7843. For detailed operation on the SPI port, please refer to the
The MC68VZ328 general I/O signal is used to select the ADS7843 on data
serial interface and low on-resistance switches for driving touch screens. The ADS7843
communicates with MC68VZ328 through SPI (Serial Peripheral Interface). In this case,
ADS7843isslave, and MC68VZ328 is master.Forthe details on the operation ofADS7843,
please refer to i ts datasheet. The datasheet is available on the web:
http://www.burr-brown.com
For more details on the operation of resistive touch panel, please refer to Appendix A .
MC68VZ328 User’s Manual.
transfer.
3-24M68VZ328ADS USER’S MANUALMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Page 25
Freescale Semiconductor, Inc.
3.9 SINGLE TONE GENERATOR
S1-4
PWMO
MC68VZ328
Figure 3-8. Single Tone Generator
Hardware Description and Board Operation
VCC
BC847
CitiSound CHB-03E
GND
nc...
The M68VZ328ADS is equipped with Citizen single tone generator CHB-03E. As shown in
Figure 3-8, a simple transistor circuit is used to interface the CHB-03E with the PWMO pin
of MC68VZ328.
3.10 LOGIC ANALYZER INTERFACE
Toprovide an convenientway ofconnecting on-boardsignalsto a logicanalyzer, ADSboard
provides five 10x2-pin headers for direct plug-in. Pin assignments to these five headers are
showninFigure3-9.
POD3
2
1
3
5
7
9
11
13
15
17
19
4
6
8
10
12
14
16
18
20
DTACK
D15
D13
D11
D9
D7
D5
D3
D1
GND
A14
A12
A10
A8
A6
A4
A2
A0
EMUCS
RSTIN
EMUCS
LWE
CONTRAST
LCLK
LFRM
POD4
2
1
4
3
6
5
8
7
10
9
12
11
14
13
16
15
18
17
20
19
CLKO
D14
D12
D10
D8
D6
D4
D2
D0
Freescale Semiconductor, I
LD2
LD0
A15
A13
A11
A9
A7
A5
A3
A1
GND
POD2
1
3
5
7
9
11
13
15
17
19
2
4
6
8
10
12
14
16
18
20
EMUIRQ
OE
UWE
DTACK
LACD
LLP
LD3
LD1
GND
LD6
LD4
UDS
DWE
SDA10
DQMH
SDCLK
POD5
1
3
5
7
9
11
13
15
17
19
CSA0
CSA1
CSB1
RAS1
CAS1
A22
A20
A18
A16
2
4
6
8
10
12
14
16
18
20
POD1
1
3
5
7
9
11
13
15
17
19
LD7
LD5
WE
LDS
DMOE
DQML
SDCE
GND
10
12
14
16
18
20
2
4
6
8
CSA0
CSB0
RAS0
CAS0
A23
A21
A19
A17
GND
Figure 3-9. Logic Analyzer Connectors
MOTOROLAM68VZ328ADS USER’S MANUAL3-25
For More Information On This Product,
Go to: www.freescale.com
Page 26
Hardware Description and Board Operation
Freescale Semiconductor, Inc.
3.11 EXPANSION CONNECTORS
The M68VZ328ADS provides basic features for software development and evaluation. If
user wants to add application subsystem to M68VZ328ADS, it can utililize the signals provided on 32x3 local bus connector (P7) and 16x3 local bus connector (P9). Some of these
MC68VZ328 signals are used by the on-board modules. If users want to use any of these
signalsfor their daughtercard, the correspondingon-board modulemayhave to be disabled
to avoid contention. Pin assignment on P7 is compatible with the one used on
M68EZ328ADS. Any daughter card used on M68EZ328ADS can also be used on
M68VZ328ADS.
The pin assignments for extension connectors are shown in Table 3-8 and Table 3-9.
There are two power input connectors on the ADS, P4 and P5. P4 is designed for external
3V DC main power supply, which supplies power to the MC68VZ328 processor and most of
the on-board components. P5 is used for LCD driver (VEE) power supply. If an LCD panel
is connected to the ADS, the LCD driver can be powered by this VEE input. Figure 3-10
locates the power connectors and their polarity.
P5
GND
VEE
Freescale Semiconductor, I
P4
GND
_
3.0-3.3V
+
UART2
UART1
M68VZ328ADS
Figure 3-10. Power Connectors
MOTOROLAM68VZ328ADS USER’S MANUAL3-27
For More Information On This Product,
Go to: www.freescale.com
Page 28
nc...
Hardware Description and Board Operation
Freescale Semiconductor, Inc.
Freescale Semiconductor, I
3-28M68VZ328ADS USER’S MANUALMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Page 29
nc...
Freescale Semiconductor, Inc.
APPENDIX A
RESISTIVE TOUCH PANEL OPERATION
M68EZ328ADSfeatures pen input through a resistive-film sensing panel. This type of panel
provides high flexibility by accepting input form any kind of stimulus including fingers, which
is most suitable for portable use. User can select a specific touch panel or order an LCD
module which includes a touch resistive panel. This section describes the basic concepts of
pen input and the required interface with the M68EZ328ADS.
A.1 GENERAL CONCEPTS OF RESISTIVE PANELS
Basically, resistive panel consists of two transparent resistive layers separated by insulating
spacers as shown in Figure 1-1.
Figure 1-1. Resistive Touch Panel
Freescale Semiconductor, I
Transparent Resistive Layer
coated on dielectric (insulating) substrate, usually glass on bottom and plastic on top for
actuation.
Bars
- highly conductivematerial such as silver ink, about1000 timesmore conductive than
ITO.
Spacers
the two opposite conductive layers.
MOTOROLAM68VZ328ADS USER’S MANUALA-29
- Non-conductingink,adhesive, orother materialsuch as Mylaris used to separate
- resistive material such as an indium tin oxide (ITO) film is
For More Information On This Product,
Go to: www.freescale.com
Page 30
nc...
Resistive Touch Panel Operation
The resistive panel works by applying a voltage gradient across one conductive layer and
measuring the voltage at the point of contact with the opposing conductive layer. For
instance, as shown in Figure 1-2, the resistive film acts as a series of resistors.
Freescale Semiconductor, Inc.
Figure 1-2. Determination of X,Y Position
When a point is contacted, it means the two opposing conductive layers come into electrical
contact. The x position of actuation can be determined by measuring the output voltage of
the y layer. At the same time, the y position can be find out by measuring the x layer. The
exact position can be determined by referencing the output voltage to the distance relationship.
Freescale Semiconductor, I
A-30M68VZ328ADS USER’S MANUALMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Page 31
Freescale Semiconductor, Inc.
APPENDIX B
PROGRAMMING ON-BOARD FLASH MEMORY
B.1 OVERVIEW
The Flash memory on the ADS board cannot be written directly. A special program command sequence is required to unlock it before starting the write process. A flash program is
thereforeprovided withthe ADS board forhelping users todo re-programming.The sections
below will describe the program and provide further information about the process and other
required elements.
Itis recommendedthat usershould have abasic understandingof bootstrapmode operation
of MC68VZ328 before reading the material below. For more details on Bootstrap mode,
please refer to the MC68VZ328 user’s manual.
nc...
B.2 ELEMENTS FOR PROGRAMMING THE FLASH
The following files are necessary for programming the Flash memory
1. VZTOOLS including BBUGV.EXE and STOB.EXE
2. INIT.B - b-record for initialize the ADS
3. ERASE.B - b-record for erasing Flash memory
4. FLASH.B - b-record for programming flash. ROM image is copied from RAM area to
the Flash memory area
5. ROM.B - ROM image of user program in b-record/s-record format.
Freescale Semiconductor, I
MOTOROLAM68VZ328ADS USER’S MANUALB-31
For More Information On This Product,
Go to: www.freescale.com
Page 32
Programming On-board Flash Memory
Freescale Semiconductor, Inc.
B.3 METHOD
System RAM
FLASH Program
nc...
ROM Image
offset
Copy the ROM Image from
system RAM to Flash
Memory by the flash Program.
Flash Memory
Figure B-1. Method of programming on-board Flash memory
Flash memory can be programmed in bootstrap mode. First, a ROM image and a flash program are downloaded to the system memory by loading their b-records. Then, run the flash
program. It will execute the Flash program command sequence and copy the ROM image
from the system RAM to the Flash memory. The detailed steps are as follows.
1. Force the MC68VZ328 into bootstrap mode by turning S2-8 on and pressing RESET
switch once.
2. Use BBUGV.EXE or TERMINAL program to communicate with the M68VZ328ADS
through RS232 port of a PC.
3. Initialize the internal registers of DragonBall-VZ by loading the INIT.B.
4. Make sure the Flash Memory is blank. Load ERASE.B to erase the flash memory
when needed.
Freescale Semiconductor, I
5. Load FLASH.B (the Flash Program) and ROM.B (the ROM image) to system RAM
(SDRAM on M68VZ328ADS).
6. Executethe Flash Program by using the execution B-record. For example, if the startingaddress ofFlash Programis 0x4000,the executionB-recordis then"0000400000".
B.4 OFFSET ADDRESS OF ROM IMAGE
FigureB-1The ROM imageisfirst put tothe system RAM beforeit is copiedto Flash. In order
to create S-record/B-record with download address different from its execution address, an
OFFSET is sometimes required to b e specified in downloader program.
B-32M68VZ328ADS USER’S MANUALMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Page 33
Programming On-board Flash Memory
Freescale Semiconductor, Inc.
For example, when using SDS’s DOWN.EXE to generate the s-record, the "-w offset"
parameter can be used to specify this offset value. Please refer to the SingleStep User
Guide for using this command.
B.5 EXECUTING PROGRAM COMMAND SEQUENCE
Listed below is the source code of the flash Program which contains the neccessary steps
to write theflashmemory. It executes the flash program commandsequenceand copies the
ROM image from RAM area to the Flash memory area on ADS board. Figure B-2 shows the
flow chart of this p rogram. Different brands of Flash memory may have different program
command sequences, please refer to their datasheets for more details.
C.1 INITIALIZATION CODE OF METROWERKS MONITOR (RESET.S)
;******************************************************************;
;This is the boot routine for the MC68VZ328 ADS board. Product
; engineers should examine all the configurations carefully and
; change them according to their system requirements.
;******************************************************************;
MON_BOOT.equ___reset ; Boot entry point
MON_STACKTOP.equ$4100; Initial stack
M328BASE.equ $FFFFF000; Base address for system registers
PLLCR.equ(M328BASE+$200); Control Reg
PLLFSR.equ(M328BASE+$202); Freq Select Reg
PLLTSR.equ(M328BASE+$204); Test Reg
; Power Control Registers
PCTLR.equ(M328BASE+$206); Control Reg
; Interrupt Registers
IVR.equ(M328BASE+$300); Interrupt Vector Reg
ICR.equ(M328BASE+$302); Interrupt Control Reg
IMR.equ(M328BASE+$304); Interrupt Mask Reg
ISR.equ(M328BASE+$30C); Interrupt Status Reg
IPR.equ(M328BASE+$310); Interrupt Pending Reg
; PIO Registers
; Port A Registers
PADIR.equ(M328BASE+$400); Direction Reg
PADATA.equ(M328BASE+$401); Data Reg
PAPUEN.equ(M328BASE+$402); Pullup Enable Reg
; Port B Registers
PBDIR.equ(M328BASE+$408); Direction Reg
PBDATA.equ(M328BASE+$409); Data Reg
PBPUEN.equ(M328BASE+$40A); Pullup Enable Reg
PBSEL.equ(M328BASE+$40B); Select Reg
; Port C Registers
PCDIR.equ(M328BASE+$410); Direction Reg
PCDATA.equ(M328BASE+$411); Data Reg
PCPUEN.equ(M328BASE+$412); Pullup Enable Reg
PCPDEN.equ(M328BASE+$412); Pull-down Enable Reg
PCSEL.equ(M328BASE+$413); Select Reg
; CS Group Base Registers
; CS Registers
MOTOROLAM68VZ328ADS USER’S MANUALC-39
For More Information On This Product,
Go to: www.freescale.com
Page 40
Monitor Initialization Code
; Port D Registers
PDDIR.equ(M328BASE+$418); Direction Reg
PDDATA.equ(M328BASE+$419); Data Reg
PDPUEN.equ(M328BASE+$41A); Pullup Enable Reg
PDSEL.equ(M328BASE+$41B); Select Reg
PDPOL.equ(M328BASE+$41C); Polarity Reg
PDIRQEN.equ(M328BASE+$41D); IRQ Enable Reg
PDIRQEDGE .equ(M328BASE+$41F); IRQ Edge Reg
; Port E Registers
PEDIR.equ(M328BASE+$420); Direction Reg
PEDATA.equ(M328BASE+$421); Data Reg
PEPUEN.equ(M328BASE+$422); Pullup Enable Reg
PESEL.equ(M328BASE+$423); Select Reg
; Port F Registers
PFDIR.equ(M328BASE+$428); Direction Reg
PFDATA.equ(M328BASE+$429); Data Reg
PFPUEN.equ(M328BASE+$42A); Pullup Enable Reg
PFSEL.equ(M328BASE+$42B); Select Reg
; Port G Registers
PGDIR.equ(M328BASE+$430) ; Direction Reg
PGDATA.equ(M328BASE+$431) ; Data Reg
PGPUEN.equ(M328BASE+$432) ; Pullup Enable Reg
PGSEL.equ(M328BASE+$433) ; Select Reg
.DC.LMON_STACKTOP ; stack pointer
.DC.LMON_BOOT; program counter
.skip(62*4); space for Motorola defined Exception Vectors
.skip(192*4); space for the 192 User defined Exception Vectors
.global ___reset
;************************************************
;* System initialization*
;************************************************
move.b #$18,SCR; Disable Double Map
;************************************************
;* Primary boot image is at start of flash.
;* Secondary boot image is at start+0x10000.
;* If this is the primary image and PD2 is low,
;* boot alternate image.
;************************************************
lea.l0(PC), A0; get PC
move.lA0, D0
and.l#$10000, D0; is this secondary image?
bne.sJMPSKIP; if so, skip check switch and init,
move.l #MON_STACKTOP,A7; Install stack pointer
move.w #$2700,sr; mask off all interrupts
move.w #$00,RTCWD; disable watch dog
move.w #$08,ICEMCR; disable ICEM vector hardmap
move.w #$07,ICEMSR; clear level 7 interrupt
;******************************
;* Port Initialization*
;******************************
move.b #$03,PFSEL; select A23-A20, CLKO, CSA1
move.b #$00,PBSEL; Config port B for chip select A,B,C and D
move.b #$00,PESEL; select *DWE
move.b #$F1,PKSEL
Freescale Semiconductor, Inc.
C-41M68VZ328ADS USER’S MANUALMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Page 42
Monitor Initialization Code
move.b #$00,PMSEL
; Pull Low PB7 to protect the buzzer
ori.b#$80,PBSEL
ori.b#$80,PBDIR
ori.b#$80,PBPUEN
andi.b #$7F,PBDATA
cmp.b#$0C,D0;PD3=OFF and PD2=OFF
beqMW_UART1
cmp.b#$08,D0;PD3=OFF and PD2=ON
beqMW_UART2
cmp.b#$04,D0;PD3=ON and PD2=OFF
beqSDS_UART1
cmp.b#$00,D0;PD3=ON and PD2=ON
beqSDS_UART2
****************************************************************************
*I/O DEVICE OPTIONS
****************************************************************************
*****************************************************************
*WARNING: This file redefines _usr_gchar bypassing the BSP*
*****************************************************************
****************************************
* Setting for VZ-UART2
****************************************
;****************************************************
;* Chosing suitable Debug Port
;*
;* by deleting the comment that you want
;****************************************************
Freescale Semiconductor, Inc.
; Timer 1 Registers
C-45M68VZ328ADS USER’S MANUALMOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Page 46
Monitor Initialization Code
#define DEV_IN VZUART2
#define DEV_OUT VZUART2
BASE_IN:equ$fffff000; base address not applicable
BASE_OUT:equ$fffff000; base address not applicable
BAUD_IN:equ1152; baud rates = 115200 bps
BAUD_OUT:equ1152; baud rates = 115200 bps
****************************************
* Setting for VZ-UART1
****************************************
;#define DEV_IN VZUART1
;#define DEV_OUT VZUART1
;BASE_IN:equ$fffff000; base address not applicable
;BASE_OUT:equ$fffff000; base address not applicable
;BAUD_IN:equ1152; baud rates = 115200 bps
;BAUD_OUT:equ1152; baud rates = 115200 bps
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Seting for EZ's UART
;Supported baudrate: 115200
;38400
;19200
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;#define DEV_IN EZUART
;#define DEV_OUT EZUART
;BASE_IN:equ0; not applicable (fixed on EZUART)
;BASE_OUT:equ0; not applicable (fixed on EZUART)
;BAUD_IN:equ576; BAUD_IN = Baudrate/100
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Seting for ADI PORT on EZ-ADS
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;#define DEV_IN ADIPORT
;#define DEV_OUT ADIPORT
;BASE_IN:equ$fffd8000; base address of input device
;BASE_OUT:equ$fffd8000; base address of output device
;BAUD_IN:equ0; baud rates not applicable
;BAUD_OUT:equ0; baud rates not applicable
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Seting for MC68681 on EZ-ADS
;Supported baudrate: 19200
;9600
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;#define DEV_INMC68681
;#define DEV_OUTMC68681
;#define PNAME_IN A
;#define PNAME_OUT A
;BASE_IN:equ$fffd0001; base address of input device
;BASE_OUT:equ$fffd0001; base address of output device
;BAUD_IN:equ19200; baud rates (bits/sec)
;BAUD_OUT:equ19200; baud rates (bits/sec)
;ACR_VAL:equ$80; choose baud set 2 (bit#7=1)
;IRQ_MASK:equ$00
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Seting for MC68681 on EZ-ADS with BaudRate=57600bps
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;#define DEV_INMC68681
;#define DEV_OUTMC68681
;#define PNAME_IN A
;#define PNAME_OUT A
;BASE_IN:equ$fffd0001; base address of input device
;BASE_OUT:equ$fffd0001; base address of output device
;BAUD_IN:equ0
;BAUD_OUT:equ0
;ACR_VAL:equ$60
;IRQ_MASK:equ$00
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; *********************************************************************
; "stop" interrupt
; We will only stop the target if the ABORT switch is pressed. We
; will not stop for HOST_NMI or EXT_NMI interrupts.
; The Non-Maskable Interrupt status is in the NMI_STATUS register
; which is in even-byte locations at NMI_STATUS. Bit #0 of the
; first byte at NMI_STATUS indicates that the ABORT switch was pressed.
; *********************************************************************
move.w #$7,ICEMSR; clear level 7 interrupt
or.w#$FF80,ISR
endm; return non-zero in D0 if ABORT
endm
; **************************************************
; Macros for use at application startup (EXEC)
; and stop (DONE). Normally these are empty.
; **************************************************
; **************************************************
; Contents of the "usr_reset" section. In the usual
; case, this is two longwords long, with the first word
; containing the value with which the processor
; loads up its stack pointer, and the second of
; which is the value with which the processor
; loads up its program counter. This will bring up
; the monitor on a hardware reset.
; **************************************************
; Hard reset macro - contains very high priority
; instructions which must be executed immediately
; upon a hardware reset.
; **************************************************
;************************************************
;* System initialization*
;************************************************
;* Replace the system initialization code here *
;************************************************
move.b #$18,SCR; Disable Double Map
move.b #$9,PGSEL; config PG0/DTACK to GPI/O,input
move.w #$2480,PLLCR; ??MHz Sysclk, enable clko
move.l #MON_STACKTOP,A7; Install stack pointer
move.w #$2700,sr; mask off all interrupts
move.w #$00,RTCWD; disable watch dog
move.w #$08,ICEMCR; disable ICEM vector hardmap
move.w #$07,ICEMSR; clear level 7 interrupt
;******************************
;* Port Initialization*
;******************************
move.b #$03,PFSEL; select A23-A20, CLKO, CSA1
move.b #$00,PBSEL; Config port B for chip select A,B,C and D
move.b #$00,PESEL; select *DWE
move.b #$F1,PKSEL
move.b #$00,PMSEL
move.b #IRQ_MASK,MC68681imr ;set value of IMR
move.b #ACR_VAL,MC68681acr;set value of ACR
; Setting for baudrates = 57600bps
move.b #00,MC68681ctur
move.b #02,MC68681ctlr ; divider=2
.endif