The MC68HC11F1 is a high-performance member of the M68HC11 family of microcontroller units
(MCUs). High-speed expanded systems required the development of this chip with its extra input/output
(I/O) ports, an increase in static RAM (one Kbyte), internal chip-select functions, and a non-multiplexed
bus which reduces the need for external interface logic. The timer, serial I/O, and analog-to-digital (A/
D) converter enable functions similar to those found in the MC68HC11E9.
The MC68HC11FC0 is a low cost, high-speed derivative of the MC68HC11F1. It does not have
EEPROM or an analog-to-digital converter. The MC68HC11FC0 can operate at bus speeds as high as
six MHz.
This document provides a brief overview of the structure, features, control registers, packaging information and availability of the MC68HC11F1 and MC68HC11FC0. For detailed information on
M68HC11 subsystems, programming and the instruction set, refer to the
(M68HC11RM/AD).
M68HC11 Reference Manual
1.1 Features
• MC68HC11 CPU
• 512 Bytes of On-Chip Electrically Erasable Programmable ROM (EEPROM) with Block Protect
(MC68HC11F1 only)
• 1024 Bytes of On-Chip RAM (All Saved During Standby)
• Enhanced 16-Bit Timer System
— 3 Input Capture (IC) Functions
— 4 Output Compare (OC) Functions
— 4th IC or 5th OC (Software Selectable)
• On-Board Chip-Selects with Clock Stretching
• Real-Time Interrupt Circuit
• 8-Bit Pulse Accumulator
• Synchronous Serial Peripheral Interface (SPI)
• Asynchronous Nonreturn to Zero (NRZ) Serial Communication Interface (SCI)
The following devices all have 1024 bytes of RAM. In addition, the MC68HC11F1 devices have 512
bytes of EEPROM. None of the devices contain on-chip ROM.
Table 1 MC68HC11F1 Standard Device Ordering Information
VDD is the positive power input to the MCU, and VSS is ground.
RESET
This active-low input initializes the MCU to a known startup state. It also acts as an open-drain
output to indicate that an internal failure has been detected in either the clock monitor or the COP
watchdog circuits.
XTAL and EXTAL
These two pins provide the interface for either a crystal or a CMOS-compatible clock to drive the
internal clock circuitry. The frequency applied to these pins is four times the desired bus
frequency (E clock).
E
This pin provides an output for the E clock, the basic timing reference signal for the bus circuitry.
The address bus is active when E is low, and the data bus is active when E is high.
DS
The data strobe output is the inverted E clock. DS is present on the MC68HC11FC0 only.
WAIT
This input is used to stretch the bus cycle to accomodate slower devices. The MCU samples the
logic level at this pin on the rising edge of E clock. If it is high, the MCU holds the E clock high for
the next four EXTAL clock cycles. If it is low, the E clock responds normally, going low two
EXTAL cycles later. The WAIT pin is present on the MC68HC11FC0 only.
4XOUT
This pin provides a buffered oscillator signal to drive another M68HC11 MCU. The 4XOUT pin is
not present on the 64-pin QFP MC68HC11FC0 package.
IRQ
This active-low input provides a means of generating asynchronous, maskable interrupt requests
for the CPU.
XIRQ
This interrupt request input can be made non-maskable by clearing the X bit in the MCU’s
condition code register.
MODA/LIR and MODB/VSTBY
The logic level applied to the MODA and MODB pins at reset determines the MCU’s opreating
mode (see Table 7 in 4 Operating Modes and System Initialization). After reset, MODA
functions as LIR, an open-drain output that indicates the start of an instruction cycle. MODB
functions as V
, providing a backup battery to maintain the contents of RAM when VDD falls.
STBY
R/W
In expanded and test modes, R/W indicates the direction of transfers on the external data bus.
VRH and V
RL
These pins provide the reference voltage for the analog-to-digital converter. Use bypass
capacitors to minimize noise on these signals. Any noise on VRH and VRL will directly affect A/D
accuracy. These pins are not present on the MC68HC11FC0.
MOTOROLAMC68HC11F1/FC0
12MC68HC11FTS/D
Port Signals
On the MC68HC11F1, 54 pins are arranged into six 8-bit ports (ports A, B, C, E, F, and G) and
one 6-bit port (port D). On the MC68HC11FC0, either 52 or 49 pins are available, depending on
the package. General-purpose I/O port signals are discussed briefly in the following pragraphs.
For additional information, refer to 7 Parallel Input/Output.
Port A Pins
Port A is an 8-bit general-purpose I/O port (PA[7:0]) with a data register (PORTA) and a data
direction register (DDRA). Port A pins share functions with the 16-bit timer system. Out of reset,
PA[7:0] are general-purpose high-impedance inputs.
Port B Pins
Port B is an 8-bit output-only port. In single-chip modes, port B pins are general-purpose output
pins (PB[7:0]). In expanded modes, port B pins act as the high-order address lines ADDR[15:8].
Port C Pins
Port C is an 8-bit general-purpose I/O port with a data register (PORTC) and a data direction
register (DDRC). In single-chip modes, port C pins are general-purpose I/O pins PC[7:0]. In
expanded modes, port C pins are configured as data bus pins DATA[7:0].
Port D Pins
Port D is a 6-bit general-purpose I/O port with a data register (PORTD) and a data direction
register (DDRD). The six port D lines PD[5:0] can be used for general-purpose I/O or for the serial
communications interface (SCI) or serial peripheral interface (SPI) subsystems.
Port E Pins
Port E is an 8-bit input-only port that is also used as the analog input port for the analog-to-digital
converter. Port E pins that are not used for the A/D system can be used as general-purpose
inputs. However, PORTE should not be read during the sample portion of an A/D conversion
sequence.
NOTE
The A/D system is not available on the MC68HC11FC0. PE7 and PE0 are not
available on the 80-pin MC68HC11FC0. PE7, PE4, and PE0 are not available on
the 64-pin MC68HC11FC0.
Port F Pins
Port F is an 8-bit output-only port. In single-chip mode, port F pins are general-purpose output
pins PF[7:0]. In expanded mode, port F pins act as the low-order address outputs ADDR[7:0].
Port G Pins
Port G is an 8-bit general-purpose I/O port. When enabled, four chip select signals are alternate
functions of PG[7:4].
NOTE
PG[1:0] are not available on the 64-pin MC68HC11FC0.
MC68HC11F1/FC0 MOTOROLA
MC68HC11FTS/D13
3 Control Registers
The MC68HC11F1 and MC68HC11FC0 control registers determine most of the system’s operating
characteristics. They occupy a 96-byte relocatable memory block. Their names and bit mnemonics are
summarized in the following table. Addresses shown are the default locations out of reset.
3.1 MC68HC11F1 Control Registers
Table 5 MC68HC11F1 Register and Control Bit Assignments
The 16-bit address bus can access 64 Kbytes of memory. Because the MC68HC11F1 and
MC68HC11FC0 are intended to operate principally in expanded mode, there is no internal ROM and
the address bus is non-multiplexed. Both devices include 1 Kbyte of static RAM, a 96-byte control register block, and 256 bytes of bootstrap ROM. The MC68HC11F1 also includes 512 bytes of EEPROM.
RAM and registers can be remapped on both the MC68HC11F1 and the MC68HC11FC0. On both the
MC68HC11F1 and the MC68HC11FC0, out of reset RAM resides at $0000 to $03FF and registers reside at $1000 to $105F. On the MC68HC11F1, RAM and registers can both be remapped to any 4Kbyte boundary. On the MC68HC11FC0, RAM can be remapped to any 1-Kbyte boundary, and registers can be remapped to any 4-Kbyte boundary in the first 16 Kbytes of address space.
RAM and control register locations are defined by the INIT register, which can be written only once within the first 64 E-clock cycles after a reset in normal modes. It becomes a read-only register thereafter.
If RAM and the control register block are mapped to the same boundary, the register block has priority
of the first 96 bytes.
x
In expanded and special test modes in the MC68HC11F1, EEPROM is located from $
where x represents the value of the four high-order bits of the CONFIG register. EEPROM is enabled
by the EEON bit of the CONFIG register. In single-chip and bootstrap modes, the EEPROM is located
from $FE00 to $FFFF.
4.1 Operating Modes
Bootstrap ROM resides at addresses $BF00–$BFFF, and is only available when the MCU operates in
special bootstrap operating mode. Operating modes are determined by the logic levels applied to the
MODB and MODA pins at reset.
E00 to $xFFF,
In single-chip mode, the MCU functions as a self-contained microcontroller and has no external address
or data bus. Ports B, C and F are available for general-purpose I/O (GPIO). Ports B and F are outputs
only; each of the port C pins can be configured as input or output.
CAUTION
The MC68HC11FC0 must not be configured to boot in single-chip mode because
it has no internal ROM or EEPROM. Operation of the device in single-chip mode
will result in erratic behavior.
In expanded mode, the MCU can access external memory. Ports B and F provide the address bus, and
port C is the data bus.
Special bootstrap mode is a variation of single chip mode that provides access to the internal bootstrap
ROM. In this mode, the user can download a program into on-chip RAM through the serial communication interface (SCI).
Special test mode, a variation of expanded mode, is primarily used during Motorola’s internal production
testing, but can support emulation and debugging during program development.
Table 7 shows a summary of operating modes, mode select pins, and control bits in the HPRIO register.
1. RAM can be remapped to any 4-Kbyte boundary ($x000). “x” represents the value contained in RAM[3:0] in the
INIT register.
2. The register block can be remapped to any 4-Kbyte boundary ($y000). “y” represents the value contained in
REG[3:0] in the INIT register.
3. Special test mode vectors are externally addressed.
4. In special test mode the address locations $zD00—$zDFF are not externally addressable. “z” represents the value of bits EE[3:0] in the CONFIG register.
5. EEPROM can be remapped to any 4-Kbyte boundary ($z000). “z” represents the value contained in EE[3:0] in
the CONFIG register.
Figure 7 MC68HC11F1 Memory Map
MC68HC11F1/FC0 MOTOROLA
MC68HC11FTS/D19
$0000 —
$03FF —
—
—
—
—
—
1024 BYTES RAM
—
1
$1000 —
$105F —
$BF00 —
$BFFF —
$FE00 —
$FFC0 —
$FFFF —
SINGLE
CHIP
—
—
—
—
—
—
EXTERNAL
EXTERNAL
EXPANDED
—
—
—
—
—
—
BOOTSTRAP
SPECIAL
—
—
—
—
—
—
EXTERNAL
EXTERNAL
SPECIAL
TEST
256 BYTES
BOOTSTRAP
ROM
96-BYTE REGISTER FILE
$BFC0
SPECIAL
MODE
INTERRUPT
VECTORS
$BFFF
$FFC0
NORMAL
MODE
INTERRUPT
VECTORS
$FFFF
2
MODA = 0
MODB = 1
MODA = 1
MODB = 1
MODA = 0
MODB = 0
MODA = 1
MODB = 0
NOTES:
1. RAM can be remapped to any 1-Kbyte boundary, depending on the value contained in the RAM field in the INIT
register.
2. The register block can be remapped to $0000, $2000, or $3000, depending on the value contained in REG[1:0]
in the INIT register.
Figure 8 MC68HC11FC0 Memory Map
4.3 System Initialization Registers
HPRIO — Highest Priority Interrupt and Miscellaneous$x03C
Bit 7654321Bit 0
RBOOTSMODMDAIRVPSEL3PSEL2PSEL1PSEL0
RESET:0 0 000101Single-Chip
00100101Expanded
11010101Bootstrap
01110101Special Test
MOTOROLAMC68HC11F1/FC0
20MC68HC11FTS/D
RBOOT — Read Bootstrap ROM
RBOOT is valid only when SMOD is set to one (special bootstrap or special test mode). RBOOT can
only be written in special modes but can be read anytime.
0 = Boot loader ROM disabled and not in memory map
1 = Boot loader ROM enabled and in memory map at $BF00–$BFFF
SMOD and MDA — Special Mode Select and Mode Select A
The initial value of SMOD is the
of reset. The initial value of MDA
inverse
equals
of the logic level present on the MODB pin at the rising edge
the logic level present on the MODA pin at the rising edge of
reset. These two bits can be read at any time. They can be written at any time in special modes. Neither
bit can be written in normal modes. SMOD cannot be set once it has been cleared. Refer to Table 8.
This bit can be read at any time. It can be written at any time in special modes, but only once in normal
modes. In single-chip and bootstrap modes, IRV has no meaning or effect.
0 = Internal reads not visible
1 = Data from internal reads is driven on the external data bus
PSEL[3:0] — See 5.2 Reset and Interrupt Registers, page 27.
INIT — RAM and I/O Mapping (MC68HC11FC0 only)$x03D
Bit 7654321Bit 0
RAM5RAM4RAM3RAM2RAM1RAM0REG1REG0
RESET:00000001
The INIT register can be written only once in first 64 cycles out of reset in normal modes, or at any time
in special modes.
NOTE
The register diagram above applies to the MC68HC11FC0 only. A diagram and bit
descriptions of the INIT register in the MC68HC11F1 are provided elsewhere in
this section.
RAM[5:0] — Internal RAM Map Position
These bits determine the upper six bits of the RAM address and allow mapping of the RAM to any oneKbyte boundary.
REG[1:0] — Register Block Map Position
These bits determine the location of the register block, as shown in Table 9.
The INIT register can be written only once in first 64 cycles out of reset in normal modes, or at any time
in special modes.
NOTE
The register diagram above applies to the MC68HC11F1 only. A diagram and bit
descriptions of the INIT register in the MC68HC11FC0 are provided elsewhere in
this section.
RAM[3:0] — Internal RAM Map Position
These bits determine the upper four bits of the RAM address and allow mapping of the RAM to any fourKbyte boundary. Refer to Table 10.
REG[3:0] — 96-Byte Register Block Map Position
These bits determine bits the upper 4 bits of the register block and allow mapping of the register block
to any four-Kbyte boundary. Refer to Table 10.
OPT2 — System Configuration Option Register 2$x038
Bit 7654321Bit 0
GWOMCWOMCLK4XLIRDV—SPRBYP——
RESET00100000
GWOM — Port G Wired-OR Mode Option
Refer to 7.8 Parallel I/O Registers, page 36.
MOTOROLAMC68HC11F1/FC0
22MC68HC11FTS/D
CWOM — Port C Wired-OR Mode Option
Refer to 7.8 Parallel I/O Registers, page 37.
CLK4X — 4XCLK Output Enable
This bit can only be written once after reset in all modes.
0 = 4XOUT clock output is disabled
1 = Buffered oscillator is driven on the 4XOUT clock output
LIRDV — Load Instruction Register Driven
In order to detect consecutive instructions in a high-speed application, LIR can be driven high for one
quarter of an E-clock cycle during each instruction fetch.
0 = LIR signal is not driven high.
1 = LIR signal is driven high.
Bits 3, 1, 0 — Not implemented. Reads always return zero and writes have no effect.
SPRBYP — See 10.2 SPI Registers, page 52.
OPTION — System Configuration Options$x039
Bit 7654321Bit 0
ADPUCSELIRQE*DLY*CMEFCME*CR1*CR0*
RESET:00010000
*Can be written only once in first 64 cycles out of reset in normal modes, or at any time in special modes.
ADPU — A/D Power-Up
This bit is implemented on the MC68HC11F1 only. On the MC68HC11FC0, reads always return zero
and writes have no effect.
0 = A/D system disabled
1 = A/D system enabled
CSEL — Clock Select
This bit is implemented on the MC68HC11F1 only. On the MC68HC11FC0, reads always return zero
and writes have no effect.
0 = A/D and EEPROM use system E clock
1 = A/D and EEPROM use internal RC clock
IRQE — IRQ Select Edge Sensitive Only
0 = Low level recognition
1 = Falling edge recognition
DLY — Enable Oscillator Start-Up Delay on Exit from STOP
0 = No stabilization delay on exit from STOP
1 = Stabilization delay of 4064 E-clock cycles is 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
FCME — Force Clock Monitor Enable
0 = Clock monitor circuit follows the state of the CME bit
1 = Clock monitor circuit is enabled until the next reset
In order to use both STOP and the clock monitor, the CME bit should be written to zero prior to executing
a STOP instruction and rewritten to one after recovery from STOP. FCME should be kept cleared if the
user intends to use the STOP instruction.
CR[1:0] — COP Timer Rate Select
Refer to 5.2 Reset and Interrupt Registers, page 27.
Bits 7:3 — See 6.2 EEPROM Registers, page 30. (These bits are implemented on the MC68HC11F1 only.)
NOCOP — COP System Disable
0 = COP enabled (forces reset on time-out)
1 = COP disabled (does not force reset on time-out)
TEST1 — Factory Test $x03E
Bit 7654321Bit 0
TILOP0OCCRCBYPDISRFCMFCOP0
RESET:0000—000
These bits can only be written in test and bootstrap modes.
TILOP — Test Illegal Opcode
This test mode allows serial testing of all illegal opcodes without servicing an interrupt after each illegal
opcode is fetched.
0 = Normal operation (trap on illegal opcodes)
1 = Inhibit LIR
when an illegal opcode is found
Bit 6 — Not implemented. Reads always return zero and writes have no effect.
OCCR — Output Condition Code Register to Timer Port
0 = Normal operation
1 = Condition code bits H, N, Z, V and C are driven on PA[7:3] to allow a test system to monitor
CPU operation
CBYP — Timer Divider Chain Bypass
0 = Normal operation
1 = The 16-bit free-running timer is divided into two 8-bit halves and the prescaler is bypassed. The
system E clock drives both halves directly.
DISR — Disable Resets from COP and Clock Monitor
In test and bootstrap modes, this bit is reset to one to inhibit clock monitor and COP resets. In normal
modes, DISR is reset to zero.
0 = Normal operation
1 = COP and Clock Monitor failure do not generate a system reset
FCM — Force Clock Monitor Failure
0 = Normal operation
1 = Generate an immediate clock monitor failure reset. Note that the CME bit in the OPTION register
must also be set in order to force the reset.
FCOP — Force COP Watchdog Failure
0 = Normal operation
1 = Generate an immediate COP failure reset. Note that the NOCOP bit in the CONFIG register
must be cleared (COP enabled) in order to force the reset.
Bit 0 — Not implemented. Reads always return zero and writes have no effect.
MOTOROLAMC68HC11F1/FC0
24MC68HC11FTS/D
5 Resets and Interrupts
There are three sources of reset on the MC68HC11F1 and MC68HC11FC0, each having its own reset
vector:
• RESET pin
• Clock monitor failure
• Computer operating properly (COP) failure
There are 22 interrupt sources serviced by 18 interrupt vectors. (The SCI interrupt vector services five
SCI interrupt sources.) Three of the interrupt vectors are non-maskable:
• Illegal opcode trap
• Software interrupt
• XIRQ pin (pseudo non-maskable interrupt)
The other 19 interrupts, generated mostly by on-chip peripheral systems, are maskable. Maskable interrupts are recognized only if the global interrupt mask bit (I) in the condition code register (CCR) is
clear. Maskable interrupts have a default priority arrangement out of reset. However, any one interrupt
source can be elevated to the highest maskable priority position by writing to the HPRIO register. This
register can be written at any time, provided the I bit in the CCR is set.
In addition to the global I bit, all maskable interrupt sources except the external interrupt (IRQ
subject to local enable bits in control registers. Each of these interrupt sources also sets a corresponding flag bit in a control register that can be polled by software.
Several of these flags are automatically cleared during the normal course of responding to the interrupt
requests. For example, the RDRF flag is set when a byte has been received in the SCI. 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. It is precisely these two steps that are required
to clear the RDRF flag, so no further instructions are necessary.
5.1 Interrupt Sources
The following table summarizes the interrupt sources, vector addresses, masks, and flag bits.
pin) are
MC68HC11F1/FC0 MOTOROLA
MC68HC11FTS/D25
Table 11 Interrupt and Reset Vector Assignments
Vector AddressInterrupt SourceCCR MaskLocal MaskFlag Bit
FFC0, C1
to
FFD4, D5
FFD6, D7SCI Serial System
SCI Transmit CompleteTCIETC
SCI Transmit Data Register EmptyTIETDRE
SCI Idle Line DetectILIEIDLE
SCI Receiver OverrunRIEOR
SCI Receive Data Register FullRIERDRF
1 MHz-0/+32.768 ms32.768 ms131.072 ms524.288 ms2.097 s
2 MHz-0/+16.384 ms16.384 ms65.536 ms262.144 ms1.049 s
3 MHz-0/+10.923 ms10.923 ms43.691 ms174.763 ms699.051 ms
4 MHz-0/+8.192 ms8.192 ms32.768 ms131.072 ms524.288 ms
5 MHz-0/+6.554 ms6.554 ms26.214 ms104.858 ms419.430 ms
6 MHz-0/+5.461 ms5.461 ms21.84587.381 ms349.525 ms
Any E
15
/E215/E217/E219/E221/E
-0/+2
COPRST — Arm/Reset COP Timer Circuitry$x03A
Bit 7654321Bit 0
76543210
RESET:0000 0 0 0 0
Write $55 to COPRST to arm the COP watchdog clearing mechanism. Then write $AA to COPRST to
reset the COP timer. Performing instructions between these two steps is possible provided both steps
are completed in the correct sequence before the timer times out.
HPRIO — Highest Priority I-Bit Interrupt and Miscellaneous $x03C
Bit 7654321Bit 0
RBOOT SMODMDA IRVPSEL3PSEL2PSEL1PSEL0
RESET:0101
Bits [7:4] — See 4.3 System Initialization Registers, page 20.
PSEL[3:0] — Interrupt Priority Select Bits
Can be written only while the I bit in the CCR is set (interrupts disabled). These bits select one interrupt
source to have priority over other I-bit related sources.
Table 13 Highest Priority Interrupt Selection
PSEL[3:0]Interrupt Source Promoted
0000Timer Overflow
0001Pulse Accumulator Overflow
0010Pulse Accumulator Input Edge
0011SPI Serial Transfer Complete
0100SCI Serial System
0101Reserved (Default to IRQ
0110IRQ
0111Real-Time Interrupt
1000Timer Input Capture 1
1001Timer Input Capture 2
1010Timer Input Capture 3
Bits 7:3, 1:0 — See 6.2 EEPROM Registers, page 30.
NOCOP — COP System Disable
0 = COP enabled (forces reset on time-out)
1 = COP disabled (does not force reset on time-out)
MOTOROLAMC68HC11F1/FC0
28MC68HC11FTS/D
6 Electrically Erasable Programmable ROM
The MC68HC11F1 has 512 bytes of electrically erasable programmable ROM (EEPROM). A nonvolatile, EEPROM-based configuration register (CONFIG) controls whether the EEPROM is present or absent and determines its position in the memory map. In single-chip and bootstrap modes the EEPROM
is positioned at $FE00–$FFFF. In expanded and special test modes, the EEPROM can be repositioned
to any 4-Kbyte boundary ($xE00–$xFFF).
NOTE
EEPROM is available on the MC68HC11F1 only.
6.1 EEPROM Operation
The EEON bit in CONFIG controls whether the EEPROM is present in the memory map. When
EEON = 1, the EEPROM is enabled. When EEON = 0, the EEPROM is disabled and removed from the
memory map. EEON is forced to one out of reset in single-chip and special bootstrap modes to enable
EEPROM. EEON is forced to zero out of reset in special test mode to remove EEPROM from the memory map, although test software can turn it back on. In normal expanded mode, 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 frequency is 1 MHz or above, the charge pump is driven by the E-clock. When the E-clock frequency is less than 1 MHz, select the internal RC oscillator to drive the EEPROM charge pump by writing one to the CSEL bit in the OPTION register. Refer to the discussion of the OPTION register in 4.3
System Initialization Registers, page 23.
6.2 EEPROM Registers
BPROT — Block Protect$x035
Bit 7654321Bit 0
000PTCONBPRT3BPRT2BPRT1BPRT0
RESET00011111
Bits [7:5] — Not implemented. Reads always return zero and writes have no effect.
PTCON — Protect for CONFIG
0 = CONFIG register can be programmed or erased normally
1 = CONFIG register cannot be programmed or erased
Block protect register bits can be written to zero (protection disabled) only once
within 64 cycles of a reset in normal modes, or at any time in special modes. Block
protect register bits can be written to one (protection enabled) at any time.
MC68HC11F1/FC0 MOTOROLA
MC68HC11FTS/D29
PPROG — EEPROM Programming Control$x03B
Bit 7654321Bit 0
ODDEVEN0BYTEROWERASEEELATEEPGM
RESET00000000
ODD — Program Odd Rows (TEST)
EVEN — Program Even Rows (TEST)
ROW and BYTE — Row Erase Select Bit and Byte Erase Select
The value of these bits determines the manner in which EEPROM is erased. Bit encodings are shown
in 6.2 EEPROM Registers, page 30.
The CONFIG register is used to assign EEPROM a location in the memory map and to enable or disable
EEPROM operation. Bits in this register are user-programmed except when forced to certain values, as
noted in the following bit descriptions.
EE[3:0] — EEPROM Map Position
EEPROM is located at $xE00 – $xFFF, where x is the value represented by these four bits. In singlechip and bootstrap modes, EEPROM is forced to $FE00 – $FFFF, regardless of the state of these bits.
On factory-fresh devices, EE[3:0] = $0.
Bit 3 — Not implemented. Reads always return one and writes have no effect.
NOCOP — COP System Disable
0 = COP enabled (forces reset on time-out)
1 = COP disabled (does not force reset on time-out)
MOTOROLAMC68HC11F1/FC0
30MC68HC11FTS/D
Bit 1 — Not implemented. Reads always return one and writes have no effect.
EEON — EEPROM Enable
This bit is forced to one in single-chip and bootstrap modes. In test mode, EEON is forced to zero out
of reset. In expanded mode, the EEPROM obeys the state of this bit.
0 = EEPROM is removed from the memory map.
1 = EEPROM is present in the memory map.
Refer to 6.4 CONFIG Register Programming for instructions on programming this register.
6.3 EEPROM Programming and Erasure
Programming and erasing the EEPROM is controlled by the PPROG register, subject to the block pro-
tect (BPROT) register value. To erase the EEPROM, ensure that the proper bits of the BPROT register
are cleared, and then complete the following steps:
1. Write to PPROG with the ERASE and EELAT bits set and the BYTE and ROW bits set or
cleared as appropriate.
2. Write to the appropriate EEPROM address with any data. Row erase ($xE00–$xE0F, $xE10–
$xE1F,... $xFF0–$xFFF) requires a single write to any location in the row. Perform bulk erase
by writing to any location in the array.
3. Write to PPROG with the ERASE, EELAT, and EEPGM bits set and the BYTE and ROW bits
set or cleared as appropriate.
4. Delay for 10 ms (20 ms for low-voltage operation).
5. Clear the EEPGM bit in PPROG to turn off the high voltage.
6. Clear the PPROG register to reconfigure EEPROM address and data buses for normal operations.
To program the EEPROM, ensure that the proper bits of the BPROT register are cleared, and then complete the following steps:
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 (20 ms for low-voltage operation).
5. Clear the EEPGM bit in PPROG to turn off the high voltage.
6. Clear the PPROG register to reconfigure EEPROM address and data buses for normal operations.
6.3.1 Programming a Byte
The following example shows how to program an EEPROM byte. This example assumes that the appropriate bits in BPROT are cleared and that the data to be programmed is present in accumulator A.
PROGLDAB#$02EELAT=1, EEPGM=0
STAB$103BSet EELAT bit
STAA$FE00Store data to EEPROM address
LDAB#$03EELAT=1, EEPGM=1
STAB$103BTurn on programming voltage
JSRDLY10Delay 10 ms
CLR$103BTurn off high voltage and set to READ mode
6.3.2 Bulk Erase
The following example shows how to bulk erase the 512-byte EEPROM. The CONFIG register is not
affected in this example. Note that when the CONFIG register is bulk erased, CONFIG and the 512-byte
array are all erased.
BULKELDAB#$06ERASE=1, EELAT=1, EEPGM=0
STAB$103BSet EELAT bit
MC68HC11F1/FC0 MOTOROLA
MC68HC11FTS/D31
STAB$FE00Store any data to any EEPROM address
LDAB#$07EELAT=1, EEPGM=1
STAB$103BTurn on programming voltage
JSRDLY10Delay 10 ms
CLR$103BTurn off high voltage and set to READ mode
6.3.3 Row Erase
The following example shows how to perform a fast erase of large sections of EEPROM. This example
assumes that index register X contains the address of a location in the desired row.
ROWELDAB#$0EROW=1, ERASE=1, EELAT=1, EEPGM=0
STAB$103BSet to ROW erase mode
STAB$xxxxStore any data to any address in ROW
LDAB#$0FROW=1, ERASE=1, EELAT=1, EEPGM=1
STAB$103BTurn on high voltage
JSRDLY10Delay 10 ms
CLR$103BTurn off high voltage and set to READ mode
6.3.4 Byte Erase
The following is an example of how to erase a single byte of EEPROM. This example assumes that index register X contains the address of the byte to be erased.
STAB$103BSet to BYTE erase mode
STAB$0,XStore any data to address to be erased
LDAB#$17BYTE=1, ROW=0, ERASE=1, EELAT=1, EEPGM=1
STAB$103BTurn on high voltage
JSRDLY10Delay 10 ms
CLR$103BTurn off high voltage and set to READ mode
6.4 CONFIG Register Programming
Because the CONFIG register is implemented with EEPROM cells, use EEPROM procedures to erase
and program this register. The procedure for programming is the same as for programming a byte in
the EEPROM array, except that the CONFIG register address is used. CONFIG can be programmed or
erased (including byte erase) while the MCU is operating in any mode, provided that PTCON in BPROT
is clear. To change the value in the CONFIG register, complete the following procedure. Do not initiate
a reset until the procedure is complete. The new value will not take effect until after the next reset sequence.
1. Erase the CONFIG register.
2. Program the new value to the CONFIG address.
3. Initiate reset.
MOTOROLAMC68HC11F1/FC0
32MC68HC11FTS/D
7 Parallel Input/Output
On the MC68HC11F1, either 54 or 51 pins are available for general-purpose I/O, depending on the
package. These pins are arranged into ports A, B, C, D, E, F, and G. On the MC68HC11FC0, either 52
or 49 pins are available, depending on the package.
I/O functions on some ports (B, C, F, and G) are affected by the mode of operation selected. In the single-chip and bootstrap modes, they are configured as parallel I/O data ports. In expanded and test
modes, they are configured as follows:
• Ports B and F are configured as the address bus.
• Port C is configured as the data bus.
• Port G bit 7 is configured as the optional program chip select CSPROG.
In addition, in expanded and test modes the R/W signal is configured as data bus direction control. The
remaining ports (A, D, and E) are unaffected by mode changes.
7.1 Port A
Port A is an eight-bit general-purpose I/O port (PA[7:0]) with a data register (PORTA) and a data direction register (DDRA). Port A pins are available for shared use among the main timer, pulse accumulator,
and general I/O functions, regardless of mode. Four pins can be used for timer output compare functions (OC), three for input capture (IC), and one as either a fourth IC or a fifth OC.
7.2 Port B
Port B is an eight-bit general-purpose output-only port in single-chip modes. In expanded modes, port
B pins act as high-order address lines ADDR[15:8], and accesses to PORTB (the port B data register)
are mapped externally.
7.3 Port C
Port C is an eight-bit general-purpose I/O port with a data register (PORTC) and a data direction register
(DDRC). In single-chip modes, port C pins are general-purpose I/O pins PC[7:0]. Port C can be configured for wired-OR operation in single-chip modes by setting the CWOM bit in the OPT2 register. In expanded modes, port C is the data bus DATA[7:0], and accesses to PORTC (the port C data register)
are mapped externally.
7.4 Port D
Port D is a six-bit general-purpose I/O port with a data register (PORTD) and a data direction register
(DDRD). In all modes, the six port D lines (PD[5:0]) can be used for general-purpose I/O or for the serial
communications interface (SCI) or serial peripheral interface (SPI) subsystems. Port D can also be configured for wired-OR operation.
7.5 Port E
Port E is an eight-bit input-only port that is also used (on the MC68HC11F1 only) as the analog input
port for the analog-to-digital converter. Port E pins that are not used for the A/D system can be used as
general-purpose inputs. However, PORTE should not be read during the sample portion of an A/D conversion sequence.
NOTE
PE7 and PE0 are not available on the 80-pin MC68HC11FC0. PE7, PE4, and PE0
are not available on the 64-pin MC68HC11FC0.
7.6 Port F
Port F is an eight-bit output-only port. In single-chip mode, port F pins are general-purpose output pins
PF[7:0]. In expanded mode, port F pins act as low-order address outputs ADDR[7:0].
MC68HC11F1/FC0 MOTOROLA
MC68HC11FTS/D33
7.7 Port G
Port G is an eight-bit general-purpose I/O port with a data register (PORTG) and a data direction register
(DDRG). When enabled, the upper four lines (PG[7:4] can be used as chip-select outputs in expanded
modes. When any of these pins are not being used for chip selects, they can be used for general-purpose I/O. Port G can be configured for wired-OR operation by setting the GWOM bit in the OPT2 register.
NOTE
PG[1:0] are not available on the 64-pin MC68HC11FC0.
7.8 Parallel I/O Registers
Port pin function is mode dependent. Do not confuse pin function with the electrical state of the pin at
reset. Port pins are either driven to a specified logic level or are configured as high impedance inputs.
I/O pins configured as high-impedance inputs have port data that is indeterminate. The contents of the
corresponding latches are dependent upon the electrical state of the pins during reset. In port descriptions, an “I” indicates this condition. Port pins that are driven to a known logic level during reset are
shown with a value of either one or zero. Some control bits are unaffected by reset. Reset states for
these bits are indicated with a “U”.
*These bits are not present on the 64-pin QFP version of the MC68HC11FC0.
I = Indeterminate value
CSPROGCSGENCSIO1CSIO2
MOTOROLAMC68HC11F1/FC0
34MC68HC11FTS/D
DDRG — Port G Data Direction Register $x003
Bit 7654321Bit 0
DDG7*DDG6DDG5DDG4DDG3DDG2DDG1DDG0
RESET:00000000
* Following reset in expanded and test modes, PG7/CSPRG is configured as a program chip select, forcing the pin
to be an output pin, even though the value of the DDG7 bit remains zero.
For DDRx bits, 0 = input and 1 = output.
PORTB — Port B Data Register$x004
Bit 7654321Bit 0
PB7PB6PB5PB4PB3PB2PB1PB0
RESET:00000000
Alternate
Function:
ADDR15ADDR14ADDR13ADDR12ADDR11ADDR10ADDR9ADDR8
The reset state of port B is mode dependent. In single-chip or bootstrap modes, port B pins are generalpurpose outputs. In expanded and test modes, port B pins are high-order address outputs and PORTB
is not in the memory map.
PORTF — Port F Data Register$x005
PF7PF6PF5PF4PF3PF2PF1PF0
RESET:00000000
Alternate
Function:
ADDR7ADDR6ADDR5ADDR4ADDR3ADDR2ADDR1ADDR0
The reset state of port F is mode dependent. In single-chip or bootstrap modes, port F pins are generalpurpose outputs. In expanded and test modes, port F pins are low-order address outputs and PORTF
is not in the memory map.
PORTC — Port C Data Register$x006
Bit 7654321Bit 0
PC7PC6PC5PC4PC3PC2PC1PC0
RESET:IIIIIIII
Alternate
Function:
DATA7DATA6DATA5DATA4DATA3DATA2DATA1DATA0
The reset state of port C is mode dependent. In single-chip and bootstrap modes, port C pins are highimpedance inputs. In expanded or test modes, port C pins are data bus inputs/outputs and PORTC is
not in the memory map. The R/W
signal is used to control the direction of data transfers.
DDRC — Port C Data Direction Register $x007
Bit 7654321Bit 0
DDC7DDC6DDC5DDC4DDC3DDC2DDC1DDC0
RESET:00000000
For DDRx bits, 0 = input and 1 = output.
MC68HC11F1/FC0 MOTOROLA
MC68HC11FTS/D35
PORTD — Port D Data Register$x008
Bit 7654321Bit 0
00PD5PD4PD3PD2PD1PD0
RESET:00IIIIII
Alternate
Function:
— — SS
SCKMOSIMISO TxDRxD
DDRD — Port D Data Direction Register $x009
Bit 7654321Bit 0
00DDD5DDD4DDD3DDD2DDD1DDD0
RESET:00000000
For DDRx bits, 0 = input and 1 = output.
NOTE
When the SPI system is in slave mode, DDD5 has no meaning or effect. When the
SPI system is in master mode, DDD5 determines whether bit 5 of PORTD is an error detect input (DDD5 = 0) or a general-purpose output (DDD5 = 1). If the SPI system is enabled and expects one or more of bits [4:2] to be inputs, those bits will be
inputs regardless of the state of the associated DDR bits. If one or more of bits [4:2]
are expected to be outputs, those bits will be outputs only if the associated DDR
bits are set.
PORTE — Port E Data$x00A
Bit 7654321Bit 0
1
PE7
RESET:UUUUUUUU
Alternate
Function
NOTES:
1. These bits are not present on the MC68HC11FC0 and will always read zero.
2. This bit is not present on the 64-pin QFP version of the MC68HC11FC0 and will always read zero.
U = Unaffected by rest.
AN7AN6AN5AN4AN3AN2AN1AN0
PE6PE5PE4
2
PE3PE2PE1
PE0
1
PORTE is an input-only register. Reads return the digital state of the I/O pins, and writes have no effect.
On the MC68HC11F1, port E is shared with the analog-to-digital converter. (The A/D converter is not
present on the MC68HC11FC0.)
OPT2 — System Configuration Option Register 2$x038
Bit 7654321Bit 0
GWOMCWOMCLK4XLIRDV—SPRBYP——
RESET00100000
GWOM — Port G Wired-OR Mode Option
This bit affects all port G pins together.
0 = Port G outputs are normal CMOS outputs
1 = Port G outputs act as open-drain outputs
MOTOROLAMC68HC11F1/FC0
36MC68HC11FTS/D
CWOM — Port C Wired-OR Mode Option
This bit affects all port C pins together.
0 = Port C outputs are normal CMOS outputs
1 = Port C outputs act as open-drain outputs
CLK4X — 4XCLK Output Enable
Refer to 4.3 System Initialization Registers, page 23
LIRDV — Load Instruction Register Driven
Refer to 4.3 System Initialization Registers, page 23
Bits 3, 1, 0 — Not implemented. Reads always return zero and writes have no effect.
SPRBYP — Refer to 10.2 SPI Registers, page 52.
MC68HC11F1/FC0 MOTOROLA
MC68HC11FTS/D37
8 Chip-Selects
Chip selects eliminate the need for additional external components to interface with peripherals in ex-
panded non-multiplexed modes. Chip-select registers control polarity, address block size, base ad-
dress, and clock stretching.
8.1 Chip-Select Operation
There are four programmable chip selects on the MC68HC11F1 and MC68HC11FC0: two for external
I/O (CSIO1 and CSIO2), one for external program space (CSPROG), and one general-purpose chip se-
lect (CSGEN).
CSPROG is active low and becomes active at address valid time. CSPROG is enabled by the PCSEN
bit of the chip-select control register (CSCTL). Its address block size is selected by the PSIZA and
PSIZB bits of CSCTL.
Use the I/O chip selects (CSIO1 and CSIO2) for external I/O devices. These chip-select addresses are
found in the memory map block that contains the status and control registers. CSIO1 is mapped from
$x060 to $x7FF, and CSIO2 is mapped from $x800 to $xFFF, where x represents the REG[3:0] bits of
the INIT register on the MC68HC11F1 or the REG[1:0] bits of the INIT register on the MC68HC11FC0.
Polarity and enable-disable selections are controlled by CSCTL register bits IO1EN, IO1PL, IO2EN, and
IO2PL. The IO1AV and IO2AV bits of the CSGSIZ register determine whether the chip selects are valid
during address or E-clock valid times.
The general-purpose chip select is the most flexible of the four chip selects. Polarity, valid assertion
time, and block size are determined by the GNPOL, GAVLD, GSIZA, GSIZB, and GSIZC bits of the
CSGSIZ register. The starting address is selected with the CSGADR register.
Each of the four chip selects has two associated bits in the chip-select clock stretch register (CSSTRH).
These bits allow clock stretching from zero to three cycles (full E-clock periods) to accommodate slow
device interfaces. Any of the chip selects can be programmed to cause a clock stretch to occur only
during access to addresses that fall within that particular chip select’s address range.
During the stretch period, the E-clock is held high and the bus remains in the state that it is normally in
at the end of E high time. Internally, the clocks continue to run, which maintains the integrity of the timers
and baud-rate generators.
Priority levels are assigned to prevent the four chip selects from conflicting with each other or with in-
ternal memory and registers. There are two sets of priorities controlled by the value of the general-pur-
pose chip-select priority bit (GCSPR) of the CSCTL register. Refer to Table 17.
The SCI, a universal asynchronous receiver transmitter (UART) serial communications interface, is one
of two independent serial I/O subsystems in the MC68HC11F1 and MC68HC11FC0. The SCI has a
standard non-return to zero (NRZ) format (one start bit, eight or nine data bits, and one stop bit) and
several selectable baud rates. The transmitter and receiver are independent but use the same data format and bit rate.
9.1 SCI Block Diagrams
TRANSMITTER
BAUD RATE
CLOCK
R8
SCCR1 SCI CONTROL 1
SCDR Tx BUFFER
10 (11) - BIT Tx SHIFT REGISTER
(8)76543210L
H
SIZE 8/9M
T8
WAKE
SHIFT ENABLE
TRANSFER Tx BUFFER
TRANSMITTER
CONTROL LOGIC
TC
TDRE
SCSR1
(WRITE ONLY)
JAM ENABLE
BREAK—JAM 0s
PREAMBLE—JAM 1s
RDRF
IDLEORNF
SCI STATUS 1
FORCE PIN
DIRECTION (OUT)
FE
DDD1
PIN BUFFER
AND CONTROL
PD1
TxD
TDRE
TIE
TC
TCIE
RIE
ILIE
RE
TE
RWU
SBK
INTERNAL
DATA BUS
SCI Rx
QUESTS
SCI INTERRUPT
REQUEST
TIE
TCIE
SCCR2 SCI CONTROL 2
Figure 9 SCI Transmitter Block Diagram
MOTOROLAMC68HC11F1/FC0
42MC68HC11FTS/D
RECEIVER
BAUD RATE
CLOCK
PD0
RxD
R8
PIN BUFFER
AND CONTROL
M
T8
SCCR1 SCI CONTROL 1
DDD0
WAKE
DISABLE
DRIVER
RE
WAKEUP
LOGIC
DATA
RECOVERY
TDRE
÷16
TC
SCSR1
RDRF
IDLEORNF
SCI STATUS 1
10 (11) - BIT
STOP
H
FE
Rx SHIFT REGISTER
876543210L
MSB
SCDR Rx BUFFER
START
ALL
ONES
SCI Tx
REQUESTS
SCI INTERRUPT
REQUEST
RDRF
RIE
IDLE
ILIE
OR
RIE
RIE
TCIE
ILIE
TE
TIE
SCCR2 SCI CONTROL 2
Figure 10 SCI Receiver Block Diagram
RE
RWU
(READ ONLY)
SBK
INTERNAL
DATA BUS
MC68HC11F1/FC0 MOTOROLA
MC68HC11FTS/D43
9.2 SCI Registers
BAUD — Baud Rate$x02B
Bit 7654321Bit 0
TCLRSCP2 SCP1SCP0RCKBSCR2SCR1SCR0
RESET:00000UUU
TCLR — Clear Baud Rate Counters (TEST)
Bit 6 — Not implemented. Reads always return zero and writes have no effect.
RCKB — SCI Baud-Rate Clock Check (TEST)
SCP[2:0] — SCI Baud Rate Prescaler Selects
These bits determine the baud rate prescaler frequency. Refer to Table 21 and Figure 11.
SCR[2:0] — SCI Baud Rate Selects
These bits determine the receiver and transmitter baud rate. Refer to Table 22 and Figure 11.
The prescaler bits SCP[2:0] determine the highest baud rate, and the SCR[2:0] bits select an additional
binary submultiple (divide by 1, 2, 4,..., through 128) of this highest baud rate. The result of these two
dividers in series is the 16X receiver baud rate clock. The SCR[2:0] bits are not affected by reset and
can be changed at any time. They should not be changed, however, when an SCI transfer is in progress.
MOTOROLAMC68HC11F1/FC0
44MC68HC11FTS/D
Figure 11 illustrates the SCI baud rate timing chain. The prescaler select bits determine the highest
baud rate. The rate select bits determine additional divide-by-two stages to arrive at the receiver timing
(RT) clock rate. The baud rate clock is the result of dividing the RT clock by 16.
EXTAL
XTAL
OSCILLATOR
AND
CLOCK GENERATOR
(÷4)
INTERNAL BUS CLOCK (PH2)
÷ 3
E
÷ 2
÷ 2
÷ 2
÷ 2
X00
SCR[2:0]
0:0:0
0:0:1
0:1:0
0:1:1
1:0:0
001
÷ 4
X10
÷ 13
X11
÷ 9
101
÷ 2
÷ 2
÷ 2
1:0:1
1:1:0
1:1:1
SCI Receive Baud Rate (16x)
÷ 16
SCI Transmit Baud Rate (1x)
Figure 11 SCI Baud Rate Generator Block Diagram
MC68HC11F1/FC0 MOTOROLA
MC68HC11FTS/D45
SCCR1 — SCI Control Register 1 $x02C
Bit 7654321Bit 0
R8T80MWAKE000
RESET:UU000000
U = Unaffected by reset
R8 — Receive Data Bit 8
If M is set, R8 stores the ninth bit of the receive data character.
T8 — Transmit Data Bit 8
If M is set, T8 stores the ninth bit of the transmit data character.
Bit 5 — Not implemented. Reads always return zero and writes have no effect.
M — Mode (Select Character Format)
0 = 1 start bit, 8 data bits, 1 stop bit
1 = 1 start bit, 9 data bits, 1 stop bit
WAKE — Wake Up by Address Mark/Idle
0 = Wake up by IDLE line recognition
1 = Wake up by address mark
Bits [2:0] — Not implemented. Reads always return zero and writes have no effect.
SCCR2 — SCI Control Register 2 $x02D
Bit 7654321Bit 0
TIETCIERIEILIETERERWUSBK
RESET:00000000
TIE — Transmit Interrupt Enable
0 = TDRE interrupts disabled
1 = SCI interrupt requested when the TDRE flag is set
TCIE — Transmit Complete Interrupt Enable
0 = TC interrupts disabled
1 = SCI interrupt requested when the TC flag is set
RIE — Receiver Interrupt Enable
0 = RDRF and OR interrupts disabled
1 = SCI interrupt requested when the RDRF flag or the OR 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
When TE goes from zero to one, one unit of idle character time (logic one) is queued as a preamble.
0 = Transmitter disabled
1 = Transmitter enabled
RE — Receiver Enable
0 = Receiver disabled
1 = Receiver enabled
MOTOROLAMC68HC11F1/FC0
46MC68HC11FTS/D
RWU — Receiver Wake Up Control
0 = Normal SCI receiver
1 = Wake up enabled and receiver interrupt inhibited
SBK — Send Break
0 = Break generator off
1 = Break codes generated as long as SBK = 1
SCSR — SCI Status Register $x02E
Bit 7654321Bit 0
TDRETCRDRFIDLEORNFFE0
RESET:11000000
TDRE — Transmit Data Register Empty Flag
This flag is set when SCDR is empty. Clear the TDRE flag by reading SCSR with TDRE set and then
writing to SCDR.
0 = SCDR is busy
1 = SCDR is empty
TC — Transmit Complete Flag
This flag is set when the transmitter is idle (no data, preamble, or break transmission in progress). Clear
the TC flag by reading SCSR with TC set and then writing to SCDR.
0 = Transmitter is busy
1 = Transmitter is idle
RDRF — Receive Data Register Full Flag
This flag is set if a received character is ready to be read from SCDR. Clear the RDRF flag by reading
SCSR with RDRF set and then reading SCDR.
0 = SCDR empty
1 = SCDR full
IDLE — Idle Line Detected Flag
This flag is set if the RxD line is idle. Once cleared, IDLE is not set again until the RxD line has been
active and becomes idle again. The IDLE flag is inhibited when RWU = 1. Clear IDLE by reading SCSR
with IDLE set and then reading SCDR.
0 = RxD line is active
1 = RxD line is idle
OR — Overrun Error Flag
OR is set if a new character is received before a previously received character is read from SCDR. Clear
OR by reading SCSR with OR set and then reading SCDR.
0 = No overrun detected
1 = Overrun detected
NF — Noise Error Flag
NF is set if majority sample logic detects anything other than a unanimous decision. Clear NF by reading
SCSR with NF set and then reading SCDR.
0 = Unanimous decision
1 = Noise detected
FE — Framing Error
FE is set when a zero is detected where a stop bit was expected. Clear the FE flag by reading SCSR
with FE set and then reading SCDR.
0 = Stop bit detected
1 = Zero detected
MC68HC11F1/FC0 MOTOROLA
MC68HC11FTS/D47
Bit 0 — Not implemented. Reads always return zero and writes have no effect.
SCDR — Serial Communications Data Register$x02F
Bit 7654321Bit 0
Bit 7654322Bit 0
RESET:IIIIIIII
I = Indeterminate value
Reading SCDR retrieves the last byte received in the receive data buffer. Writing to SCDR loads the
transmit data buffer with the next byte to be transmitted.
MOTOROLAMC68HC11F1/FC0
48MC68HC11FTS/D
10 Serial Peripheral Interface
The serial peripheral interface (SPI) allows the MCU to communicate synchronously with peripheral de-
vices and other microprocessors. The SPI protocol facilitates rapid exchange of serial data between de-
vices in a control system. The MC68HC11F1 and MC68HC11FC0 can be set up for master or slave
operation. Standard data rates can be as high as one half of the E-clock rate when configured as mas-
ter, and as fast as the E-clock when configured as slave.
The MC68HC11FC0 has an additional control bit that allows the SPI baud rate counter to be bypassed.
This allows a master mode baud rate equal to the E-clock frequency.
The SPRBYP bit in OPT2 on the MC68HC11FC0 allows the SPI baud rate counter
to be bypassed. This permits a maximum master mode baud rate equal to the Eclock frequency on the MC68HC11FC0. SPRBYP is not present on the
MC68HC11F1.
SPSR — SPI Status Register$x029
Bit 7654321Bit 0
SPIFWCOL0MODF0000
RESET:00000000
SPIF — SPI Transfer Complete Flag
SPIF is set when an SPI transfer is complete. It is cleared by reading SPSR with SPIF set, followed by
a read or write of SPDR.
WCOL — Write Collision
WCOL is set when SPDR is written while a transfer is in progress. It is cleared by reading SPSR with
WCOL set, followed by a read or write of SPDR.
0 = No write collision
1 = Write collision
Bit 5 — Not Implemented. Reads always return zero and writes have no effect.
MODF — Mode Fault
A mode fault terminates SPI operation. Set when SS
is pulled low while MSTR = 1. MODF is cleared
by reading SPSR read with MODF set, followed by a write to SPCR.
0 = No mode fault
1 = Mode fault
Bits [3:0] — Not Implemented. Reads always return zero and writes have no effect.
SPDR — SPI Data Register$x02A
Bit 7654321Bit 0
Bit 7654321Bit 0
Incoming SPI data is double buffered. Outgoing SPI data is single buffered.
MC68HC11F1/FC0 MOTOROLA
MC68HC11FTS/D51
OPT2 — System Configuration Option Register 2$x038
Bit 7654321Bit 0
GWOMCWOMCLK4XLIRDV—SPRBYP——
RESET00100000
Bits [7:4] — See 4.3 System Initialization Registers, page 22.
Bits 3, 1, 0 — Not implemented. Reads always return zero and writes have no effect.
SPRBYP — SPI Baud Rate Counter Bypass
0 = Enable SPI baud rate counter
1 = Bypass SPI baud rate counter
When the SPI baud rate counter is bypassed, the SPI can transmit at a maximum master mode baud
rate equal to the E-clock frequency. SPRBYP is present only on the MC68HC11FC0 and overridesthe setting of SPR[1:0] in SPCR.
MOTOROLAMC68HC11F1/FC0
52MC68HC11FTS/D
11 Analog-to-Digital Converter
The MC68HC11F1 analog-to-digital (A/D) converter system uses an all-capacitive charge-redistribution
technique to convert analog signals to digital values. The A/D system is an 8-channel, 8-bit, multiplexedinput, successive-approximation converter, accurate to ±1 least significant bit (LSB). Because the capacitive charge redistribution technique used includes a built-in sample-and-hold, no external sampleand-hold is required.
Dedicated lines VRH and V
provide the reference supply voltage inputs. Systems operating at clock
RL
rates of 750 kHz or below must use an internal RC oscillator. The CSEL bit in the OPTION register selects the clock source for the A/D system. (The CSEL bit is described in 11.3 A/D Registers, page 56.)
A multiplexer allows the single A/D converter to select one of 16 analog signals, as shown in Table 24.
NOTE
The A/D converter is present on the MC68HC11F1 only.
PE0
AN0
PE1
AN1
PE2
AN2
PE3
AN3
PE4
AN4
PE5
AN5
PE6
AN6
8-BIT CAPACITIVE DAC
WITH SAMPLE AND HOLD
SUCCESSIVE APPROXIMATION
REGISTER AND CONTROL
RESULT
ANALOG
MUX
V
V
RH
RL
INTERNAL
DATA BUS
PE7
AN7
SCAN
CCF
ADCTL A/D CONTROL
RESULT REGISTER INTERFACE
ADR1 A/D RESULT 1ADR2 A/D RESULT 2ADR3 A/D RESULT 3ADR4 A/D RESULT 4
CA
EA9 A/D BLOCK
CB
CC
CD
MULT
Figure 14 A/D Converter Block Diagram
MC68HC11F1/FC0 MOTOROLA
MC68HC11FTS/D53
11.1 Input Pins
Port E pins can also be used as digital inputs. Reads of port E pins are not recommended during the
sample portion of an A/D conversion cycle, when the gate signal to the N-channel input gate is on. Because no P-channel devices are directly connected to either input pins or reference voltage pins, voltages above VDD do not cause a latchup problem, although current should be limited according to
maximum ratings. Figure 15 is a functional diagram of an input pin.
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
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)
11.2 Conversion Sequence
A/D converter operations are performed in sequences of four conversions each. A conversion sequence
can be repeated continuously or stop after one iteration. The conversion complete flag (CCF) is set after
the fourth conversion in a sequence to show the availability of data in the result registers. Figure 16
shows the timing of a typical sequence. Synchronization is referenced to the system E clock.
DAC
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
A read-only status indicator, this bit is set when all four A/D result registers contain valid conversion results. Each time the ADCTL register is overwritten, this bit is automatically cleared to zero and a conversion sequence is started. In the continuous mode, CCF is set at the end of the first conversion
sequence.
Bit 6 — Not implemented. Reads always return zero and writes have no effect.
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
CD–CA — Channel Select D through A
Refer to Table 24. When a multiple channel mode is selected (MULT = 1), the two least significant chan-
nel select bits (CB and CA) have no meaning and the CD and CC bits specify which group of four chan-
Each read-only result register holds an eight-bit conversion result. Writes to these registers have no ef-
fect. Data in the A/D converter result registers is valid when the CCF flag in the ADCTL register is set,
indicating a conversion sequence is complete. If conversion results are needed sooner, refer to Figure
16, which shows the A/D conversion sequence diagram.
Table 25 Analog Input to 8-Bit Result Translation Table
Bit 7654321 Bit 0
1
Percentage
2
Volts
NOTES:
1. % of VRH–V
2.
Volts for VRL = 0; V
50%25%12.5%6.25%3.12%1.56%0.78%0.39%
2.5001.2500.6250.31250.15620.07810.03910.0195
RL
= 5.0 V
RH
OPTION — System Configuration Options$x039
Bit 7654321Bit 0
ADPUCSELIRQE*DLY*CMEFCME*CR1*CR0*
RESET:00010000
*Can be written only once in first 64 cycles out of reset in normal modes, or at any time in special modes.
ADPU — A/D Power Up
0 = A/D powered down
1 = A/D powered up
CSEL
—
Clock Select
0 = A/D and EEPROM use system E-Clock
1 = A/D and EEPROM use internal RC clock
Bits [5:0] — Refer to 4.3 System Initialization Registers, page 23.
MOTOROLAMC68HC11F1/FC0
56MC68HC11FTS/D
12 Main Timer
The main timer is based on a free-running 16-bit counter with a four-stage programmable prescaler. The
timer drives the three input capture (IC) channels, four output compare (OC) channels, one channel programmable for either IC or OC, and the pulse accumulator (PA). All of these functions share port A. The
main timer also drives the pulse accumulator, real-time interrupt (RTI), and computer operating properly
(COP) watchdog circuits.
12.1 Timer Operation
The following tables summarize timing periods for various M68HC11 functions derived from the main
timer for several crystal frequencies.
Table 26 Timer Subsystem Count and Overflow Periods
E-Clock
Frequency
1 MHz1.000 µs65.536 ms4.000 µs 262.144 ms8.000 µs 524.288 ms 16.000 µs1.049 s
2 MHz0.500 µs32.768 ms2.000 µs 131.072 ms4.000 µs 262.144 ms 8.000 µs524.288 ms
3 MHz0.333 µs21.845 ms1.333 µs87.381 ms2.667 µs174.763 ms 5.333 µs 349.525 ms
4 MHz0.250 µs16.384 ms1.000 µs65.536 ms2.000 µs131.072 ms 4.000 µs 262.144 ms
5 MHz0.200 µs13.107 ms0.800 µs52.429 ms1.600 µs104.858 ms 3.200 µs 209.715 ms
6 MHz0.167 µs10.923 ms0.667 µs43.691 ms1.333 µs87.381 ms2.667 µs 174.763 ms
Any E1/E
PR[1:0] = 00PR[1:0] = 01PR[1:0] = 10PR[1:0] = 11
1 Count
TCNT
Overflow
16
/E
2
1 Count
4/E
TCNT
Overflow
218/E
1 Count
8/E
TCNT
Overflow
219/E
1 Count
16/E
TCNT
Overflow
220/E
Table 27 Real-Time Interrupt Periods
E-Clock
Frequency
1 MHz8.192 ms16.384 ms32.768 ms65.536 ms
2 MHz4.096 ms8.192 ms16.384 ms32.768 ms
3 MHz2.731 ms5.461 ms10.923 ms21.845 ms
4 MHz2.048 ms4.096 ms8.192 ms16.384 ms
5 MHz1.638 ms3.277 ms6.554 ms13.107 ms
6 MHz1.366 ms2.731 ms5.461 ms10.923 ms
The 16-bit read-only TCNT register contains the prescaled value of the 16-bit timer. A full counter read
addresses the most significant byte (MSB) first. A read of this address causes the least significant byte
to be latched into a buffer for the next CPU cycle so that a double-byte read returns the full 16-bit state
of the counter at the time of the MSB read cycle.
Each OMx–OLx bit pair determines the output action taken on the corresponding OCx pin after a successful compare, as shown in Table 29. OC5 functions only if the I4/O5 bit in the PACTL register is
cleared.
MOTOROLAMC68HC11F1/FC0
60MC68HC11FTS/D
Table 29 Output Compare Actions
OMxOLxAction Taken on Successful Compare
00Timer disconnected from output pin logic
01Toggle OCx output line
10Clear OCx output line to zero
11Set OCx output line to one
TCTL2 — Timer Control 2$x021
Bit 7654321Bit 0
EDG4BEDG4AEDG1BEDG1AEDG2BEDG2AEDG3BEDG3A
RESET:00000000
EDGxB, EDGxA — Input Capture Edge Control
Each EDGxB, EDGxA pair determines the polarity of the input signal on the corresponding ICx that will
trigger an input capture, as shown in Table 30. IC4 functions only if the I4/O5 bit in the PACTL register
is set.
Table 30 Input Capture Configuration
EDGxBEDGxAConfiguration
00Capture disabled
01Capture on rising edges only
10Capture on falling edges only
11Capture on any edge
TMSK1 — Timer Interrupt Mask 1 $x022
Bit 7654321Bit 0
OC1IOC2IOC3IOC4II4/O5IIC1IIC2IIC3I
RESET:00000000
Bits in TMSK1 correspond bit for bit with flag bits in TFLG1. Each bit that is set in TMSK1 enables the
corresponding interrupt source.
OCxI — Output Compare x Interrupt Enable
If the OCxI enable bit is set when the OCxF flag bit is set, a hardware interrupt sequence is requested.
When I4/O5 in PACTL is one, I4/O5I is the input capture 4 interrupt enable bit. When I4/O5 in PACTL
is zero, I4/O5I is the output compare 5 interrupt enable bit.
ICxI — Input Capture x Interrupt Enable
If the ICxI enable bit is set when the ICxF flag bit is set, a hardware interrupt sequence is requested.
TFLG1 — Timer Interrupt Flag 1 $x023
Bit 7654321Bit 0
OC1FOC2FOC3FOC4FI4/O5FIC1FIC2FIC3F
RESET:00000000
Bits in TFLG1 are cleared by writing a one to the corresponding bit positions.
MC68HC11F1/FC0 MOTOROLA
MC68HC11FTS/D61
OCxF — Output Compare x Flag
Set each time the counter matches output compare x value.
I4/O5F — Input Capture 4/Output Compare 5 Flag
Set by IC4 or OC5, depending on which function was enabled by I4/O5 of PACTL.
ICxF — Input Capture x Flag
Set each time a selected active edge is detected on the ICx input line.
TMSK2 — Timer Interrupt Mask 2 $x024
Bit 7654321Bit 0
TOIRTIIPAOVIPAII00PR1PR0
RESET:00000000
Bits [7:4] in TMSK2 correspond bit for bit with flag bits in TFLG2. Setting any of these bits enables the
corresponding interrupt source. TMSK2 can be written only once in the first 64 cycles out of reset in
normal modes, or at any time in special modes.
TOI — Timer Overflow Interrupt Enable
0 = Timer overflow interrupt disabled
1 = Interrupt requested when TOF is set
RTII — Real-Time Interrupt Enable
0 = Real-time interrupt disabled
1 = Interrupt requested when RTIF is set
Bits [5:4] — See 13.2 Pulse Accumulator Registers, page 64.
Bits [3:2] — Not implemented. Reads always return zero and writes have no effect.
PR[1:0] — Timer Prescaler Select
Determines the main timer prescale factor as shown in Table 31. See Table 26 for specific frequencies.
Table 31 Main Timer Prescale Control
PR[1:0]Prescaler
0 01
0 14
1 08
1 116
TFLG2 — Timer Interrupt Flag 2 $x025
Bit 7654321Bit 0
TOFRTIFPAOVFPAIF0000
RESET:00000000
Bits in this register indicate when certain timer system events have occurred. Coupled with the four
high-order bits of TMSK2, the bits of TFLG2 allow the timer subsystem to operate in either a polled or
interrupt driven system. Each bit of TFLG2 corresponds to a bit in TMSK2 in the same position.
Bits in TFLG2 are cleared by writing a one to the corresponding bit positions.
TOF — Timer Overflow Flag
Set when TCNT rolls over from $FFFF to $0000.
MOTOROLAMC68HC11F1/FC0
62MC68HC11FTS/D
RTIF — Real-Time Interrupt Flag
Set periodically at a rate based on bits RTR[1:0] in the PACTL register.
Bits [5:4] — See 13.2 Pulse Accumulator Registers, page 65.
Bits [3:0] — Not implemented. Reads always return zero and writes have no effect.
PACTL — Pulse Accumulator Control $x026
Bit 7654321Bit 0
0PAENPAMODPEDGE0I4/O5RTR1RTR0
RESET:00000000
Bit 7 — Not implemented. Reads always return zero and writes have no effect.
Bits [6:4] — See 13.2 Pulse Accumulator Registers, page 65.
Bit 3 — Not implemented. Reads always return zero and writes have no effect.
I4/O5 — Configure TI4/O5 Register for IC or OC
0 = OC5 function enabled
1 = IC4 function enabled
RTR[1:0] — RTI Interrupt Rate Selects
These two bits select one of four rates for the real-time interrupt circuit, as shown in Table 32.
Table 32 Real-Time Interrupt Periods
E-Clock
Frequency
1 MHz8.192 ms16.384 ms32.768 ms65.536 ms
2 MHz4.906 ms8.192 ms16.384 ms32.768 ms
3 MHz2.731 ms5.461 ms10.923 ms21.845 ms
4 MHz2.048 ms4.096 ms8.192 ms16.384 ms
5 MHz1.638 ms3.277 ms6.554 ms13.107 ms
6 MHz1.366 ms2.731 ms5.461 ms10.923 ms
0 = Pulse accumulator overflow interrupt disabled
1 = Interrupt requested when PAOVF in TFLG2 is set
PAII — Pulse Accumulator Interrupt Enable
0 = Pulse accumulator interrupt disabled
1 = Interrupt requested when PAIF in TFLG2 is set
Bits [3:2] — Not implemented. Reads always return zero and writes have no effect.
Bits [1:0] — See 12.2 Timer Registers, page 62.
TFLG2 — Timer Interrupt Flag 2 $x025
Bit 7654321Bit 0
TOFRTIFPAOVFPAIF0000
RESET:00000000
Bits in TFLG2 are cleared by writing a one to the corresponding bit positions.
Bits [7:6] — See 12.2 Timer Registers, page 62.
PAOVF — Pulse Accumulator Overflow Flag
Set when PACNT rolls over from $FF to $00
PAIF — Pulse Accumulator Input Edge Flag
Set each time a selected active edge is detected on the PAI input line
Bits [3:0] — Not implemented. Reads always return zero and writes have no effect.
PACTL — Pulse Accumulator Control $x026
Bit 7654321Bit 0
0PAENPAMODPEDGE0I4/O5RTR1RTR0
RESET:00000000
Bit 7 — Not implemented. Reads always return zero and writes have no effect.
PAEN — Pulse Accumulator System Enable
This bit has different meanings depending on the state of the PAMOD bit, as shown in Table 33.
MC68HC11F1/FC0 MOTOROLA
MC68HC11FTS/D65
Table 33 Pulse Accumulator Edge Control
PAMODPEDGEAction on Clock
00PAI falling edge increments the counter.
01PAI rising edge increments the counter.
10A zero on PAI inhibits counting.
11A one on PAI inhibits counting.
Bit 3 — Not implemented. Reads always return zero and writes have no effect.
Bits [2:0] — See 12.2 Timer Registers, page 63.
PACNT — Pulse Accumulator Count$x027
Bit 7654321Bit 0
Bit 7654321Bit 0
RESET:UUUUUUUU
U = Unaffected by reset
This eight-bit read/write register contains the count of external input events at the PAI input, or the ac-
cumulated count. The PACNT is readable even if PAI is not active in gated time accumulation mode.
The counter is not affected by reset and can be read or written at any time. Counting is synchronized
to the internal PH2 clock so that incrementing and reading occur during opposite half cycles.
MOTOROLAMC68HC11F1/FC0
66MC68HC11FTS/D
MC68HC11F1/FC0 MOTOROLA
MC68HC11FTS/D67
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 which may be provided in Motorola data sheets and/or specifications 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.
MCUinit, MCUasm, MCUdebug, and RTEK are trademarks of Motorola, Inc. MOTOROLA and ! are registered trademarks of Motorola, Inc. Motorola, Inc. is an Equal
Opportunity/Affirmative Action Employer.
How to reach us:
USA/EUROPE/Locations Not Listed: Motorola Literature Distribution;
6F Seibu-Butsuryu-Center, 3-14-2 Tatsumi Koto-Ku, Tokyo 135, Japan. 81-3-3521-8315
ASIA PACIFIC: Motorola Semiconductors H.K. Ltd.; 8B Tai Ping Industrial Park,
51 Ting Kok Road, Tai Po, N.T., Hong Kong. 852-26629298
Mfax is a trademark of Motorola, Inc.
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.