The MC68HC11A8, MC68HC11A1, and MC68HC11A0 high-performance microcontroller units (MCUs)
are based on the M68HC11 Family. These high speed, low power consumption chips have multiplexed
buses and a fully static design. The chips can operate at frequencies from 3 MHz to dc. The three MCUs
are created from the same masks; the only differences are the value stored in the CONFIG register, and
whether or not the ROM or EEPROM is tested and guaranteed.
For detailed information about specific characteristics of these MCUs, refer to the
Manual
(M68HC11RM/AD).
M68HC11 Reference
1.1 Features
• M68HC11 CPU
• Power Saving STOP and WAIT Modes
• 8 Kbytes ROM
• 512 Bytes of On-Chip EEPROM
• 256 Bytes of On-Chip RAM (All Saved During Standby)
1.1 Features ..........................................................................................................................................1
2 Operating Modes and Memory Maps.......................................................................................................6
6 Serial Communications Interface (SCI)..................................................................................................23
7 Serial Peripheral Interface (SPI).............................................................................................................29
8 Main Timer..............................................................................................................................................32
In single-chip operating mode, the MC68HC11A8 is a monolithic microcontroller without external address or data buses.
In expanded multiplexed operating mode, the MCU can access a 64 Kbyte address space. The space
includes the same on-chip memory addresses used for single-chip mode plus external peripheral and
memory devices. The expansion bus is made up of ports B and C and control signals AS and R/W
address, R/W, and AS signals are active and valid for all bus cycles including accesses to internal memory locations. The following figure illustrates a recommended method of demultiplexing low-order addresses from data at port C.
. The
MOTOROLAMC68HC11A8
6MC68HC11A8TS/D
MC68HC11A8
PB7
PB6
PB5
PB4
PB3
PB2
PB1
PB0
PC7
PC6
PC5
PC4
PC3
PC2
PC1
PC0
AS
R/W
A15
A14
A13
A12
A11
A10
A9
A8
MC54/74HC373
D1
D2
D3
D4
D5
D6
D7
D8
LE
E
Q1
Q2
Q3
Q4
Q5
Q6
Q7
Q8
OE
A7
A6
A5
A4
A3
A2
A1
A0
WE
D7
D6
D5
D4
D3
D2
D1
D0
Figure 4 Address/Data Demultiplexing
Special bootstrap mode allows special purpose programs to be entered into internal RAM. The bootloader program uses the SCI to read a 256-byte program into on-chip RAM at $0000 through $00FF.
After receiving the character for address $00FF, control passes to the loaded program at $0000.
Special test mode is used primarily for factory testing.
2.1 Memory Maps
Memory locations are the same for expanded multiplexed and single-chip modes. The on-board 256byte RAM is initially located at $0000 after reset. The 64-byte register block originates at $1000 after
reset. RAM and/or the register block can be placed at any other 4K boundary ($x000) after reset by writing an appropriate value to the INIT register. The 512-byte EEPROM is located at $B600 through $B7FF
after reset if it is enabled. The 8 Kbyte ROM is located at $E000 through $FFFF if it is enabled.
Hardware priority is built into the memory remapping. Registers have priority over RAM, and RAM has
priority over ROM. The higher priority resource covers the lower, making the underlying locations inaccessible.
In special bootstrap mode, a bootloader ROM is enabled at locations $BF40 through $BFFF.
In special test and special bootstrap modes, reset and interrupt vectors are located at $BFC0 through
$BFFF.
MC68HC11A8 MOTOROLA
MC68HC11A8TS/D7
$0000
$1000
$B600
$E000
$FFFF
SINGLE
CHIP
EXT
EXT
EXPANDED
MUX
SPECIAL
BOOTSTRAP
EXTEXT
EXT
EXT
SPECIAL
TEST
0000
256 BYTES RAM
(CAN BE REMAPPED TO ANY
4K PAGE BY THE INIT REGISTER)
00FF
1000
64 BYTE REGISTER BLOCK
(CAN BE REMAPPED TO ANY
4K PAGE BY THE INIT REGISTER)
103F
B600
512 BYTES EEPROM
B7FF
BF40
BOOT
ROM
BFFF
E000
8K ROM
FFFF
BFC0
BFFF
FFC0
FFFF
SPECIAL
MODE
INTERRUPT
VECTORS
NORMAL
MODE
INTERRUPT
VECTORS
Figure 5 Memory Map
MOTOROLAMC68HC11A8
8MC68HC11A8TS/D
Table 3 MC68HC11A8 Register and Control Bit Assignments (Sheet 1 of 2)
(The register block can be remapped to any 4K boundary.)
1 = Data from internal reads is driven out through the external data bus
PSEL3–PSEL0 — Priority Select Bits 3 through 0
Refer to 3 Resets and Interrupts .
INIT — RAM and I/O Mapping
Bit 7654321Bit 0
RAM3RAM2RAM1RAM0REG3REG2REG1REG0
RESET:00000001
$103D
RAM[3:0] —256-Byte Internal RAM Map Position
RAM[3:0] determine the upper four bits of the RAM address, positioning RAM at the selected 4K boundary.
REG[3:0] —64-Byte Register Block Map Position
REG[3:0] determine the upper four bits of the register address, positioning registers at the selected 4K
boundary. Register can be written only once in the first 64 cycles out of reset in normal modes, or any
time in special modes.
MC68HC11A8 MOTOROLA
MC68HC11A8TS/D11
TEST1 — Factory Test
Bit 7654321Bit 0
TILOP0OCCRCBYPDISRFCMFCOPTCON
RESET:0000—000
$103E
Test Modes Only
TILOP — Test Illegal Opcode
OCCR — Output Condition Code Register to Timer Port
CBYP — Timer Divider Chain Bypass
DISR — Disable Resets from COP and Clock Monitor
DISR is forced to one out of reset in special test and bootstrap modes.
FCM — Force Clock Monitor Failure
FCOP — Force COP Watchdog Failure
TCON — Test Configuration Register
CONFIG — COP, ROM, EEPROM Enables
Bit 7654321Bit 0
0000NOSEC NOCOP ROMONEEON
RESET:0000————
$103F
NOTE
The bits of this register are implemented with EEPROM cells. Programming and
erasing follow normal EEPROM procedures. The erased state of CONFIG is $0F.
A new value is not readable until after a subsequent reset sequence. CONFIG can
only be programmed or erased in special modes.
NOSEC — EEPROM Security Disable
Refer to 4 Electrically Erasable Programmable Read-Only Memory (EEPROM) .
NOCOP — COP System Disable
Refer to 3 Resets and Interrupts .
ROMON — ROM Enable
In single-chip mode, ROMON is forced to one out of reset.
0 = 8K ROM removed from the memory map
1 = 8K ROM present in the memory map
EEON — EEPROM Enable
0 = EEPROM is removed from the memory map
1 = EEPROM is present in the memory map
MOTOROLAMC68HC11A8
12MC68HC11A8TS/D
3 ResetsandInterrupts
The MC68HC11A8 has three reset vectors and 18 interrupt vectors. The reset vectors are as follows:
• RESET
• COP Clock Monitor Fail
• COP Failure
The eight interrupt vectors service 23 interrupt sources (three non-maskable, 20 maskable). The three
non-maskable interrupt vectors are as follows:
• Illegal Opcode Trap
• Software Interrupt
• XIRQ Pin (Pseudo Non-Maskable Interrupt)
The 20 maskable interrupt sources are subject to masking by a global interrupt mask, the I bit in the
condition code register (CCR). In addition to the global I bit, all of these sources except the external
interrupt (IRQ
M68HC11 have separate interrupt vectors. For this reason, there is usually no need for software to poll
control registers to determine the cause of an interrupt. The maskable interrupt sources respond to a
fixed priority relationship, except that any one source can be dynamically elevated to the highest priority
position of any maskable source. Refer to the table of interrupt and reset vector assignments.
On-chip peripheral systems generate maskable interrupts that are recognized only if the I bit in the CCR
is clear. Maskable interrupts are prioritized according to a default arrangement, but any one source can
be elevated to the highest maskable priority position by the HPRIO register. The HPRIO register can be
written at any time, provided the I bit in the CCR is set.
For some interrupt sources, such as the parallel I/O and SCI interrupts, the flags are automatically
cleared during the course of responding to the interrupt requests. For example, the RDRF flag in the
SCI system is cleared by the automatic clearing mechanism, which consists of a read of the SCI status
register while RDRF is set, followed by a read of the SCI data register. The normal response to an
RDRF interrupt request is to read the SCI status register to check for receive errors, then to read the
received data from the SCI data register. These two steps satisfy the automatic clearing mechanism
without requiring any special instructions.
, or Power-On
) pin are controlled by local enable bits in control registers. Most interrupt sources in the
The real-time interrupt (RTI) function generates hardware interrupts at a fixed periodic rate. These hard-
ware interrupts provide a time reference signal for routines that measure real time. The routine notes
the number of times a particular interrupt has occurred and multiplies that number by the predetermined
subroutine execution time.
There are four RTI signal rates available in the MC68HC11A8. The MCU oscillator frequency and the
value of two software-accessible control bits, RTR1 and RTR0, in the pulse accumulator control register
(PACTL) determine these signal rates. Refer to 8 Main Timer for more information about PACTL.
MC68HC11A8 MOTOROLA
MC68HC11A8TS/D13
•
•
•
•
•
Table 4 Interrupt and Reset Vector Assignments
Vector AddressInterrupt SourceCCR MaskLocal Mask
FFC0, C1 – FFD4, D5Reserved——
FFD6, D7SCI Serial SystemI Bit
SCI Transmit CompleteTCIE
SCI Transmit Data Register EmptyTIE
SCI Idle Line DetectILIE
SCI Receiver OverrunRIE
SCI Receive Data Register FullRIE
DLY — Enable Oscillator Start-Up Delay on Exit from STOP
0 = No stabilization delay on exit from STOP
1 = Stabilization delay enabled on exit from STOP
CME — Clock Monitor Enable
0 = Clock monitor disabled; slow clocks can be used
1 = Slow or stopped clocks cause clock failure reset
CR1, CR0 — COP Timer Rate Select
Divide
CR [1:0]
0 0132.768 ms16.384 ms10.923 ms
0 14131.072 ms65.536 ms43.691 ms
1 016524.288 ms262.140 ms174.76 ms
1 1642.097 sec1.049 sec699.05 ms
15
E/2
By
E =1.0 MHz2.0 MHz3.0 MHz
COPRST — Arm/Reset COP Timer Circuitry
Bit 7654321Bit 0
76543210
RESET:00000000
XTAL = 4.0 Mhz
Timeout
–0/+32.8 ms
XTAL = 8.0 MHz
Timeout
–0/+16.4 ms
XTAL = 12.0 MHz
Timeout
–0/+10.9 ms
$103A
Write $55 to COPRST to arm COP watchdog clearing mechanism. Write $AA to COPRST to reset COP
watchdog.
HPRIO — Highest Priority I-Bit Interrupt and Miscellaneous
Bit 7654321Bit 0
RBOOTSMODMDAIRVPSEL3PSEL2PSEL1PSEL0
RESET:———— 0101
$103C
RBOOT — Read Bootstrap ROM Bits 7–4
Refer to 2 Operating Modes and Memory Maps .
SMOD — Special Mode Select
Refer to 2 Operating Modes and Memory Maps .
MDA — Mode Select A
Refer to 2 Operating Modes and Memory Maps .
IRV — Internal Read Visibility
Refer to 2 Operating Modes and Memory Maps .
PSEL[3:0] — Priority Select Bits 3 through 0
Can be written only while the I bit in the CCR is set (interrupts disabled). These bits select one interrupt
source to be elevated above all other I-bit related sources.
The bits of this register are implemented with EEPROM cells. Programming and
erasing follow normal EEPROM procedures. The erased state of CONFIG is $0F.
A new value is not readable until after a subsequent reset sequence. CONFIG can
only be programmed or erased in special modes.
NOSEC — EEPROM Security Disable
Refer to 4 Electrically Erasable Programmable Read-Only Memory (EEPROM) .
NOCOP — COP system disable
0 = COP enabled (forces reset on timeout)
1 = COP disabled (does not force reset on timeout)
The 512 bytes of EEPROM in the MC68HC11A8 are located at $B600 through $B7FF. The EEON bit
in CONFIG controls the presence or absence of the EEPROM in the memory map. When EEON = 1
(erased state), the EEPROM is enabled. When EEON = 0, the EEPROM is disabled and out of the
memory map. EEON is reset to the value last programmed into CONFIG. An on-chip charge pump develops the high voltage required for programming and erasing. When the E clock is less than 1 MHz,
select an internal clock. This drives the EEPROM charge pump by writing a one to the CSEL bit in the
OPTION register.
The PPROG register controls the programming and erasing of the EEPROM. To erase the EEPROM,
complete the following steps using the PPROG register:
1. Write to PPROG with the ERASE, EELAT, and appropriate BYTE and ROW bits set.
2. Write to the appropriate EEPROM address with any data. Row erase only requires a write to
any location in the row. Bulk erase is accomplished by writing to any location in the array.
3. Write to PPROG with ERASE, EELAT, EEPGM, and the appropriate BYTE and ROW bits set.
4. Delay for 10 ms or more, as appropriate.
5. Clear the EEPGM bit in PPROG to turn off the high voltage.
6. Clear the PPROG register to reconfigure the EEPROM address and data buses for normal op-
eration.
To program the EEPROM, complete the following steps using the PPROG register:
1. Write to PPROG with the EELAT bit set.
2. Write data to the desired address.
3. Write to PPROG with the EELAT and EEPGM bits set.
4. Delay for 10 ms or more, as appropriate.
5. Clear the EEPGM bit in PPROG to turn off the high voltage.
6. Clear the PPROG register to reconfigure the EEPROM address and data buses for normal op-
eration.
PPROG — EEPROM Programming Control$103B
Bit 7654321Bit 0
ODDEVEN0BYTEROWERASEEELATEEPGM
RESET:00000000
ODD — Program Odd Rows in Half of EEPROM (TEST)
EVEN — Program Even Rows in Half of EEPROM (TEST)
BYTE — Byte/Other EEPROM Erase Mode
The BYTE bit overrides the ROW bit.
0 = Row or bulk erase mode is used
1 = Erase only one byte of EEPROM
ROW — Row/All EEPROM Erase Mode
The ROW bit is only valid when BYTE = 0.
0 = All 512 bytes of EEPROM are erased
1 = Erase only one 16-byte row of EEPROM
0 = EEPROM address and data bus configured for normal reads
1 = EEPROM address and data bus configured for programming or erasing
EEPGM — EEPROM Program Command
0 = Programming or erase voltage switched off to EEPROM array
1 = Programming or erase voltage switched on to EEPROM array
CONFIG — COP, ROM, EEPROM Enables $103F
Bit 7654321Bit 0
0000NOSEC NOCOP ROMONEEON
RESET:0000————
NOTE
The bits of this register are implemented with EEPROM cells. Programming and
erasing follow normal EEPROM procedures. The erased state of CONFIG is $0F.
A new value is not readable until after a subsequent reset sequence. CONFIG can
only be programmed or erased in special modes.
—
NOSEC
EEPROM Security Disable
NOSEC has no meaning unless the security mask option was specified before the MCU was manufactured.
0 = Security enabled (available as a mask option on MC68HC11A8 only)
1 = Security disabled
NOCOP — COP system disable
Refer to 3 Resets and Interrupts.
ROMON — ROM Enable
Refer to 2 Operating Modes and Memory Maps.
EEON — EEPROM Enable
0 = EEPROM is removed from the memory map
1 = EEPROM is present in the memory map
MOTOROLAMC68HC11A8
18MC68HC11A8TS/D
5 ParallelInput/Output
The MC68HC11A8 has up to 38 input/output lines, depending on the operating mode. Port A has three
input-only pins, four output-only pins, and one bidirectional I/O pin. Port A shares functions with the timer system.
Port B is an 8-bit output-only port in single-chip modes and is the high-order address in expanded
modes.
Port C is an 8-bit bidirectional port in single-chip modes and the multiplexed address and data bus in
expanded modes.
Port D is a 6-bit bidirectional port that shares functions with the serial systems.
Port E is an 8-bit input-only port that shares functions with the A/D system.
Simple and full handshake input and output functions are available on ports B and C lines in single-chip
mode. A description of the handshake functions follows.
In port B simple strobed output mode, the STRB output is pulsed for two E-clock periods each time there
is a write to the PORTB register. The INVB bit in the PIOC register controls the polarity of STRB pulses.
In port C simple strobed input mode, port C levels are latched into the alternate port C latch (PORTCL)
register on each assertion of the STRA input. STRA edge select, flag and interrupt enable bits are located in the PIOC register. Any or all of the port C lines can still be used as general purpose I/O while
in strobed input mode.
Port C full handshake mode involves port C pins and the STRA and STRB lines. Input and output handshake modes are supported, and output handshake mode has a three-stated variation. STRA is an
edge detecting input, and STRB is a handshake output. Control and enable bits are located in the PIOC
register.
In full input handshake mode, the MCU uses STRB as a “ready” line to an external system. Port C logic
levels are latched into PORTCL when the STRA line is asserted by the external system. The MCU then
negates STRB. The MCU reasserts STRB after the PORTCL register is read. A mix of latched inputs,
static inputs, and static outputs is allowed on port C, differentiated by the data direction bits and use of
the PORTC and PORTCL registers.
In full output handshake mode, the MCU writes data to PORTCL, which in turn asserts the STRB output
to indicate that data is ready. The external system reads port C (the STRB output) and asserts the STRA
input to acknowledge that data has been received.
In the three-state variation of output handshake mode, lines intended as three-state handshake outputs
are configured as inputs by clearing the corresponding DDRC bits. The MCU writes data to PORTCL
and asserts STRB. The external system responds by activating the STRA input, which forces the MCU
to drive the data in PORTCL out on all of the port C lines. This mode variation does not allow part of
port C to be used for static inputs while other port C pins are being used for handshake outputs. Refer
to the PIOC register description.
MC68HC11A8 MOTOROLA
MC68HC11A8TS/D19
PORTA — Port A Data $1000
Bit 7654321Bit 0
PA7PA6PA5PA4PA3PA2PA1PA0
RESET:HiZ0000HiZHiZHiZ
Alt. Pin
Func.:PAIOC2OC3OC4OC5IC1IC2IC3
And/or:OC1OC1OC1OC1OC1———
PIOC — Parallel I/O Control$1002
Bit 7654321Bit 0
STAFSTAICWOMHNDSOINPLSEGAINVB
RESET:00000U11
STAF — Strobe A Interrupt Status Flag
Set when selected edge occurs on Strobe A. Cleared by PIOC read with STAF set followed by PORTCL
read (simple strobed or full input handshake mode) or PORTCL write (output handshake mode).
0 = Active level is logic zero
1 = Active level is logic one
MOTOROLAMC68HC11A8
20MC68HC11A8TS/D
Simple
strobed
mode
STAF
Clearing
Sequence
Read PIOC
with STAF=1
then read
PORTCL
Table 5 Parallel I/O Control
HNDSOINPLSEGAPort CPort B
0XXInputs latched
0
into PORTCL
on any active
edge on STRA
1
STRB
pulses on
writes to
port B
Full input
handshake
Full output
handshake
Read PIOC
with STAF=1
then read
PORTCL
Read PIOC
with STAF=1
then write to
PORTCL
100 = STRB
active level
1 = STRB
active pulse
110 = STRB
active level
1 = STRB
active pulse
1
0
0
1
Follow
DDRC
Port C
Driven
STRA
Active Edge
Follow
DDRC
Inputs latched
into PORTCL
on any active
edge on STRA
Driven as out-
puts if STRA at
active level,
follows DDRC
if STRA not at
active level
PORTC — Port C Data$1003
Bit 7654321Bit 0
PC7PC6PC5PC4PC3PC2PC1PC0
S. Chip
or Boot:PC7PC6PC5PC4PC3PC2PC1PC0
RESET:00000000
Expan. or
Test:
ADDR7/
DATA7
ADDR6/
DATA6
ADDR5/
DATA5
ADDR4/
DATA4
ADDR3/
DATA3
ADDR2/
DATA2
ADDR1/
DATA1
ADDR0/
DATA0
NOTE
In single chip and boot modes, port C pins reset to high impedance inputs (DDRC
registers are set to zero). In expanded and special test modes, port C is a multiplexed address/data bus and the port C register address is treated as an external
memory location.
Writes affect port C pins. PORTCL is used in the handshake clearing mechanism. When an active edge
occurs on the STRA pin, port C data is latched into the PORTCL register.
MC68HC11A8 MOTOROLA
MC68HC11A8TS/D21
DDRC — Data Direction Register for Port C $1007
Bit 7654321Bit 0
DDC7DDC6DDC5DDC4DDC3DDC2DDC1DDC0
RESET:00000000
DDC[7:0] — Data Direction Register for Port C
0 = Input
1 = Output
PORTD — Port D Data$1008
Bit 7654321Bit 0
00PD5PD4PD3PD2PD1PD0
RESET:00000000
Alt. Pin
Func.: — — SS
SCKMOSIMISO TxDRxD
DDRD — Data Direction Register for Port D $1009
Bit 7654321Bit 0
00DDD5DDD4DDD3DDD2DDD1DDD0
RESET:00000000
Alt. Pin
Func.:
——PD5/
SS
PD4/
SCK
PD3/
MOSI
PD2/
MISO
PD1/
TxD
PD0/
RxD
DDD[5:0] — Data Direction for Port D
0 = Input
1 = Output
PORTE — Port E Data$100A
Bit 7654321Bit 0
PE7PE6PE5PE4PE3PE2PE1PE0
RESET:UUUUUUUU
Alt. Pin
Func.:AN7AN6AN5AN4AN3AN2AN1AN0
PACTL — Pulse Accumulator Control $1026
Bit 7654321Bit 0
DDRA7PAENPAMODPEDGE00RTR1RTR0
RESET:00000000
DDRA7 — Data Direction for Port A Bit 7
0 = Input
1 = Output
PAEN — Pulse Accumulator System Enable
Refer to 9 Pulse Accumulator.
PAMOD — Pulse Accumulator Mode
Refer to 9 Pulse Accumulator.
PEDGE — Pulse Accumulator Edge Control
Refer to 9 Pulse Accumulator.
RTR1, RTR0 — Real-Time Interrupt Rate
Refer to 8 Main Timer.
MOTOROLAMC68HC11A8
22MC68HC11A8TS/D
6 SerialCommunicationsInterface(SCI)
The SCI, a universal asynchronous receiver transmitter (UART) serial communications interface, is one
of two independent serial I/O subsystems in the MC68HC11A8. It has a standard NRZ format (one start,
eight or nine data, and one stop bit) and several baud rates available. The SCI transmitter and receiver
are independent, but use the same data format and bit rate.
If M bit is set, R8 stores ninth bit in receive data character.
T8 — Transmit Data Bit 8
If M bit is set, T8 stores ninth bit in transmit data character.
M — Mode (Select Character Format)
0 = Start bit, 8 data bits, 1 stop bit
1 = Start bit, 9 data bits, 1 stop bit
MOTOROLAMC68HC11A8
26MC68HC11A8TS/D
WAKE — Wake Up by Address Mark/Idle
0 = Wake up by IDLE line recognition
1 = Wake up by address mark (most significant data bit set)
SCCR2 — SCI Control Register 2 $102D
Bit 7654321Bit 0
TIETCIERIEILIETERERWUSBK
RESET:00000000
TIE — Transmit Interrupt Enable
0 = TDRE interrupts disabled
1 = SCI interrupt requested when TDRE status flag is set
TCIE — Transmit Complete Interrupt Enable
0 = TC interrupts disabled
1 = SCI interrupt requested if TC is set to one
RIE — Receiver Interrupt Enable
0 = RDRF and OR interrupts disabled
1 = SCI interrupt requested when RDRF flag or the OR status flag is set
ILIE — Idle Line Interrupt Enable
0 = IDLE interrupts disabled
1 = SCI interrupt requested when IDLE status flag is set
TE — Transmitter Enable
0 = Transmitter disabled
1 = Transmitter enabled
RE — Receiver Enable
0 = Receiver disabled
1 = Receiver enabled
RWU — Receiver Wake Up Control
0 = Normal SCI receiver
1 = Wake up enabled and receiver interrupts inhibited
SBK — Send Break
0 = Break generator off
1 = Break codes generated as long as SBK is set to one
SCSR — SCI Status Register$102E
Bit 7654321Bit 0
TDRETCRDRFIDLEORNFFE0
RESET:11000000
TDRE — Transmit Data Register Empty Flag
Set if transmit data can be written to SCDR; if TDRE is zero, transmit data register is busy. Cleared by
SCSR read with TDRE set followed by SCDR write.
TC — Transmit Complete Flag
Set if transmitter is idle (no data, preamble, or break transmission in progress). Cleared by SCSR read
with TC set followed by SCDR write.
MC68HC11A8 MOTOROLA
MC68HC11A8TS/D27
RDRF — Receive Data Register Full Flag
Set if a received character is ready to be read from SCDR. Cleared by SCSR read with RDRF set followed by SCDR read.
IDLE — Idle Line Detected Flag
Set if the RxD line is idle. IDLE flag is inhibited when RWU is set to one. Cleared by SCSR read with
IDLE set followed by SCDR read. Once cleared, IDLE is not set again until the RxD line has been active
and becomes idle again.
OR — Overrun Error Flag
Set if a new character is received before a previously received character is read from SCDR. Cleared
by SCSR read with OR set followed by SCDR read.
NF — Noise Error Flag
Set if majority sample logic detects anything other than a unanimous decision. Cleared by SCSR read
with NF set followed by SCDR read.
FE — Framing Error
Set if a zero is detected where a stop bit was expected. Cleared by SCSR read with FE set followed by
SCDR read.
SCDR — SCI Data Register$102F
Bit 7654321Bit 0
R7/T7R6/T6R5/T5R4/T4R3/T3R2/T2R1/T1R0/T0
RESET:UUUUUUUU
NOTE
Receive and transmit are double buffered. Reads access the receive data buffer
and writes access the transmit data buffer.
MOTOROLAMC68HC11A8
28MC68HC11A8TS/D
7 SerialPeripheralInterface(SPI)
The SPI is one of two independent serial communications subsystems that allow the MCU to communicate synchronously with peripheral devices and other microprocessors. Data rates can be as high as
one half of the E-clock rate when configured as master, and as fast as the E clock when configured as
slave.
INTERNAL
MCU CLOCK
DIVIDER
÷2 ÷4 ÷16 ÷32
SELECT
SPR0
SPR1
SPI CONTROL
SPI CLOCK (MASTER)
MSBLSB
8/16-BIT SHIFT REGISTER
READ DATA BUFFER
MSTR
SPE
CLOCK
LOGIC
CLOCK
S
M
M
S
PIN CONTROL LOGIC
S
M
MSTR
DWOM
SPE
MISO
PD2
MOSI
PD3
SCK
PD4
SS
PD5
MODF
WCOL
SPIF
SPR0
SPR1
CPHA
CPOL
MSTR
DWOM
SPE
SPIE
8
SPI STATUS REGISTER
SPI INTERRUPT
REQUEST
88
INTERNAL
DATA BUS
SPI CONTROL REGISTER
Figure 9 SPI Block Diagram
DDRD — Data Direction Register for Port D $1009
Bit 7654321Bit 0
00DDD5DDD4DDD3DDD2DDD1DDD0
RESET:00000000
Alt. Pin
Func.:
____PD5/
SS
PD4/
SCK
PD3/
MOSI
PD2/
MISO
PD1/
TxD
PD0/
RxD
11 SPI BLOCK
MC68HC11A8 MOTOROLA
MC68HC11A8TS/D29
DDD[5:0] — Data Direction for Port D
1
When DDRD bit 5 is zero and MSTR = 1 in SPCR, PD5/SS is a general-purpose output and mode fault
logic is disabled.
Set when an SPI transfer is complete. Cleared by reading SPSR with SPIF set followed by SPDR access.
WCOL — Write Collision
Set when SPDR is written while transfer is in progress. Cleared by SPSR with WCOL set followed by
SPDR access.
MODF — Mode Fault (A Mode Fault Terminates SPI Operation)
Set when SS
is pulled low while MSTR = 1. Cleared by SPSR read with MODF set followed by SPCR
write.
SPDR — SPI Data Register$102A
Bit 7654321Bit 0
Bit 7654321Bit 0
NOTE
SPI is double buffered in, single buffered out.
MC68HC11A8 MOTOROLA
MC68HC11A8TS/D31
8 MainTimer
The main timer is based on a free-running 16-bit counter with a four-stage programmable prescaler. A
timer overflow function allows software to extend the system's timing capability beyond the counter's
16-bit range.
The timer has three channels of input capture and five channels of output compare.
Refer to the following table for a summary of crystal-related frequencies and periods.
Table 6 Timer Summary
XTAL Frequencies
Control
Bits
PR[1:0]Main Timer Count Rates
0 0
1 count —
overflow —
0 1
1 count —
overflow —
1 0
1 count —
overflow —
1 1
1 count —
overflow —
RTR[1:0]Periodic (RTI) Interrupt Rates
0 0
0 1
1 0
1 1
4.0 MHz8.0 MHz12.0 MHzOther Rates
1.0 MHz2.0 MHz3.0 MHz(E)
1000 ns500 ns333 ns(1/E)
1.0 µs
65.536 ms
4.0 µs
262.14 ms
8.0 µs
524.29 ms
16.0 µs
1.049 s
8.192 ms
16.384 ms
32.768 ms
65.536 ms
500 ns
32.768 ms
2.0 µs
131.07 ms
4.0 µs
262.14 ms
8.0 µs
524.29 ms
4.096 ms
8.192 ms
16.384 ms
32.768 ms
333 ns
21.845 ms
1.333 µs
87.381 ms
2.667 µs
174.76 ms
5.333 µs
349.52 ms
2.731 ms
5.461 ms
10.923 ms
21.845 ms
(E/1)
(E/2
(E/4)
(E/2
(E/8)
(E/2
(E/16)
(E/2
(E/2
(E/2
(E/2
(E/2
16
18
19
20
13
14
15
16
)
)
)
)
)
)
)
)
MOTOROLAMC68HC11A8
32MC68HC11A8TS/D
PRESCALER
MCU
E CLK
1, 4, 8, OR 16
PR1PR0
16-BIT COMPARATOR =
TOC1 (HI)TOC1 (LO)
16-BIT COMPARATOR =
TOC2 (HI)TOC2 (LO)
16-BIT COMPARATOR =
TOC3 (HI)TOC3 (LO)
16-BIT COMPARATOR =
TOC4 (HI)TOC4 (LO)
16-BIT COMPARATOR =
TI4/O5 (HI) TI4/O5 (LO)
16-BIT LATCH CLK
16-BIT LATCH
TIC1 (HI)TIC1 (LO)
16-BIT LATCH
TIC2 (HI)TIC2 (LO)
16-BIT LATCH
TIC3 (HI)TIC3 (LO)
DIVIDE BY
16-BIT TIMER BUS
CLK
CLK
CLK
TCNT (HI)TCNT (LO)
16-BIT FREE RUNNING
COUNTER
OC1F
OC2F
OC3F
OC4F
OC5
I4/O5F
IC4
I4/O5
IC1F
IC2F
IC3F
TFLG 1
STATUS
FLAGS
TOI
TOF
TAPS FOR RTI,
COP WATCHDOG, AND
PULSE ACCUMULATOR
FOC1
FOC2
FOC3
FOC4
FOC5
CFORC
FORCE OUTPUT
COMPARE
TMSK 1
INTERRUPT
ENABLES
OC1I
OC2I
OC3I
OC4I
I4/O5I
IC1I
IC2I
IC3I
9
INTERRUPT REQUESTS
(FURTHER QUALIFIED BY
I BIT IN CCR)
TO PULSE
ACCUMULATOR
8
BIT 7
7
BIT 6
6
BIT 5
5
BIT 4
4
BIT 3
3
BIT 2
2
BIT 1
1
BIT 0
PORT A
PIN CONTROL
CAPTURE COMPARE BLOCK
PIN
FUNCTIONS
PA7/OC1/
PAI
PA6/OC2/
OC1
PA5/OC3/
OC1
PA4/OC4/
OC1
PA3/OC5/
IC4/OC1
PA2/IC1
PA1/IC2
PA0/IC3
Figure 11 Main Timer
NOTE: Port A pin actions are controlled by OC1M, OC1D, PACTL, TCTL1, and TCTL2 registers.
MC68HC11A8 MOTOROLA
MC68HC11A8TS/D33
CFORC — Timer Compare Force$100B
Bit 7654321Bit 0
FOC1FOC2FOC3FOC4FOC5000
RESET:00000000
FOC5–FOC1 — Write ones to Force Compare(s)
0 = Not affected
1 = Output compare x action occurs, but OCxF flag bit not set
OC1M — Output Compare 1 Mask $100C
Bit 7654321Bit 0
OC1M7OC1M6OC1M5OC1M4OC1M3000
RESET:00000000
Set bit(s) to enable OC1 to control corresponding pin(s) of port A.
OC1D — Output Compare 1 Data $100D
Bit 7654321Bit 0
OC1D7OC1D6OC1D5OC1D4OC1D3000
RESET:00000000
If OC1Mx is set, data in OC1Dx is output to port A bit x on successful OC1 compares.
TCNT — Timer Counter$100E, $100F
$100EBit 1514131211109Bit 8HighTCNT
Bit 7654321Bit 0Low
TCNT resets to $0000. In normal modes, TCNT is read-only.
Bits in TMSK2 correspond bit for bit with flag bits in TFLG2. Ones in TMSK2 enable
the corresponding interrupt sources.
PR1 and PR0 — Timer Prescaler Select
In normal modes, PR1 and PR0 can only be written once, and the write must be within 64 cycles after
reset. Refer to Table 6 for specific timing values.
MOTOROLAMC68HC11A8
36MC68HC11A8TS/D
PR[1:0]Prescaler
0 01
0 14
1 08
1 116
TFLG2 — Timer Interrupt Flag 2 $1025
Bit 7654321Bit 0
TOFRTIFPAOVFPAIF0000
RESET:00000000
Clear flags by writing a one to the corresponding bit position(s).
TOF — Timer Overflow Flag
Set when TCNT changes from $FFFF to $0000.
RTIF — Real-Time (Periodic) Interrupt Flag
Set periodically. Refer to RTR[1:0] bits in PACTL register.
PAOVF — Pulse Accumulator Overflow Interrupt Flag
Refer to 9 Pulse Accumulator.
PAIF — Pulse Accumulator Input Edge Interrupt Flag
The MC68HC11A8 has an 8-bit counter that can be configured to operate as a simple event counter or
for gated time accumulation, depending on the PAMOD bit in the PACTL register. The pulse accumulator counter can be read or written at any time.
The port A bit 7 I/O pin can be configured as a clock in event counting mode, or as a gate signal to enable a free-running clock (E divided by 64) in gated time accumulation mode.
00PAI falling edge increments the counter
01PAI rising edge increments the counter
10A zero on PAI inhibits counting
11A one on PAI inhibits counting
RTR1 and RTR0 — Real-Time Interrupt (RTI) Rate
Refer to 8 Main Timer.
PACNT — Pulse Accumulator Counter$1027
Bit 7654321Bit 0
Bit 7654321Bit 0
RESET:00000000
Can be read and written.
MOTOROLAMC68HC11A8
40MC68HC11A8TS/D
10 Analog-to-Digital Converter
The A/D converter system uses an all capacitive charge redistribution technique to convert analog signals to digital values. The MC68HC11A8 A/D system is an 8-channel, 8-bit, multiplexed-input, successive-approximation converter and is accurate to ±1 least significant bit (LSB). It does not require
external sample and hold circuits because of the type of charge redistribution technique used.
Dedicated lines VRH and VRL provide the reference supply voltage inputs. Refer to the A/D converter
block diagram.
A multiplexer allows the single A/D converter to select one of 16 analog signals, as shown in the ADCTL
register description.
PE0
AN0
PE1
AN1
PE2
AN2
PE3
AN3
PE4
AN4
PE5
AN5
PE6
AN6
PE7
AN7
ANALOG
MUX
8-BIT CAPACITIVE DAC
WITH SAMPLE AND HOLD
SUCCESSIVE APPROXIMATION
REGISTER AND CONTROL
RESULT
RESULT REGISTER INTERFACE
CD
MULT
SCAN
CCF
ADCTL A/D CONTROL
CC
CB
CA
V
V
RH
RL
INTERNAL
DATA BUS
ADR1 A/D RESULT 1ADR2 A/D RESULT 2ADR3 A/D RESULT 3ADR4 A/D RESULT 4
EA9 A/D BLOCK
Figure 13 A/D Converter Block Diagram
MC68HC11A8 MOTOROLA
MC68HC11A8TS/D41
E CLOCK
12 E CYCLES
MSB
CYCLES
BIT 6
BIT 5
BIT 4
BIT 3
BIT 2
BIT 1
LSB
4
CYC
2
2
2
2
2
CYC
CYC
CYC
CYC
CYC
2
CYC
2
2
CYC
END
SAMPLE ANALOG INPUTSUCCESSIVE APPROXIMATION SEQUENCE
WRITE TO ADCTL
SET CC FLAG
CONVERT FIRST
CHANNEL, UPDATE
0326496128 — E CYCLES
ADR1
CONVERT SECOND
CHANNEL, UPDATE
ADR2
CONVERT THIRD
CHANNEL, UPDATE
ADR3
CONVERT FOURTH
CHANNEL, UPDATE
ADR4
REPEAT SEQUENCE, SCAN = 1
A/D CONVERSION TIM
Figure 14 A/D Conversion Sequence
DIFFUSION/POLY
ANALOG
INPUT
PIN
< 2 pF
INPUT
PROTECTION
DEVICE
+ ~20V
– ~0.7V
+ ~12V
– ~0.7V
DUMMY N-CHANNEL
OUTPUT DEVICE
COUPLER
≤ 4 KΩ
400 nA
JUNCTION
LEAKAGE
*
~ 20 pF
DAC
CAPACITANCE
V
RL
* THIS ANALOG SWITCH IS CLOSED ONLY DURING THE 12-CYCLE SAMPLE TIME.
Figure 15 Electrical Model of an Analog Input Pin (Sample Mode)
ADCTL — A/D Control/Status$1030
Bit 7654321Bit 0
CCF0SCANMULTCDCCCBCA
RESET:U0UUUUUU
CCF — Conversions Complete Flag
Set after an A/D conversion cycle. Cleared when ADCTL is written.
SCAN — Continuous Scan Control
0 = Do four conversions and stop
1 = Convert four channels in selected group continuously
MULT — Multiple Channel/Single Channel Control
0 = Convert single channel selected
1 = Convert four channels in selected group
ANALOG INPUT PIN
MOTOROLAMC68HC11A8
42MC68HC11A8TS/D
CD–CA — Channel Select D through A
Table 10 A/D Converter Channel Assignments
Channel Select Control BitsChannel Result in ADRx if
Table 11 Analog Input to 8-Bit Result Translation Table
Bit 7654321Bit 0
(1)
%
(2)
Volts
(1)
% of VRH–V
50%25%12.5%6.25%3.12%1.56%0.78%0.39%
2.5001.2500.6250.31250.15620.07810.03910.0195
(2)
RL
VRL = 0.0 V; V
RH
= 5.0 V
OPTION — System Configuration Options$1039
Bit 7654321Bit 0
ADPUCSELIRQE*DLY*CME0CR1*CR0*
RESET:00010000
*Can be written only once in first 64 cycles out of reset in normal modes, or any time in special modes.
ADPU — A/D Power Up
0 = A/D Converter powered down
1 = A/D Converter powered up
CSEL
—
Clock Select
0 = A/D and EEPROM use system E clock
1 = A/D and EEPROM use internal RC clock
MC68HC11A8 MOTOROLA
MC68HC11A8TS/D43
IRQE — IRQ Select Edge Sensitive Only
Refer to 3 Resets and Interrupts.
DLY — Enable Oscillator Start-Up Delay on Exit from STOP
Refer to 3 Resets and Interrupts.
CME — Clock Monitor Enable
Refer to 3 Resets and Interrupts.
CR1, CR0 — COP Timer Rate Select
Refer to 3 Resets and Interrupts.
MOTOROLAMC68HC11A8
44MC68HC11A8TS/D
Motorola reserves the right to make changes without further notice to any products herein. Motorola makes no warranty, representation or guarantee regarding
the suitability of its products for any particular purpose, nor does Motorola assume any liability arising out of the application or use of any product or circuit, and
specifically disclaims any and all liability, including without limitation consequential or incidental damages. “Typical” parameters can and do vary in different
applications. All operating parameters, including “Typicals” must be validated for each customer application by customer’s technical experts. Motorola does not
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 or sustain 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
unintended 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
B are registered trademarks of Motorola, Inc. Motorola, Inc. is an Equal Opportunity/Affirmative Action Employer.
6F Seibu-Butsuryu-Center, 3-14-2 Tatsumi Koto-Ku, Tokyo 135, Japan. 03-3521-8315
HONG KONG: Motorola Semiconductors H.K. Ltd.; 8B Tai Ping Industrial Park,
51 Ting Kok Road, Tai Po, N.T., Hong Kong. 852-26629298
M
MC68HC11A8TS/D
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.