By Rajesh Lal, Karamveer Yadav
Abstract
Microcontrollers
are microprocessors with integrated general-purpose
interfacing logic to facilitate the control of
peripheral devices.
Microcontroller-based
systems require the design of ahardware/software
interface that enables software running on the
microcontroller to control external devices. This
interface consists of the sequential logic that
physically connects the devices to the
microcontroller and the soft-ware drivers that
allow code to access the device functions.
This paper
presents a general systematic process of
developing this hardware and the software
interface using a recursive al-gorithm.Further a
case study of the Motrola based Microcontroller
68HC08 is done dsecribing its architecture and
various routines that are used in various
appliactions.
The practical
aplication of the micricontroller based system in
day to day life is demonstrated by taking the
various examples and a detailed study of of the
embedded refrigerator is done which explains the
very utility of the microcontrollers in
maximizing the performance of the appliance, and
to provide a variety of features within
refrigerators like energy efficiency improvent
Synthesis
of the Hardware/Software Interface in
Microcontroller-Based
Systems
Pai Chou Ross Ortega
Gaetano Borriell
Department of Computer
Science and Engineering
University of
Washington, Seattle, WA 98195
Abstract
Microcontrollers are
microprocessors with integrated
general-purpose
interfacing logic to facilitate the control of
peripheral devices.
Microcontroller-based systems require the design
of a
hardware/software
interface that enables software running
on the
microcontroller to control external devices. This
interface consists of
the sequential logic that physically
connects the devices
to the microcontroller and the soft-ware
drivers that allow
code to access the device functions.
This paper presents a
process of synthesiz-ing the hardware/software
interface using a
recursive al-gorithm.Practical example of a
refrigerator
is used to
demonstrate theutility of the Microcontrollers in
maximizing
the performance of
the appliance, and to provide a variety of
features
within refrigerators
and freezers.
1 Introduction
Microcontrollers
are microprocessors with integrated
general-purpose
interfacing logic to facilitate the control of
peripheral
devices. This logic is encapsulated in I/O ports
(i.e.,
collections of I/Opins and related interface
logic) that
can
be written to or read from by program code. Micro-controllers
are
commonly used to implement digital control
systems
because they require minimal interfacing hard-ware.
Peripheral
devices range from user input and display
units
to memories and communication interfaces.
Designers
of microcontroller-based systems must al-locate
devices
to ports and customize subroutines to ac-cess
the
devices under the specific port assignment chosen.
There
are several issues in performing this task. Most
im-portantly,
additional
hardware must be minimized so as to
maintain
the benefits of using a microcontroller, namely
reducing
part count. If there are more device pins than
port
pins,
then the ports need to be time-multiplexed with
the
This
work was supported by NSF under Grant MIP-8858782,
DARPA
under contract N00014-J-91-4041 , and Patricia
Roberts Harris
Fellowship.
corresponding de-multiplexing
performed in external hard-ware.
Another important goal
is to minimize code size. Ex-ploiting
the grouping of signals
can reduce the number of
instructions needed in
the driver routines. In certain cases,
memory-mapped I/O
techniques are used to access the de-vices
with the processors
address and data bus thereby by-passing
most of the port
interface logic. Since the address
and data busses also use
I/O pins to reach the devices, this
further complicates the
port assignment problem.
In this paper, we
describe a tool that automates the syn-thesis
of the hardware/software
interface between a micro-controller
and the devices it
controls. Optimizations of the
synthesis process focus
primarily on the minimization of
interface hardware and
also the code size of the device
driver routines. Section
2 specifies this interface synthe-sis
problem. Section 3
describes the data structures used to
represent the
microcontroller, devices, and hardware and
software primitives.
Section 4 presents the port allocation
algorithm. Section 5
highlights the features of this inter-face
synthesis tool with two
practical examples. Section 6
concludes the paper with
an evaluation and discussion of
future work.
2 Problem Specification
The
input to the port allocation tool consists of a
behav-ioral
description
of the system, peripheral device descrip-tions,
and a
microcontroller description. The ouput of the
tool
is a netlist, customized driver routines, and any
neces-sary
interface
components.
The
behavioral description is a high-level,
imperative
language
program written by the user describing the nec-essary
components
of the circuit and its functionality. This
program
has a declarative section and an operational sec-tion.
The
declarative section allocates static storage for
data
and instantiates peripheral devices. The
operational
section
computes functions and communicates with the pe-ripheral
devices
via driver calls. We assume that the user
program
is single-threaded.
|