Professional Documents
Culture Documents
Microcomputer Ain at Automotive Applications
Microcomputer Ain at Automotive Applications
are also available in other registers to enable or disable the however, include A/D channels. The use of an external A/D
toggle facility in both BO and B1 independently. This feature device can be easily interfaced to the MC68HCOSC4 through
provides the designer with an extremely flexible dual timer the use of the SPI bus which will be explained later in this
structure, totally under software control, using no more than paper.
22 control bits. To use the MC68HCOSC4 for ignition control designs, its
The MC68705S3 and MC6805S3 include one more timer. timer architecture has to be utilized fully. Fig. 3 shows the
This can be utilized for an extra timer requirement. One MC68HCOSC4 timer block diagram. As can be seen, the timer
example would be to measure road speed. This timer is 8 bits uses a 16-bit architecture throughout. A 16-bit free running
and shares either prescaler 1 or 2. It also features an input read counter is utilized along with a fixed divide by four prescalers.
capture latch that is refreshed when an external voltage The timer can resolve down to 2 As with a 4-MHz external
transition occurs on pins PCO or PCI. crystal. The input capture register would be used to measure
A 12-bit auxiliary counter is used on the MC6805S2 and engine speed and spark timing. The output compare register
MC68705S3 devices for a system watchdog. If the MCU would set up the coil "on" time. As with the MC6805S2
should lose control of the program and execute through non- devices, the MC68HCOSC4 software program has to service
valid memory space, this auxiliary counter will reset the the timer subsystem. The timer control register (TCR)
MCU. The auxiliary counter is a fixed 12-bit counter with just contains 5 bits of which 3 bits control interrupt flags associated
two modes of operation. It runs at internal clock frequency with the timer status register (TSR). The other two bits control
(fosc divided by four). The total count period is 4095 cycles. the input capture edge detector polarity and the output level
The MCU communicates with this counter via the MR bits 5 when the next successful output compare occurs. Fig. 4 shows
and 4 (MR5, MR4). Upon overflow, the auxiliary counter the bit definition for the TCR.
control/status bit in MR5 is set. Countdown may be aborted at TSR contains only 3 bits which are READ ONLY. These three
any time under program control, which also will reset the bits indicate if an input capture transaction has occured, a
counter to 4095 ($FFF). To do this, the microcomputer must match has been found between the free running counter and
write to MR5 the inverse of what is read from MR5. the output compare register, and if the free running counter
During reset, the auxiliary counter is preset to its maximum has rolled over. Fig. 5 shows the TSR and its bit definition.
count of 4095 ($FFF), and MR5 is cleared. The value of the Other internal specifications for the microcomputers listed
counter is not accessible to the MCU; however, the possibility in this paper are fairly straightforward and can be obtained
of detecting an underflow and presetting it at any time under from the manufacturer's product specifications [2]-[4].
program control allows it to be used as a fixed-rate polled
timer in applications requiring lengthy time-out periods. III. DIGITAL INSTRUMENTATION SYSTEMS
When the auxiliary counter reset mask bit in MR4 is clear The MC6805K2 device offers several features for automo-
and the MR5 bit is set as a result of counter time out, the reset tive instrumentation designs. The most important is the 128
pin is internally pulled to ground. This feature is useful in bytes of EEPROM. This can essentially store 128 alphanu-
many applications, and particularly in automotive systems, meric characters. Table I lists data that would be desirable to
where the MCU operates in a noisy environment. retain for system functionality and serviceability. Service
diagnostics may include maximum values of vehicle speed,
II. MC68HCO5 IGNITION engine RPM, and temperature. The vehicle ID and manufac-
The MC68HCOSC4 8-bit microcomputer may also be used turing codes could be accessed by the dealer's diagnostic
for ignition applications. This device features higher tempera- equipment, or possibly a home computer for the "do-it
ture ranges plus low-power requirements. It does not, yourself" car owner.
ARTUSI AND VALENTINE: NEW M6805 MICROCOMPUTERS 285
LO I
Fig. 6. MC6805K2 instrument cluster.
software design, and data may be routed over two separate data transfer has taken place. Two devices attempting to be
wires allowing full duplex operations. Fig. 7 shows a block outputs are normally the result of software error; however, a
diagram of the SPI subsystem used in the MC6805S2 and system protocol may be defined which contains a default
MC6805K2 devices. master, which automatically restarts the transfers when a
A system clock shifts data into or out of the data register collision occurs [7].
(MSB in first; MSB out first) in a synchronous fashion. Clock There are two levels of the SPI circuit available to the user.
timing is programmable for rising or falling edge transitions. These two levels of SPI are implemented to ensure that the
The fact that the SPI may be the master, clocking the slaves or user may serially communicate in either a synchronous or
vice versa implies that the SPI clock may operate at different asynchronous fashion. An MCU with a Level I SPI also has
speeds in a single system. the asynchronous Serial Communication Interface (SCI) cir-
An MCU is considered a master when its slave select pin is cuit on-chip, whereas an MCU with a Level 2 SPI does not.
a logic high. The slave select pin acts as a chip select in a Level 1 SPI is available on the MC68HCO5C4 and
multi-MCU system and allows devices to be addressed MC68HC11. The Level 2 SPI circuits are available on the
individualy. To ensure that there is only one master control- MC6805S2 and MC6805K2 MCU's.
ling the system at a time, hardware constantly monitors the A Level 2 SPI allows the user to cross couple on-chip
slave select logic when the SPI is programmed as the master. peripheral circuits to the SPI circuit thus increasing its
If a master is transmitting data and the slave select pin is pulled versatility and allowing the user to configure SCI line using
an
low, the master will relinquish the bus and become a slave. a combination of software and hardware' [8]. An RS-232
Also, a mode fault flag will be set to indicate that an error in interface with a maximum speed of 9600 baud is achievable by
ARTUSI AND VALENTINE: NEW M 6805 MICROCOMPUTERS 287
tying the receiver input to the Interrupt 2 input for synchroniz- PCI
7
SEC ImI I BY/AU W/E VPOx PGE PLE SOB
ing the on-chip clock to the center of the incoming bits. Cross
coupling of on-chip peripheral circuits allows a software/ B7,SEC - SECURITY BIT
B6,IVM - INTERNAL VOLTAGE MULTIPLER ENABLE
hardware combination to implement the Philips IIC bus (Inter B4,BY/BU - BYTE OR BULK OPERATION
IC bus) [9]. B3,WJE - WRITE OR ERASE SELECT
B2,VPON - VPP DETECTOR,READ ONLY
Despite the apparent complexity of control and the number B I ,PGE - PROGAMMING ENABLE
of bytes required or involved in the SPI operation, once the BO,PLE - ADDRESS/DATA LATCH ENABLE
control bits are initialized correctly they need not change. Fig. 8. MC6805K2 program control register.
Therefore, the SPI actually operates under control of only few
bits.
A Level 2 SPI uses the on-chip timer as the clock source in
the clock master mode, the maximum bit rate frequency is 125
kHz (Level 1 maximum is 1.05 MHz output and 2.1 MHz
input). Also the use of an on-chip timer allows a greater
selection of bit-rate frequencies.
MC6805K2's EEPROM are: The EEPROM technology when used in a single-chip MCU,
greatly increases the usefulness of MCU-based automotive
engine tune-up calibration tables; systems.
odometer/speedometer;
seat positioning information for multiple drivers; REFERENCES
radio station memory; [1] P. E. V. Philips and M. W. Lowndes, "Microprocessor based
DIP switch replacement for module configuration; ignition-an innovative solution," Motorola Ltd., Milton Keynes,
England, Nov. 1983.
keyless entry systems (Driver ID); [2] Motorola Inc., MC6805S2 data sheet, 1984.
maintenance reminder; [31 Motorola Inc., MC68HC05C4 data sheet, 1984.
system configuration information. [4] Motorola Inc., MC6805K2 design spec., Internal Doc., May 7, 1984.
[5] D. R. Gonzales, "SPI bus eases multiple MCU hookup," Design
VI. SUMMARY News, pp. 89-95, May 7, 1984.
[61 M. Gallup, "The serial peripheral interface enhances system expan-
As the microcomputer technology continues its evolution sion," presented at Electro/84 Conf., Boston, MA, May 1984.
[7] D. R. Gonzales, "SPI bus eases multiple MCU hookup," Design
towards more complex and powerful single-chip microcontrol- News, pp. 89-95, May 7, 1984.
lers, automotive system designers will be able to incorporate [8] - , Appl. Note AN-901, Motorola Inc., May 1984.
sophisticated features that were not economically feasible just [9] Philips International BV, HC Bus Spec.
[10] P. M. Yates, "Application of non-volatile memory in automobile
a few years ago. The use of standardized serial bus ports will odometers," Lucas Electrical Electronics and Systems Limited, En-
allow systems to be configured with minimal interconnections. gland, 1983.