
MOTOROLA
6
AN1237/D
offsets are shown in Table 6 in the PSD3XX data sheets, Tables 21–23 in the PSD4XX data sheet, and in
Tables 29–31 in the PSD5XX data sheet.
For example, the following steps must be performed to replace ports B and C on an M68HC711 with ports
A and B on a PSD311 device.
1. Refer to the appropriate PSD data sheet to determine the correct offsets.
2. Set the CSIOPORT (CSP) base address of the PSD. The base address can be mapped to any
boundary from 256 bytes to 2 Kbytes. In this example, the CSIOPORT base address starts at $2000.
3. Port B on the M68HC11 is mapped to port A on the PSD311. For compatibility with port B on the
M68HC11, which is an output-only port, port A on the PSD311 is set for output. This is accomplished
by writing $FF (output) to the PSD311 port A data direction register, located at $2004 (offset four
from base address).
4. Port C on the M68HC11 is mapped to port B on the PSD311. The direction of the individual I/O pins
in PSD311 port B is determined by the definition in the original OTP application. The direction is set
by writing to $2005 (offset five from base address). To make a pin an input, the appropriate bit in the
register must be cleared; to make a pin an output, the appropriate bit must be set.
5. To write data to PSD311 port A and port B pins, the data must be written to $2006 for port A and to
$2007 for port B. Data from the PSD311 port A and port B pins must be read from $2002 and $2003,
respectively.
Other M68HC11 resources, such as EEPROM, SRAM, vectors, and the control registers are mapped inter-
nally and do not require any memory map redirection.
MODIFY M68HC11 CODE TO ADDRESS PSD MEMORY AND I/O
Change M68HC11 I/O port addresses to match the port address at the appropriate offset from the specified
PSD I/O port base address (CSIOPORT).
INTEGRATE M68HC711 CODE WITH PSD CONFIGURATION DATA
Code that would normally be programmed into M68HC711 EPROM must be merged with PSD configuration
information to create one output file. This is done during the compile procedure in the PSD software. The
single output file is then downloaded to an industry-standard programmer (or the WSI MagicPro III PC-com-
patible programmer) and used to program the PSD device.
PROGRAM THE PSD
The output file (filename.obj) generated from the PSD software compiler is now ready to be programmed
into a device from one of the three PSD families (PSD3XX, PSD4XX, or PSD5XX). A list of programmer
manufacturers that support the PSD devices can be obtained from a WSI sales office or sales representa-
tives. Programmers which support the PSD devices are available from Data I/O, BP Microsystems, and Log-
ical Devices.
CONCLUSION
A single-chip Motorola M68HC711 control system can be quickly and easily converted to a system that uses
a ROM-less M68HC11 and a WSI Programmable MCU peripheral. A small investment in hardware and soft-
ware modification can provide an increase in system memory, expanded I/O, lower power consumption,
greater design flexibility, and lower cost.
NOTE:
This Motorola document is also known as Application Note 043 at WSI, Inc.