You are on page 1of 7

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/264972019

Training Boards Based on Motorola 68HC11E1 for Educational Embedded


Systems

Conference Paper · March 2012

CITATIONS READS

0 213

3 authors, including:

Rommel García Ignacio Algredo-Badillo


Universidad del Istmo Universidad Politécnica de Tlaxcala
6 PUBLICATIONS   9 CITATIONS    33 PUBLICATIONS   74 CITATIONS   

SEE PROFILE SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Applications of quantum chemistry with molecular simulation View project

All content following this page was uploaded by Rommel García on 22 September 2014.

The user has requested enhancement of the downloaded file.


0(6$'(75$%$-2('8&$&,Ð1
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB

TRAINING BOARDS BASED ON MOTOROLA 68HC11E1


FOR EDUCATIONAL EMBEDDED SYSTEMS
Claudia Cruz Martínez Rommel García Hernández Ignacio Algredo Badillo
Universidad del Istmo Universidad del Istmo Universidad del Istmo
Sto.Domingo, Tehuantepec Sto. Domingo, Tehuantepec Sto. Domingo, Tehuantepec
Oaxaca, México Oaxaca, México Oaxaca, México
claudia.c.mtz@gmail.com rommelgh@gmail.com DOJUHGREDGLOOR#VDQGXQJDXQLV
WPRHGXFRPP[

ABSTRACT A microcontroller is a computer implemented on a single VLSI


In a digital world, where there are many technological advances (Very Large Scale Integration) chip. A microcontroller contains
and the embedded systems are primordial parts, it is important to both every components of a microprocessor plus one or more of
provide strategies that reduce hardware and/or software design the following components:
time, costs, risk, among other ones. Mainly, Motorola leads since · Memory
many years ago the global market of microcontrollers to specific
and design different applications. A popular family of Motorola is · Timer
the 68HC11, which for its price and great usability, it is a ideal
· Analog-to-digital converter
family for obtaining the first knowledge in microcontrollers and
microprocessor. This work focus on the analysis, design and · Digital-to-analog converter
implementation of two training board based on MC68HC11E1,
one of the most known 8-bits microcontrollers, which includes · DMA (Direct Memory Access) controller parallel I/O
memory and a great number of peripherals. The aim of the two interface (often called parallel port)
boards is that systems can be used as microprocessor or as · Serial I/O interface
microcontroller. Additionally, these boards are designed for
flexibility and portability: a) a board with many specific · Memory component interface circuitry
components and b) a small motherboard using daughter boards
with different functions. These proposed boards are used to design A minimum system based on microprocessor or microcontroller is
and develop digital control system for educational purposes, a special purpose microcomputer equipped with minimal extern
which can be used as a dedicated machine or embedded system, components (RAM, ROM, parallel ports, actuator sensors, etc.) to
and these boards enable faster design times. run programs [6]. The basics blocks for the minimum system are
shown in the Fig. 1.

Keywords
MC68HC11E1, Microprocessor, Microcontroller, Embedded
system, Minimum system.

1. INTRODUCTION
Microprocessors have been widely used since their invention. It is
ensures that the invention of the microprocessor revolutionized
the electronics industry. However, the following restrictions of
microprocessors led to the invention of microcontrollers [4]:
· Microprocessor needs external memory to perform programs.
Figure 1: Basic block diagram for general purpose
· Microprocessor cannot directly interface to I/O devices so minimum system.
the peripheral chips are needed.
The microcontrollers are used in a multitude of systems
· Glue logic (such as address decoders and buffers) is needed
present in everyday life, usually they are embedded in systems
to interconnect external memory and peripheral interface
where they control the characteristics or actions, such as
chips to the microprocessor.
dishwashers, TVs or cars, among others. A typical application
As a result of these limitations, a microprocessor-based design might be several microcontrollers to control small parts of a
cannot be made as small as desired. The invention of complex system [6]. They could communicate with others and/or
microcontrollers not only eliminated the majority of these a central processor, probably more powerful, sharing information
problems but also simplified the hardware design of and coordinating their actions as an alone computer.
microprocessor-based products.
The 68HC11 family is formed by microcontrollers (MC) of 8bits,
which can be considered on the medium-high gamma. The

3iJLQD
0(6$'(75$%$-2('8&$&,Ð1
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB

68HC11 was introduced in 1985 as update of an old MC, the · WatchDog system
6801, being its initial orientation on automobile applications, as
electronic ignition, electronic control of the motor, etc. · 38 lines of general purpose input/output which are grouped
Companies as General Motors, Chrysler, Volkswagen or Toyota as follows:
employ it in their automobiles. Notwithstanding, the 68HC11 is o 16 input/output bidirectional lines
used in all kind of applications such as, telecommunications,
home systems, military systems and industrialists (biomedical, o 11 input lines
cameras and video, telephones, instrumentation, etcetera), being o 11 output lines
one of the more popular MC in the world [1].
The 68HC11 has the advantage of functioning as a
An embedded system is a microprocessor-based system that is microprocessor or microcontroller, depending on the application.
built for controlling a function or range of functions in other more It is able to function without requiring external processing
complex system, and it is not designed to be programmed by the systems or data acquisition also implements sufficient hardware to
end user in the same way that a PC. Final user can choose communicate with a PC via its serial port. Unlike other families of
different functionalities but he cannot change or add microprocessors, the 68HC11 works with an internal or external
functionalities to the system. clock. There are several works in which 68HC11 is used as a math
As mentioned above, the 68HC11 family is advantageous to build coprocessor, for its high accuracy and efficiency of calculation,
a minimum system due to its inherent characteristics of flexibility. since it does not use simulated cycles during the processing
In this way, it is very interesting to use the minimum system as hardware and supports arithmetic operations like multiplication
embedded system for others hardware implementations or to and division. Therefore, it is a computationally efficient tool,
increase the speed of some applications. The MC68HC11E1 is which runs may be specified one dedicated to a particular task.
selected for this work and more detailed in [2].
In this work, two boards are proposed for educational purposes. 3. PROPOSED BOARDS
The aim is to provide portability and flexibility in two different The two proposed boards are designed and developed to satisfy
boards. Additionally, the users can examine systems based on the next user requirements on a educational environment.
microprocessor or microcontroller, which can improve the a) Trainer Card: Connecting to PC via serial port. The programs
educational experience and ability. The two boards provide can be sent from the PC to the boards for execution. Thus, the
several advantages: a) a board with many included components card is useful for debugging programs in testing and learning, as
and b) a motherboard with daughter boards. These board have for programming the MC68HC11E1 in four modes of operation.
several included characteristics, wich improve capabilities extend Designers can load programs into external memory of the MCU.
functions and work on two modes microprocessor and
microcontrollers. This document has de next sections: section 2, b) Autonomous Control Card: The boards running in standalone
revises theMC68HC11E1, section 3 presents the proposed boards, mode without connecting to PC. Every the system starts; it will
section 4 compares the implementations of the boards and their run the program previously programmed in the internal EEPROM
applications; section 5 describes the obtained results by of the MCU. Connecting peripherals via the expansion ports, it is
programming given algorithms and, finally, section 6 presents possible to manage and develop intelligent control systems as:
conclusions of this work. control of the lights in a house, robot control, alarm handling and
other ones. Moreover, the MC68HC11E1 can act as
microprocessor that executes instructions from external EEPROM
2. MICROCONTROLLER MC68HC11E1 by setting the correct logical values in the mode select inputs for
The MC68HC11E1 is an 8-bit microcontroller (MCU) with the operation expanded mode.
HCMOS (High-Speed CMOS) technology, a frequency bus of 3
MHz and an extensive list of internal resources. This MCU is c) Smart PC Peripheral: It can communicate the PC with the
capable of running all the M6800 and M6801 instructions, adding outside world. The boards act as a peripheral connected to the PC
91 instructions [3]. Its main features are: via the serial port. This peripheral intelligent can receive orders
and acts accordingly to do specific functions, expanding the
· Power supply of 5 volts capacity of the PC, performing simple calculations in order to
· Energy saving modes STOP and WAIT activated by software increase the performance, although, data communications would
be limited by the speed of the RS232 serial port that the PC
· 2 KB of EEPROM (Electrically-Erasable Programmable handles.
Read-Only Memory) with read protection
The proposed boards for the implement of a minimum system are
· Asynchronous serial communication port (compatible with two different versions. Each one has a particular organization of
RS -232) its components. The description of the proposed boards is
presented in the next subsections.
· Synchronous serial port, to the peripheral communication
with others devices
3.1 Minimum system on a single board
· 8-bit analog/digital converter with eight channels of data
acquisition
(S68E1)
The next proposed board is implementing on a single board;
· System timer based on a free-running 16-bit counter which means that the MCU, memories, and all control logic are
implemented in the same board, see Fig. 2.
· A pulse accumulator with a length of 8 bits

3iJLQD
0(6$'(75$%$-2('8&$&,Ð1
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB

information provided by the manufacturer about of the


components of microcontroller and programming tools. However,
information aboutMC68HC11A1 series in expanded mode can be
found, where theMC68HC11A1 is a version without memory
comparing to the A8. The A1 and E1 share design ideas, although
they have different memory map, then the first design of the
training boards was based on the minimum system proposed for
the A1 in [5], which, among other things, has a difference in the
memory map that affects when programs are loaded. The A1
minimum system was modified to match the E1 memory map; for
the simulations was handled the E9, which is a fuller version of
the E1 according to [7], and it has enabled its internal memory
and more processing power. The advantage was that the E9 and
E1 have the same pin configuration. The development cycle for
Figure 2: Main block diagram used for the S68E1 Board. training boards is shown in the Fig. 4.

The design was oriented in this way because are easily identifiable
the connections in a simple computer, such as: the CPU, data and
instruction bus, data memory, instruction memory and external
ports. The S68E1 provides make a simple implementations to the
users, where just he have to load a program and verify its
functionality, without worrying about the internal wiring. This
implement is handled a single card like “black box” that just need
appropriate inputs to generate outputs from the program loaded
into memory.

3.2 Microcontroller board and increase


memory board (D68E1)
The first version of the board is the implementation of a minimum
system in two cards for developing software applications and
hardware implementations on MC68HC11E1 Motorola
microcontroller, see Fig. 3. Figure 4: The design methodology of the system D68E1
and S68E1 from researching about the 68HC11 to making
evaluations.
In expanded mode, the MCU has a complete access, because all to
the internal addressing. There is an external addressing through
connections to the external memories. However, two input/output
ports are occupied, losing an external communication port. The
port B and port C are selected and used as address and data buses.
In this mode, it is used the internal ROM (Read-Only Memory)
but most cases, all addressing is external.
Already established the operation mode, it is analyzed the MCU
Figure 3: Main block diagram used for the D68E1 boards. memory map [2] to implement the connection between MCU and
external EEPROM. In this work, the EEPROM AT28C64B is
The design based on two boards is done by using modular
used, which has 64 KB of memory and is organized as 8192
methodology taking advantage of an approach that subdivides a
words of 8 bits. This EEPROM used 13 bits to the addressing
system into smaller parts. They are essentially very versatile
although the MCU addresses using 16 bits, so the most significant
boards and easy to handle. One of the two cards is the
3 bits from MCU come into a NAND gate (S68E1) or a decoder
implementation of the microcontroller in single mode, with serial
(D68E1) to enable or disable the AT28C64B in the high
communication interface, input/output ports, voltage regulator,
addresses, where the external EEPROM is located, shown in the
power input, voltage output ports and mode selector. The other
MCU memory map (see Fig. 5(a), (b) and it will be discuss in
card is composed by data and instruction memories, which are
more detail later).
used for the expanded mode. These cards are connected by a
communication bus for represent the complete minimum system. As it is seen in Fig. 5, to enable the output (for reading) of
AT28C64B, it is used the control signals R/W’ and E, which are
4. DEVELOPMENT OF THE TRAINING provided by the MCU. R/W’ is a signal from MCU extended
operation mode and used to denote the transfer data address
BOARDS contained in the data bus. A high logical level indicates reading
The first stage is based on constructing the minimum system, while a low logical level means writing. E is an internal clock
which is constituted for the 68HC11E1 in expanded mode; many output generated by the MCU oscillator system. E is a quarter part
documents are not found about this MC in expanded mode, only of the signal applied to the EXTAL and XTAL pins. Both signal

3iJLQD
0(6$'(75$%$-2('8&$&,Ð1
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB

(R/W’ and E) must be connected to control logic. The output from Select Two), and OE (Output Enable). Based in the MCU memory
the control logic is connected to OE pin (Output Enable) of map, CS1 is connected to a logic circuit, it is shown in Fig. 7.
AT28C64B. For this implementation, the writing pin of
AT28C64B is connected to 5 volts, since that this EEPROM is
enabled with low voltage.

Figure 7: Logic circuit for CS1.


CS2 is connected to 5 volts. OE is connected to a control logic
shown in Fig. 8.
Figure 5: Logic circuit for output enabling.

In the remain address lines, where the MCU is working on


expanded mode, the port C works as input/output data, operating
less significant 8 bits like address lines. To determinate in what
moment a port will be data or address, the MCU provides a signal
Address Strobe (AS). This signal is activated when the port C acts
as address bus. For multiplexing between data and address, an
octal D-type transparent latch (HD74LS373) is used to handle the
port C. This latch drives the output of the port C so that capturing
the low part of address bus does not overlap with the input data.
The last address lines are directly connected to the external Figure 8: Logic circuit for enabling memory writing.
EEPROM. In the same time, a 3-state octal bus transceiver The complete system allows the development of software
(DM74LS245) is used to avoid short circuit at the moment MCU implementations through a platform Linux or MS-DOS using
deliveries or receives information from the exterior. This last one Assembly language or C language. In both cases, the system can
utilizes the control signals E and R/W’, see Fig. 6. access all the resources of the microcontroller for testing and
validating; several examples are coded and loaded into external
EEPROM.
The Motorola AS11 is a cross assembler for programming the
68HC11 family, AS11 is free software. The gcc project is the
68HC11 Compiler (version open source GNU) for programming
in C. The last option has not been applied to the Training board.
Future work is to program a simple operation by the end user.
These two tools are available for Linux and MS-DOS, both tools
available to run on 32 bit architectures. The AS11 is a pure
assembly language, and in this language each statement is
translated directly to binary code, unlike the many assembly
languages that translate to special characters, the Fig. 9 shows a
block diagram of programming cycle. The writing of the program
or code is made by the universal programmer SuperPro280.

Figure 9: Stages to develop an application by using the


training card for the 68HC11.

There are some software tools that enable to send programs


Figure 6: Latch and octal bus connections. through the serial port directly to the internal memory of the E1.
These tools use the 68HC11 bootstrap mode to load a program
into the 68HC11 internal RAM, and then the program is loaded
Also, the training board consists of a RAM (Random Access into the internal EEPROM. The functioning of max232 for serial
Memory); in the application, HY6264A is used. This RAM has communication is shown in the Fig. 10 and the connections of the
EEPROM-like connections and the main difference is that there Max232 is shown in the Fig. 11.
are 3 pins for controlling it: CS1 (Chip Select One), CS2 (Chip

3iJLQD
0(6$'(75$%$-2('8&$&,Ð1
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB

When the MCU starts, by default, a RESET is made. The RESET


interrupt vector is located in the addresses from $FFFE to $FFFF
(represented in hexadecimal code), however, the external
EEPROM used only 13 bits, so the representation in hexadecimal
code is from $1FFE to $1FFF. In this implementation, the
addresses $1FFE and $1FFF will be used as RESET address.
After, there is a jump to program source address, but this is
written taking all 16 bits because if it just expresses less
significant 13 bits, then the MCU does not take right address, so
the program execution will fail. The next example shows the right
writing of the source program addresses and RESET address:
Figure 10: The block diagram for the connection between
68HC11 and a PC using the MAX232 interface.
%ORG \$1FFE
%FDB \$FC00
%ORG \$1C00
%; Your code goes here
%END
%

For the final tests, several programs are simulated to verify the
control of the internal registers of E1, manipulating the stack and
configuration registers. It was implement a development board
low-cost, with RS232 for serial communication, 8K RAM, 8K
EPROM, 8K EEPROM, an extension of all ports of the MCU,
switch pins, operation-mode pin, control signals, extension ports
of the pins XTAL and EXTAL (to connect a crystal Oscillator or a
function generator), dimmer (7805) and voltage outputs to
external another boards or protoboards. The structure of the final
board is shown in Fig. 12.

Figure 11: MAX232 connections.


Several programs are designed and implemented to evaluate the
board training, using mnemonic, more details in [1]. For writing
programs in assembly language, it is used the editor Notepad++,
while for the compilation process, it is used the assembler AS11.
This last one is a cross assembler because it produces object code
to Motorola architecture, but it is executed over an Intel
microprocessor. The process of logical simulation is performed in
HCSIM and Wookie, whereas the physical simulation is
performed using ISIS 7 Professional software. Finally, ARES 7
Professional and CircuitCAM 5.0 enable the final development of
the board in PCB (Printed Circuit Board).

5. RESULTS
After completing the analysis, design and implementation, the Figure 12: Final implementation of minimum system with
board is monitored and evaluated. The achievements are mainly the Motorola 68HC11E1
the experience and knowledge of microcomputer architectures; in
this case the Von Neumann architecture was implemented. Also, a An important point is that 3 bits (more significant) always will be
very powerful tool for the development of digital systems and high because multiplexing of the board training makes sure that
prototype is provided, avoiding the physical wiring to focus to the external memory is used.
assembly language programming and a very interesting possibility
for creation of compilers at high-level languages, allowing the 6. CONCLUSIONS
construction of complex systems. Using these boards, different The design D68E1 and S68E1 exploits the capabilities of
areas can be explored and these are not limited to hardware design 68HC11, because it is not limited to only complete an academic
or digital systems, for example, testing generated code by a simple work. Therefore, components for serial communication, RAM
assembler, experimenting with algorithms, prototypes of robots, memory expansion, the combinational logic to address external
and other interesting features to the designers. In addition, to memory elements and addressing the data bus were investigated
develop systems using open or free source allow use the tools by an evaluated, the management of bidirectional port C for data or
students without high costs for licensing and hardware tools. addresses. Diagrams for MC68HC11E1 were not found, the

3iJLQD
0(6$'(75$%$-2('8&$&,Ð1
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB

D68E1 and the S68E1 was fully designed and are available as board. Finally, the information about academic works based on
open source. 68HC11 is uncommon; all works are limited to programming on
This project has contributed significantly to identify and highlight commercial boards. Therefore, the generated information is basic
the points to be covered and considered. These points enable to knowledge for designing and development MC68HC11E1-based
perform the analysis, design and implementation of a minimum embedded systems.
system, aimed at a test board for amateurs, training from
identifying used components to developing the organizational 7. REFERENCES
design of these components, and evaluating and testing with the [1] J. S. M. C. Doblado, A. Prieto-Moreno and J. González,
final implementation. Embedded systems: Architecture, Programming and Design.
S.L. McGraw-Hill Education, 2003.
The obtained knowledge was about assembly programming, use
of mnemonics, knowledge of low-level language, the different [2] I. Freescale Semiconductor. M68HC11E: Family Data Sheet,
types of interruption, its operation and its implementation, Rev. 5.1. USA, 2005.
operation and handling of registers and stack, the different types [3] I. Freescale Semiconductor. M68HC11 Reference Manual.
of routing when programming (immediate, direct, extended, Freescale Semiconductor, Inc, USA, 2007.
indexed, inherent and relative), the operation of an LCD 2x16 in
open or closed loop with a communication to 4 or 8 bits, the [4] H.-W. Huang. MC 68HC12. An Introduction: Software and
software of logical and physical simulation, use of the tool Board Hardware Interfacing. Thomson Learning, USA, 2000.
Master for the realization of circuit patterns on 2-face printed [5] M. Inc. M68HC11 Reference Manual. USA, 1996.
circuit board fibre glass, and expertise on the development of [6] R. Kamal. Microcontrolador MC68HC11: Fundamentos,
board training. The logical circuits and flow diagrams can be Recursos y programación: Microbótica. Madrid, 1999.
useful for someone interested on MCU introduction; moreover,
the used components are common and can be easily acquired. The [7] J. R. P. Introducction to MC68HC11 Microcontroller.
project is available for improvements in the future as it has the Faculty of Electric Engineering of the Michoacana,
backup of the necessary information. University of San Nicolas de Hidalgo, Mexico, 2008.
Also, the student is introduced directly to manage microprocessor-
based architectures, in the same way that provides a training

3iJLQD

View publication stats

You might also like