Page 16
Data Direction Register D (DDRD)....324 17.6.3 Port D Input Pullup Enable Register (PTDPUE)..325 Technical Data MC68HC908AB32 Rev. 1.0 — Table of Contents...
Page 17
Keyboard Initialization ......349 19.5.2 Keyboard Status and Control Register....349 MC68HC908AB32 Rev. 1.0 Technical Data —...
Page 18
Features ......... 359 Technical Data MC68HC908AB32 Rev. 1.0 —...
Page 19
Introduction ........373 23.3 Absolute Maximum Ratings ......374 MC68HC908AB32 Rev. 1.0 Technical Data —...
Page 20
MC Order Numbers ....... . 389 Technical Data MC68HC908AB32 Rev. 1.0 —...
Low-power design (fully static with STOP and WAIT modes) • Master reset pin and power-on reset 1. No security feature is absolutely secure. However, Motorola’s strategy is to make reading or copying the FLASH difficult for unauthorized users. Technical Data MC68HC908AB32 Rev.
Fast 16/8 divide instruction • Binary-coded decimal (BCD) instructions • Optimization for controller applications • Efficient C language support 1.4 MCU Block Diagram Figure 1-1 shows the structure of the MC68HC908AB32. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA General Description...
(SPI). See Section 16. Serial Peripheral Interface Module (SPI). must be grounded for proper MCU operation. Technical Data MC68HC908AB32 Rev. 1.0 — General Description MOTOROLA...
/VREFL) The A analog ground pin is used only for the ground connections for the analog to digital convertor (ADC) and should be decoupled as per the V digital ground pin. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA General Description...
1.6.13 Port C I/O Pins (PTC5–PTC0) PTC5–PTC0 are general-purpose bidirectional I/O port pins. PTC2 is a special function port pin that is shared with the system clock output pin, MCLK. See Section 17. Input/Output (I/O) Ports. Technical Data MC68HC908AB32 Rev. 1.0 — General Description MOTOROLA...
General purpose I/O PTE0/TxD Dual State Input (Hi-Z) / SCI transmit data PTF7–PTF6 General purpose I/O Dual State Input (Hi-Z) General purpose I/O PTF5/TBCH1 Dual State Input (Hi-Z) / Timer B channel 1 Technical Data MC68HC908AB32 Rev. 1.0 — General Description MOTOROLA...
Page 39
PLL loop filter cap External interrupt request Input (pullup) Reset Input (pullup) Details of the clock connections to each of the modules on the MC68HC908AB32 are shown in Table 1-2. A short description of each clock source is also given in Table 1-3.
CGMXCLK or bus clock CGMXCLK Bus clock EEPROM CGMXCLK or bus clock Bus clock Bus clock SPSCK CGMXCLK TIMA Bus clock or PTD6/TACLK TIMB Bus clock or PTD4/TBCLK Bus clock Bus clock Technical Data MC68HC908AB32 Rev. 1.0 — General Description MOTOROLA...
$FE1F; EEPROM array configuration register, EEACR • $FF7E; FLASH block protect register, FLBPR • $FFFF; COP control register, COPCTL Data registers are shown in Figure 2-2, Table 2-1 is a list of vector locations. Technical Data MC68HC908AB32 Rev. 1.0 — Memory Map MOTOROLA...
PTF4 PTF3 PTF2 PTF1 PTF0 Port F Data Register $0009 Write: (PTF) Reset: Unaffected by reset = Unimplemented = Reserved Figure 2-2. Control, Status, and Data Registers (Sheet 1 of 11) MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Memory Map...
Page 46
Unaffected by reset Read: LOOPS ENSCI TXINV WAKE ILTY SCI Control Register 1 $0013 Write: (SCC1) Reset: = Unimplemented = Reserved Figure 2-2. Control, Status, and Data Registers (Sheet 2 of 11) Technical Data MC68HC908AB32 Rev. 1.0 — Memory Map MOTOROLA...
Page 47
PLL Control Register $001C Write: (PCTL) Reset: Read: LOCK PLL Bandwidth Control AUTO $001D Register Write: (PBWC) Reset: = Unimplemented = Reserved Figure 2-2. Control, Status, and Data Registers (Sheet 3 of 11) MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Memory Map...
Page 48
Timer A Channel 0 Bit 15 Bit 8 $0027 Register High Write: (TACH0H) Reset: Indeterminate after reset = Unimplemented = Reserved Figure 2-2. Control, Status, and Data Registers (Sheet 4 of 11) Technical Data MC68HC908AB32 Rev. 1.0 — Memory Map MOTOROLA...
Page 49
Timer A Channel 3 Bit 7 Bit 0 $0031 Register Low Write: (TACH3L) Reset: Indeterminate after reset = Unimplemented = Reserved Figure 2-2. Control, Status, and Data Registers (Sheet 5 of 11) MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Memory Map...
Page 58
The stack pointer decrements during pushes and increments during pulls. NOTE: Be careful when using nested subroutines. The CPU may overwrite data in the RAM during a subroutine or during the interrupt stacking operation. Technical Data MC68HC908AB32 Rev. 1.0 — Random-Access Memory (RAM) MOTOROLA...
1 = High voltage enabled to array and charge pump on 0 = High voltage disabled to array and charge pump off 1. No security feature is absolutely secure. However, Motorola’s strategy is to make reading or copying the FLASH difficult for unauthorized users.
4. Wait for a time, t (min. 10µs) 5. Set the HVEN bit. 6. Wait for a time, t (min. 1ms) Erase 7. Clear the ERASE bit. 8. Wait for a time, t (min. 5µs) MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA FLASH Memory...
Programming and erasing of FLASH locations cannot be performed by code being executed from the FLASH memory. While these operations must be performed in the order shown, other unrelated operations may occur between the steps. Technical Data MC68HC908AB32 Rev. 1.0 — FLASH Memory MOTOROLA...
* The time between each FLASH address change, or the time between the last FLASH address programmed to clearing PGM bit, must not exceed the maximum programming time, t max. PROG This program sequence is repeated throughout the memory until all data is programmed. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA FLASH Memory...
The FLBPR itself can be erased or programmed only with an external voltage, V , present on the IRQ pin. This voltage also allows entry from reset into the monitor mode. Technical Data MC68HC908AB32 Rev. 1.0 — FLASH Memory MOTOROLA...
PROG Clear HVEN bit This row program algorithm assumes the row/s to be programmed are initially erased. Wait for a time, t End of programming Figure 4-2. FLASH Programming Flowchart MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA FLASH Memory...
NOTE: Standby Mode is the power saving mode of the FLASH module in which all internal control signals to the FLASH are inactive and the current consumption of the FLASH is at a minimum. MC68HC908AB32 Rev. 1.0 Technical Data —...
For EENVR, the corresponding volatile register is the EEPROM array configuration register (EEACR). For the EEDIVNVR (two 8-bit registers: EEDIVHNVR and EEDIVLNVR), the corresponding volatile register is the EEPROM timebase divider register (EEDIV: EEDIVH and EEDIVL) MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA...
The 512 bytes of EEPROM is divided into four 128-byte blocks. Each of these blocks can be protected from erase/program operations by setting the EEBPx bit in the EENVR. Table 5-1 shows the address ranges for the blocks. Technical Data MC68HC908AB32 Rev. 1.0 — EEPROM MOTOROLA...
That is, if the same byte is programmed eight times (with any value), that byte must be erased before it can be successfully programmed again. MC68HC908AB32 Rev. 1.0 Technical Data —...
EEPROM address is latched. This is to ensure proper programming sequence. Once EEPGM is set, do not read any EEPROM locations, otherwise the current program cycle will be unsuccessful. When EEPGM is set, the on-board programming sequence will be activated. Technical Data MC68HC908AB32 Rev. 1.0 — EEPROM MOTOROLA...
6. Wait for a time, t , for the erasing voltage to fall. EEFPV Go to step 8. 7. Poll the EEPGM bit until it is cleared by the internal timer. 8. Clear EELAT bits. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA EEPROM...
5.10.1 Wait Mode The WAIT instruction does not affect the EEPROM. It is possible to start the program or erase sequence on the EEPROM and put the MCU in wait mode. Technical Data MC68HC908AB32 Rev. 1.0 — EEPROM MOTOROLA...
Address: $FE1D Bit 7 Bit 0 Read: EEDUM EEOFF EERAS1 EERAS0 EELAT AUTO EEPGM Write: Reset: Figure 5-2. EEPROM Control Register (EECR) EEDUM — Dummy Bit This read/write bit has no function. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA EEPROM...
(See note D for 5.9.1 EEPROM Programming 5.9.2 EEPROM Erasing.) 0 = Automatic clear of EEPGM is disabled 1 = Automatic clear of EEPGM is enabled Technical Data MC68HC908AB32 Rev. 1.0 — EEPROM MOTOROLA...
EEPRTCT — EEPROM Protection Bit The EEPRTCT bit is used to enable the security feature in the EEPROM (see 5.7 EEPROM Security Options). 1 = EEPROM security disabled 0 = EEPROM security enabled MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA EEPROM...
The 16-bit EEPROM timebase divider register consists of two 8-bit registers: EEDIVH and EEDIVL. The 11-bit value in this register is used to configure the timebase divider circuit to obtain the 35µs timebase for EEPROM control. Technical Data MC68HC908AB32 Rev. 1.0 — EEPROM MOTOROLA...
35µs from the selected reference clock source (CGMXCLK or bus clock, see 6.5 Configuration Register for the EEPROM related internal timer and circuits. EEDIV[10:0] bits are readable at any time. They are writable when EELAT=0 and EEDIVSECD=1. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA EEPROM...
Figure 5-7. EEPROM Divider Non-volatile Register High(EEDIVHNVR) Address: $FE11 Bit 7 Bit 0 Read: EEDIV7 EEDIV6 EEDIV5 EEDIV4 EEDIV3 EEDIV2 EEDIV1 EEDIV0 Write: Reset: Unaffected by reset; $FF when blank Figure 5-8. EEPROM Divider Non-volatile Register Low (EEDIVLNVR) Technical Data MC68HC908AB32 Rev. 1.0 — EEPROM MOTOROLA...
Page 83
Once this security feature is armed, erase and program operations are disabled for EEDIVHNVR and EEDIVLNVR. Modifications to the EEDIVH and EEDIVL registers are also disabled. Therefore, care should be taken before programming a value into the EEDIVHNVR. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA...
LVIRSTD — LVI Reset Disable Bit LVIRSTD disables the reset signal from the LVI module. (See Section 21. Low-Voltage Inhibit (LVI).) 1 = LVI module resets disabled 0 = LVI module resets enabled Technical Data MC68HC908AB32 Rev. 1.0 — Configuration Register (CONFIG) MOTOROLA...
Page 87
ROM code request submitted. The enable/disable logic is not necessarily identical in all parts of the AB, AS, and AZ families. If in doubt, check with your local field applications representative. MC68HC908AB32 Rev. 1.0 Technical Data —...
ROM code request submitted. The enable/disable logic is not necessarily identical in all parts of the AB, AS, and AZ families. If in doubt, check with your local field applications representative. Technical Data MC68HC908AB32 Rev. 1.0 — Configuration Register (CONFIG) MOTOROLA...
7.2 Introduction The M68HC08 CPU (central processor unit) is an enhanced and fully object-code-compatible version of the M68HC05 CPU. The CPU08 Reference Manual (Motorola document order number CPU08RM/AD) contains a description of the CPU instruction set, addressing modes, and architecture.
64K-bytes • Low-power stop and wait modes 7.4 CPU Registers Figure 7-1 shows the five CPU registers. CPU registers are not part of the memory map. Technical Data MC68HC908AB32 Rev. 1.0 — Central Processor Unit (CPU) MOTOROLA...
The accumulator is a general-purpose 8-bit register. The CPU uses the accumulator to hold operands and the results of arithmetic/logic operations. Bit 7 Bit 0 Read: Write: Reset: Unaffected by reset Figure 7-2. Accumulator (A) MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Central Processor Unit (CPU)
The CPU uses the contents of the stack pointer to determine the conditional address of the operand. Technical Data MC68HC908AB32 Rev. 1.0 — Central Processor Unit (CPU)
Figure 7-5. Program Counter (PC) 7.4.5 Condition Code Register The 8-bit condition code register contains the interrupt mask and five flags that indicate the results of the instruction just executed. Bits 6 and MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA...
H and C flags to determine the appropriate correction factor. 1 = Carry between bits 3 and 4 0 = No carry between bits 3 and 4 Technical Data MC68HC908AB32 Rev. 1.0 — Central Processor Unit (CPU) MOTOROLA...
Page 95
Z — Zero flag The CPU sets the zero flag when an arithmetic operation, logic operation, or data manipulation produces a result of $00. 1 = Zero result 0 = Non-zero result MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Central Processor Unit (CPU)
The ALU performs the arithmetic and logic operations defined by the instruction set. Refer to the CPU08 Reference Manual (Motorola document order number CPU08RM/AD) for a description of the instructions and addressing modes and more detail about the architecture of the CPU.
A return-from-interrupt instruction (RTI) in the break routine ends the break interrupt and returns the MCU to normal operation if the break interrupt has been deasserted. 7.8 Instruction Set Summary 7.9 Opcode Map Table 7-2. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Central Processor Unit (CPU)
DIR (b2) DIR (b3) Mn ← 0 BCLR n , opr Clear Bit n in M – – – – – – DIR (b4) DIR (b5) DIR (b6) DIR (b7) Technical Data MC68HC908AB32 Rev. 1.0 — Central Processor Unit (CPU) MOTOROLA...
Page 99
BPL rel Branch if Plus – – – – – – REL PC ← (PC) + 2 + rel BRA rel Branch Always – – – – – – REL MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Central Processor Unit (CPU)
Page 100
H ← $00 CLRH Clear 0 – – 0 1 – M ← $00 CLR opr ,X M ← $00 CLR ,X M ← $00 CLR opr ,SP 9E6F Technical Data MC68HC908AB32 Rev. 1.0 — Central Processor Unit (CPU) MOTOROLA...
Page 101
DEC opr ,X M ← (M) – 1 DEC ,X M ← (M) – 1 DEC opr ,SP 9E6A A ← (H:A)/(X) Divide – – – – H ← Remainder MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Central Processor Unit (CPU)
Page 102
LDX opr ,SP 9EEE LDX opr ,SP 9EDE ee ff LSL opr LSLA LSLX Logical Shift Left – – LSL opr ,X (Same as ASL) LSL ,X LSL opr ,SP 9E68 Technical Data MC68HC908AB32 Rev. 1.0 — Central Processor Unit (CPU) MOTOROLA...
Page 103
Pull X from Stack – – – – – – INH ROL opr ROLA ROLX Rotate Left through Carry – – ROL opr ,X ROL ,X ROL opr ,SP 9E69 MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Central Processor Unit (CPU)
Page 104
STX opr ,X ee ff M ← (X) STX opr ,X Store X in M 0 – – – STX ,X STX opr ,SP 9EEF STX opr ,SP 9EDF ee ff Technical Data MC68HC908AB32 Rev. 1.0 — Central Processor Unit (CPU) MOTOROLA...
Page 105
A ← (X) Transfer X to A – – – – – – INH (SP) ← (H:X) – 1 Transfer H:X to SP – – – – – – INH MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Central Processor Unit (CPU)
Page 106
Indexed, 8-bit offset addressing mode Loaded with IX1+ Indexed, 8-bit offset, post increment addressing mode Indexed, 16-bit offset addressing mode Concatenated with Memory location Set or cleared Negative bit — Not affected Technical Data MC68HC908AB32 Rev. 1.0 — Central Processor Unit (CPU) MOTOROLA...
– Arbitration control timing – Vector address generation • CPU enable/disable timing • Modular architecture expandable to 128 interrupt sources Table 8-1 shows the internal signal names used in this section. Technical Data MC68HC908AB32 Rev. 1.0 — System Integration Module (SIM) MOTOROLA...
(Bus clock = CGMOUT divided by two) Internal address bus Internal data bus PORRST Signal from the power-on reset module to the SIM IRST Internal reset signal Read/write signal MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA System Integration Module (SIM)
POR resets, the SIM cycles through 4096 CGMXCLK cycles, during which the SIM forces the RST pin low. The internal reset signal then follows the sequence from the falling edge of RST as shown in Figure 8-5. Technical Data MC68HC908AB32 Rev. 1.0 — System Integration Module (SIM) MOTOROLA...
The internal reset signal is asserted • The SIM enables CGMOUT • Internal clocks to the CPU and modules are held inactive for 4096 CGMXCLK cycles to allow the oscillator to stabilize MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA System Integration Module (SIM)
RST or the IRQ pin. This prevents the COP from becoming disabled as a result of external noise. During a break state, V on the RST pin disables the COP module. Technical Data MC68HC908AB32 Rev. 1.0 — System Integration Module (SIM) MOTOROLA...
(COP) module. The SIM counter overflow supplies the clock for the COP module. The SIM counter is 13 bits long and is clocked by the falling edge of CGMXCLK. MC68HC908AB32 Rev. 1.0 Technical Data —...
Normal, sequential program execution can be changed in three different ways: • Interrupts – Maskable hardware CPU interrupts – Non-maskable software interrupt instruction (SWI) • Reset • Break interrupts Technical Data MC68HC908AB32 Rev. 1.0 — System Integration Module (SIM) MOTOROLA...
Once an interrupt is latched by the SIM, no other interrupt may take precedence, regardless of priority, until the latched interrupt is serviced (or the I-bit is cleared). (See Figure 8-10.) MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA System Integration Module (SIM)
If interrupts are not masked (I-bit clear in the condition code register), and if the corresponding interrupt enable bit is set, the SIM proceeds with interrupt processing; otherwise, the next instruction is fetched and executed. Technical Data MC68HC908AB32 Rev. 1.0 — System Integration Module (SIM) MOTOROLA...
(I-bit) in the condition code register. NOTE: A software interrupt pushes PC onto the stack. A software interrupt does not push PC – 1, as a hardware interrupt does. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA...
— are protected, even when the first step is accomplished prior to entering break mode. Upon leaving break mode, execution of the second step will clear the flag as normal. MC68HC908AB32 Rev. 1.0 Technical Data —...
NOTE: Previous data can be operand data or the WAIT opcode, depending on the last instruction. Figure 8-12. Wait Mode Entry Timing Figure 8-13 Figure 8-14 show the timing for wait recovery. Technical Data MC68HC908AB32 Rev. 1.0 — System Integration Module (SIM) MOTOROLA...
NOTE: External crystal applications should use the full stop recovery time by clearing the SSREC bit. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA System Integration Module (SIM)
0 = Stop or wait mode was not exited by break interrupt SBSW can be read within the break state SWI routine. The user can modify the return address on the stack by subtracting one from it. The following code is an example of this. MC68HC908AB32 Rev. 1.0 Technical Data —...
Write: Reset: = Unimplemented Figure 8-18. SIM Reset Status Register (SRSR) POR — Power-On Reset Bit 1 = Last reset caused by POR circuit 0 = Read of SRSR Technical Data MC68HC908AB32 Rev. 1.0 — System Integration Module (SIM) MOTOROLA...
MCU is in a break state. To clear status bits during the break state, the BCFE bit must be set. 1 = Status bits clearable during break 0 = Status bits not clearable during break MC68HC908AB32 Rev. 1.0 Technical Data —...
Page 130
System Integration Module (SIM) Technical Data MC68HC908AB32 Rev. 1.0 — System Integration Module (SIM) MOTOROLA...
Programmable hardware voltage-controlled oscillator (VCO) for low-jitter operation • Automatic bandwidth control mode for low-jitter operation • Automatic frequency lock detector • CPU interrupt on entry or exit from locked condition Technical Data MC68HC908AB32 Rev. 1.0 — Clock Generator Module (CGM) MOTOROLA...
An externally generated clock can also feed the OSC1 pin of the crystal oscillator circuit. For this configuration, the external clock should be connected to the OSC1 pin and the OSC2 pin allowed to float. Technical Data MC68HC908AB32 Rev. 1.0 — Clock Generator Module (CGM)
The phase detector then compares the VCO feedback clock, CGMVDV, with the final reference clock, CGMRDV. A correction pulse is generated based on the phase difference between the two signals. The loop filter MC68HC908AB32 Rev. 1.0 Technical Data —...
ACQ bit is set. 9.4.2.3 Manual and Automatic PLL Bandwidth Modes The PLL can change the bandwidth or operational mode of the loop filter manually or automatically. Technical Data MC68HC908AB32 Rev. 1.0 — Clock Generator Module (CGM) MOTOROLA...
Page 137
The PLL also may operate in manual mode (AUTO = 0). Manual mode is used by systems that do not require an indicator of the lock condition for proper operation. Such systems typically operate well below f BUSMAX MC68HC908AB32 Rev. 1.0 Technical Data —...
9.4.2.4 Programming the PLL does not account for two possible exceptions — a value of zero for N or L is meaningless when used in the equations given. To account for these exceptions: MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA...
Figure 9-3. This figure shows only the logical representation of the internal components and may not represent actual circuitry. The oscillator configuration uses five components: Technical Data MC68HC908AB32 Rev. 1.0 — Clock Generator Module (CGM) MOTOROLA...
PLL performance). SIMOSCEN CGMXCLK OSC1 OSC2 CGMXFC can be zero (shorted) when used with higher-frequency crystals. Refer to manufacturer’s data. Figure 9-3. CGM External Connections MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Clock Generator Module (CGM)
9.5.5 Oscillator Enable Signal (SIMOSCEN) The SIMOSCEN signal comes from the system integration module (SIM) and enables the oscillator and PLL. Technical Data MC68HC908AB32 Rev. 1.0 — Clock Generator Module (CGM) MOTOROLA...
PLL bandwidth control register (PBWC). (See 9.6.2 PLL Bandwidth Control Register (PBWC)) • PLL programming register (PPG). (See 9.6.3 PLL Programming Register (PPG)) Figure 9-4 is a summary of the CGM registers. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Clock Generator Module (CGM)
The PLL control register contains the interrupt enable and flag bits, the on/off switch, and the base clock selector bit. Address: $001C Bit 7 Bit 0 Read: PLLF PLLIE PLLON Write: Reset: = Unimplemented Figure 9-5. PLL Control Register (PCTL) Technical Data MC68HC908AB32 Rev. 1.0 — Clock Generator Module (CGM) MOTOROLA...
Page 145
BCS cannot be set while the PLLON bit is clear. After toggling BCS, it may take up to three CGMXCLK and three CGMVCLK cycles to complete the transition from one source clock to MC68HC908AB32 Rev. 1.0 Technical Data —...
In manual operation, forces the PLL into acquisition or tracking mode. Address: $001D Bit 7 Bit 0 Read: LOCK AUTO Write: Reset: = Unimplemented Figure 9-7. PLL Bandwidth Control Register (PBWC) Technical Data MC68HC908AB32 Rev. 1.0 — Clock Generator Module (CGM) MOTOROLA...
Page 147
1. Write a 1 to XLD. 2. Wait 4 × N cycles. (N is the VCO frequency multiplier.) 3. Read XLD. 1 = Crystal reference is not active 0 = Crystal reference is active MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA...
PLL). A value of $0 in the multiplier select bits configures the modulo feedback divider the same as a value of $1. Reset initializes these bits to $6 to give a default multiply value of 6. Technical Data MC68HC908AB32 Rev. 1.0 — Clock Generator Module (CGM) MOTOROLA...
VCO clock as the source of the base clock (BCS = 1) if the VCO range select bits are all clear. The VCO range select bits must be programmed correctly. Incorrect programming may result in failure of the PLL to achieve lock. MC68HC908AB32 Rev. 1.0 Technical Data —...
PLL without turning it off. Applications that require the PLL to wake the MCU from WAIT mode also can deselect the PLL output without turning off the PLL. Technical Data MC68HC908AB32 Rev. 1.0 — Clock Generator Module (CGM)
9.10 Acquisition/Lock Time Specifications The acquisition and lock times of the PLL are, in many applications, the most critical PLL design parameters. Proper design and use of the PLL ensures the highest stability and lowest acquisition/lock times. MC68HC908AB32 Rev. 1.0 Technical Data —...
– f ORIG bandwidth control mode (see 9.4.2.3 Manual and Automatic PLL Bandwidth Modes), acquisition time expires when the ACQ bit becomes set in the PLL bandwidth control register (PBWC). Technical Data MC68HC908AB32 Rev. 1.0 — Clock Generator Module (CGM) MOTOROLA...
If the capacitor is too large, the PLL may not be able to adjust the voltage in a reasonable time. See 9.10.3 Choosing a Filter Capacitor. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA...
PLL may become unstable. Also, always choose a capacitor with a tight tolerance (±20% or better) and low dissipation. Technical Data MC68HC908AB32 Rev. 1.0 — Clock Generator Module (CGM)
, is required to ascertain whether the PLL is within the tracking mode entry tolerance ∆ , before exiting acquisition mode. Also, a certain number of clock cycles, n , is required to ascertain MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA...
Page 156
PLL clock (see 9.4.3 Base Clock Selector LOCK Circuit), because the factors described in 9.10.2 Parametric Influences On Reaction Time may slow the lock time considerably. Technical Data MC68HC908AB32 Rev. 1.0 — Clock Generator Module (CGM) MOTOROLA...
PTA0 and the host computer. PTA0 is used in a wired-OR configuration and requires a pullup resistor. 1. No security feature is absolutely secure. However, Motorola’s strategy is to make reading or copying the FLASH difficult for unauthorized users.
CGMXCLK frequency, and the OSC1 input directly generates internal bus clocks. In this case, the OSC1 signal must have a 50% duty cycle at maximum bus frequency. Technical Data MC68HC908AB32 Rev. 1.0 — Monitor ROM (MON) MOTOROLA...
BIT 5 BIT 6 BIT 7 STOP START BREAK BIT 0 BIT 1 BIT 2 BIT 3 BIT 4 BIT 5 BIT 6 BIT 7 Figure 10-3. Sample Monitor Waveforms MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Monitor ROM (MON)
When the monitor receives a break signal, it drives the PTA0 pin high for the duration of two bits before echoing the break signal. MISSING STOP BIT TWO-STOP-BIT DELAY BEFORE ZERO ECHO Figure 10-5. Break Transaction Technical Data MC68HC908AB32 Rev. 1.0 — Monitor ROM (MON) MOTOROLA...
Specifies 2-byte address in high byte:low byte order Data Returns contents of specified address Returned Opcode Command Sequence SENT TO MONITOR ADDRESS ADDRESS ADDRESS ADDRESS READ READ DATA HIGH HIGH ECHO RETURN MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Monitor ROM (MON)
Read next 2 bytes in memory from last address accessed Operand Specifies 2-byte address in high byte:low byte order Data Returns contents of next two addresses Returned Opcode Command Sequence SENT TO MONITOR IREAD IREAD DATA DATA ECHO RETURN Technical Data MC68HC908AB32 Rev. 1.0 — Monitor ROM (MON) MOTOROLA...
Table 10-7. READSP (Read Stack Pointer) Command Description Reads stack pointer Operand None Data Returns stack pointer in high byte:low byte order Returned Opcode Command Sequence SENT TO MONITOR READSP READSP HIGH ECHO RETURN MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Monitor ROM (MON)
NOTES: 1 = Echo delay, 2 bit times 2 = Data return delay, 2 bit times 4 = Wait 1 bit time before sending next byte. Figure 10-6. Monitor Mode Entry Timing MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Monitor ROM (MON)
FLASH locations $FFC0–$FFC7. The keyword is eight bytes long with a 7-byte ASCII string and 1-byte $00 delimiter. The keyword for the MC68HC908AB32 MCU is "PSWDOPT" + $00. Entry to monitor mode with extended security command keyword...
The TIMA clock source can be one of the seven prescaler outputs or the TIMA clock pin, PTD6/TACLK. The prescaler generates seven clock rates from the internal bus clock. The prescaler select bits, PS[2:0], in the TIMA status and control register select the TIMA clock source. MC68HC908AB32 Rev. 1.0 Technical Data —...
TIMA latches the contents of the TIMA counter into the TIMA channel registers, TACHxH:TACHxL. The polarity of the active edge is programmable. Input captures can generate TIMA CPU interrupt requests. Technical Data MC68HC908AB32 Rev. 1.0 — Timer Interface Module A (TIMA) MOTOROLA...
Writing a larger value in an output compare interrupt routine (at the end of the current pulse) could cause two output compares to occur in the same counter overflow period. MC68HC908AB32 Rev. 1.0 Technical Data —...
In buffered output compare operation, do not write new output compare values to the currently active channel registers. Writing to the active channel registers is the same as generating unbuffered output compares. Technical Data MC68HC908AB32 Rev. 1.0 — Timer Interface Module A (TIMA) MOTOROLA...
The value in the TIMA channel registers determines the pulse width of the PWM output. The pulse width of an 8-bit PWM signal is variable in 256 increments. Writing $0080 (128) to the TIMA channel registers produces a duty cycle of 128/256 or 50%. MC68HC908AB32 Rev. 1.0 Technical Data —...
Toggling on output compare also can cause incorrect PWM signal generation when changing the PWM pulse width to a new, much larger value. Technical Data MC68HC908AB32 Rev. 1.0 — Timer Interface Module A (TIMA)
NOTE: In buffered PWM signal generation, do not write new pulse width values to the currently active channel registers. Writing to the active channel registers is the same as generating unbuffered PWM signals. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA...
PWM output. TIMA channel 0 status and control register 0 (TASC0) controls and monitors the PWM signal from the linked channels. MS0B takes priority over MS0A. Technical Data MC68HC908AB32 Rev. 1.0 — Timer Interface Module A (TIMA)
CHxIE= 1. CHxF and CHxIE are in the TIMA channel x status and control register. 11.7 Low-Power Modes The WAIT and STOP instructions puts the MCU in low-power- consumption standby modes. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA...
BCFE is at logic zero. After the break, doing the second step clears the status bit. Technical Data MC68HC908AB32 Rev. 1.0 — Timer Interface Module A (TIMA)
11.9.2 TIMA Channel I/O Pins Each channel I/O pin is programmable independently as an input capture pin or an output compare pin. PTF0/TACH2 and PTE3/TACH1 can be configured as buffered output compare or buffered PWM pins. MC68HC908AB32 Rev. 1.0 Technical Data —...
• Prescales the TIMA counter clock Address: $0020 Bit 7 Bit 0 Read: TOIE TSTOP Write: TRST Reset: = Unimplemented Figure 11-4. TIMA Status and Control Register (TASC) Technical Data MC68HC908AB32 Rev. 1.0 — Timer Interface Module A (TIMA) MOTOROLA...
Page 185
1 = Prescaler and TIMA counter cleared 0 = No effect NOTE: Setting the TSTOP and TRST bits simultaneously stops the TIMA counter at a value of $0000. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Timer Interface Module A (TIMA)
Otherwise, TACNTL retains the value latched during the break. Address: $0022 Bit 7 Bit 0 Read: Bit 15 Bit 8 Write: Reset: = Unimplemented Figure 11-5. TIMA Counter Register High (TACNTH) Technical Data MC68HC908AB32 Rev. 1.0 — Timer Interface Module A (TIMA) MOTOROLA...
Read: Bit 7 Bit 0 Write: Reset: Figure 11-8. TIMA Counter Modulo Register Low (TAMODL) NOTE: Reset the TIMA counter before writing to the TIMA counter modulo registers. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Timer Interface Module A (TIMA)
Figure 11-9. TIMA Channel 0 Status and Control Register (TASC0) Address: $0029 Bit 7 Bit 0 Read: CH1F CH1IE MS1A ELS1B ELS1A TOV1 CH1MAX Write: Reset: Figure 11-10. TIMA Channel 1 Status and Control Register (TASC1) Technical Data MC68HC908AB32 Rev. 1.0 — Timer Interface Module A (TIMA) MOTOROLA...
CHxIE — Channel x Interrupt Enable Bit This read/write bit enables TIMA CPU interrupts on channel x. Reset clears the CHxIE bit. 1 = Channel x CPU interrupt requests enabled 0 = Channel x CPU interrupt requests disabled MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA...
Page 190
I/O, and pin TACHx is available as a general-purpose I/O pin. Table 11-3 shows how ELSxB and ELSxA work. Reset clears the ELSxB and ELSxA bits. Technical Data MC68HC908AB32 Rev. 1.0 — Timer Interface Module A (TIMA) MOTOROLA...
Figure 11-13 shows, the CHxMAX bit takes effect in the cycle after it is set or cleared. The output stays at the 100% duty cycle level until the cycle after CHxMAX is cleared. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA...
The TIMB clock source can be one of the seven prescaler outputs or the TIMB clock pin, PTD4/TBCLK. The prescaler generates seven clock rates from the internal bus clock. The prescaler select bits, PS[2:0], in the TIMB status and control register select the TIMB clock source. MC68HC908AB32 Rev. 1.0 Technical Data —...
TIMB latches the contents of the TIMB counter into the TIMB channel registers, TBCHxH:TBCHxL. The polarity of the active edge is programmable. Input captures can generate TIMB CPU interrupt requests. Technical Data MC68HC908AB32 Rev. 1.0 — Timer Interface Module B (TIMB) MOTOROLA...
Writing a larger value in an output compare interrupt routine (at the end of the current pulse) could cause two output compares to occur in the same counter overflow period. MC68HC908AB32 Rev. 1.0 Technical Data —...
In buffered output compare operation, do not write new output compare values to the currently active channel registers. Writing to the active channel registers is the same as generating unbuffered output compares. Technical Data MC68HC908AB32 Rev. 1.0 — Timer Interface Module B (TIMB) MOTOROLA...
The value in the TIMB channel registers determines the pulse width of the PWM output. The pulse width of an 8-bit PWM signal is variable in 256 increments. Writing $0080 (128) to the TIMB channel registers produces a duty cycle of 128/256 or 50%. MC68HC908AB32 Rev. 1.0 Technical Data —...
Toggling on output compare also can cause incorrect PWM signal generation when changing the PWM pulse width to a new, much larger value. Technical Data MC68HC908AB32 Rev. 1.0 — Timer Interface Module B (TIMB)
NOTE: In buffered PWM signal generation, do not write new pulse width values to the currently active channel registers. Writing to the active channel registers is the same as generating unbuffered PWM signals. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA...
PWM output. TIMB channel 0 status and control register (TBSC0) controls and monitors the PWM signal from the linked channels. MS0B takes priority over MS0A. Technical Data MC68HC908AB32 Rev. 1.0 — Timer Interface Module B (TIMB)
CHxIE= 1. CHxF and CHxIE are in the TIMB channel x status and control register. 12.7 Low-Power Modes The WAIT and STOP instructions puts the MCU in low-power- consumption standby modes. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA...
BCFE is at logic zero. After the break, doing the second step clears the status bit. Technical Data MC68HC908AB32 Rev. 1.0 — Timer Interface Module B (TIMB)
12.9.2 TIMB Channel I/O Pins Each channel I/O pin is programmable independently as an input capture pin or an output compare pin. PTF2/TBCH2 and PTF5/TBCH1 can be configured as buffered output compare or buffered PWM pins. MC68HC908AB32 Rev. 1.0 Technical Data —...
• Prescales the TIMB counter clock Address: $0040 Bit 7 Bit 0 Read: TOIE TSTOP Write: TRST Reset: = Unimplemented Figure 12-4. TIMB Status and Control Register (TBSC) Technical Data MC68HC908AB32 Rev. 1.0 — Timer Interface Module B (TIMB) MOTOROLA...
Page 211
1 = Prescaler and TIMB counter cleared 0 = No effect NOTE: Setting the TSTOP and TRST bits simultaneously stops the TIMB counter at a value of $0000. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Timer Interface Module B (TIMB)
Otherwise, TBCNTL retains the value latched during the break. Address: $0041 Bit 7 Bit 0 Read: Bit 15 Bit 8 Write: Reset: = Unimplemented Figure 12-5. TIMB Counter Register High (TBCNTH) Technical Data MC68HC908AB32 Rev. 1.0 — Timer Interface Module B (TIMB) MOTOROLA...
Read: Bit 7 Bit 0 Write: Reset: Figure 12-8. TIMB Counter Modulo Register Low (TBMODL) NOTE: Reset the TIMB counter before writing to the TIMB counter modulo registers. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Timer Interface Module B (TIMB)
Figure 12-9. TIMB Channel 0 Status and Control Register (TBSC0) Address: $0048 Bit 7 Bit 0 Read: CH1F CH1IE MS1A ELS1B ELS1A TOV1 CH1MAX Write: Reset: Figure 12-10. TIMB Channel 1 Status and Control Register (TBSC1) Technical Data MC68HC908AB32 Rev. 1.0 — Timer Interface Module B (TIMB) MOTOROLA...
CHxIE — Channel x Interrupt Enable Bit This read/write bit enables TIMB CPU interrupts on channel x. Reset clears the CHxIE bit. 1 = Channel x CPU interrupt requests enabled 0 = Channel x CPU interrupt requests disabled MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA...
Page 216
I/O, and pin TBCHx is available as a general-purpose I/O pin. Table 12-3 shows how ELSxB and ELSxA work. Reset clears the ELSxB and ELSxA bits. Technical Data MC68HC908AB32 Rev. 1.0 — Timer Interface Module B (TIMB) MOTOROLA...
Figure 12-13 shows, the CHxMAX bit takes effect in the cycle after it is set or cleared. The output stays at the 100% duty cycle level until the cycle after CHxMAX is cleared. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA...
(POF) is set when the PIT counter value rolls over to $0000 after matching the value in the PIT counter modulo registers. The PIT interrupt enable bit, POIE, enables PIT overflow CPU interrupt requests. POF and POIE are in the PIT status and control register. MC68HC908AB32 Rev. 1.0 Technical Data —...
To protect status bits during the break state, write a logic zero to the BCFE bit. With BCFE at logic zero (its default state), software can read and write I/O registers during the break state without affecting status Technical Data MC68HC908AB32 Rev. 1.0 — Programmable Interrupt Timer (PIT)
Prescales the PIT counter clock Address: $004B Bit 7 Bit 0 Read: POIE PSTOP PPS2 PPS1 PPS0 Write: PRST Reset: = Unimplemented Figure 13-3. PIT Status and Control Register (PSC) MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Programmable Interrupt Timer (PIT)
Page 226
Reset clears the PRST bit. 1 = Prescaler and PIT counter cleared 0 = No effect NOTE: Setting the PSTOP and PRST bits simultaneously stops the PIT counter at a value of $0000. Technical Data MC68HC908AB32 Rev. 1.0 — Programmable Interrupt Timer (PIT) MOTOROLA...
ADC data register. In single conversion mode, conversion begins with a write to the ADSCR. Only one conversion occurs between writes to the ADSCR. Technical Data MC68HC908AB32 Rev. 1.0 — Analog-to-Digital Converter (ADC)
MCU exits stop mode after an external interrupt. Allow one conversion cycle to stabilize the analog circuitry. 14.7 I/O Signals The ADC module has eight pins shared with port B, PTB7/ATD7–PTB0/ATD0. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Analog-to-Digital Converter (ADC)
ADC module. 14.8 I/O Registers These I/O registers control and monitor ADC operation: • ADC status and control register (ADSCR) • ADC data register (ADR) • ADC clock register (ADCLK) Technical Data MC68HC908AB32 Rev. 1.0 — Analog-to-Digital Converter (ADC) MOTOROLA...
ADR register at the end of each conversion. Only one conversion is completed between writes to the ADSCR when this bit is cleared. Reset clears the ADCO bit. 1 = Continuous ADC conversion 0 = One ADC conversion MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA...
PTB5/ATD5 PTB6/ATD6 PTB7/ATD7 ↓ ↓ ↓ ↓ ↓ Reserved REFH REFL ADC power off NOTE: If any unused channels are selected, the resulting ADC conversion will be unknown or reserved. Technical Data MC68HC908AB32 Rev. 1.0 — Analog-to-Digital Converter (ADC) MOTOROLA...
ADIV[2:0] form a 3-bit field which selects the divide ratio used by the ADC to generate the internal ADC clock. Table 14-2 shows the available clock configurations. The ADC clock should be set to approximately 1 MHz. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Analog-to-Digital Converter (ADC)
As long as the internal ADC clock is at approximately 1 MHz, correct operation can be guaranteed. 1 = Internal bus clock 0 = External clock (CGMXCLK) ADC input clock frequency ----------------------------------------------------------------------- 1MHz ADIV[2:0] Technical Data MC68HC908AB32 Rev. 1.0 — Analog-to-Digital Converter (ADC) MOTOROLA...
SCI operate independently, although they use the same baud rate generator. During normal operation, the CPU monitors the status of the SCI, writes the data to be transmitted, and processes received data. Technical Data MC68HC908AB32 Rev. 1.0 — Serial Communications Interface Module (SCI)
RECEIVE FLAG TRANSMIT CONTROL CONTROL CONTROL CONTROL ENSCI WAKE ILTY PRE- BAUD ÷ 4 CGMXCLK SCALER DIVIDER DATA SELECTION ÷ 16 CONTROL Figure 15-1. SCI Module Block Diagram MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Serial Communications Interface Module (SCI)
BIT 3 BIT 4 BIT 5 BIT 6 BIT 7 BIT 8 STOP Figure 15-3. SCI Data Formats 15.5.2 Transmitter Figure 15-4 shows the structure of the SCI transmitter. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Serial Communications Interface Module (SCI)
PTE0/TxD pin goes to the idle condition, logic 1. If at any time software clears the ENSCI bit in SCI control register 1 (SCC1), the transmitter and receiver relinquish control of the port E pins. MC68HC908AB32 Rev. 1.0 Technical Data —...
Clearing and then setting the TE bit during a transmission queues an idle character to be sent after the character currently being transmitted. Technical Data MC68HC908AB32 Rev. 1.0 — Serial Communications Interface Module (SCI)
SCDR are empty and that no break or idle character has been generated. The transmission complete interrupt enable bit, TCIE, in SCC2 enables the TC bit to generate transmitter CPU interrupt requests. MC68HC908AB32 Rev. 1.0 Technical Data —...
SCRF, in SCI status register 1 (SCS1) becomes set, indicating that the received byte can be read. If the SCI receive interrupt enable bit, SCRIE, in SCC2 is also set, the SCRF bit generates a receiver CPU interrupt request. Technical Data MC68HC908AB32 Rev. 1.0 — Serial Communications Interface Module (SCI) MOTOROLA...
RT clock begins to count to 16. START BIT PTE1/RxD START BIT START BIT DATA SAMPLES QUALIFICATION VERIFICATION SAMPLING CLOCK RT CLOCK STATE RT CLOCK RESET Figure 15-6. Receiver Data Sampling Technical Data MC68HC908AB32 Rev. 1.0 — Serial Communications Interface Module (SCI) MOTOROLA...
RT8, RT9, and RT10. Table 15-3 summarizes the results of the data bit samples. Table 15-3. Data Bit Recovery RT8, RT9, and RT10 Data Bit Noise Flag Samples Determination MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Serial Communications Interface Module (SCI)
Then a noise error occurs. If more than one of the samples is outside the stop bit, a framing error occurs. In most applications, the baud rate Technical Data MC68HC908AB32 Rev. 1.0 — Serial Communications Interface Module (SCI)
× 4.54% ------------------------- - For a 9-bit character, data sampling of the stop bit takes the receiver 10 bit times × 16 RT cycles + 10 RT cycles = 170 RT cycles. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Serial Communications Interface Module (SCI)
The maximum percent difference between the receiver count and the transmitter count of a fast 8-bit character with no errors is 154 160 – × ˙ 3.90% ------------------------- - Technical Data MC68HC908AB32 Rev. 1.0 — Serial Communications Interface Module (SCI) MOTOROLA...
PTE1/RxD pin wakes the receiver from the standby state by clearing the RWU bit. The idle character that wakes the receiver does not set the receiver idle bit, IDLE, or the MC68HC908AB32 Rev. 1.0 Technical Data —...
The noise error interrupt enable bit, NEIE, in SCC3 enables NF to generate SCI error CPU interrupt requests. Technical Data MC68HC908AB32 Rev. 1.0 — Serial Communications Interface Module (SCI)
Because the internal clock is inactive during stop mode, entering stop mode during an SCI transmission or reception results in invalid data. Refer to 8.7 Low-Power Modes for information on exiting stop mode. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA...
PTE1/RxD pin with port E. When the SCI is enabled, the PTE1/RxD pin is an input regardless of the state of the DDRE1 bit in data direction register E (DDRE). Technical Data MC68HC908AB32 Rev. 1.0 — Serial Communications Interface Module (SCI)
TXINV bit. 1 = Transmitter output inverted 0 = Transmitter output not inverted NOTE: Setting the TXINV bit inverts all transmitted values, including idle, break, start, and stop bits. Technical Data MC68HC908AB32 Rev. 1.0 — Serial Communications Interface Module (SCI) MOTOROLA...
Page 263
When enabled, the parity function inserts a parity bit in the most significant bit position. (See Figure 15-3.) Reset clears the PEN bit. 1 = Parity function enabled 0 = Parity function disabled MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Serial Communications Interface Module (SCI)
– Enables the TC bit to generate transmitter CPU interrupt requests – Enables the SCRF bit to generate receiver CPU interrupt requests – Enables the IDLE bit to generate receiver CPU interrupt requests Technical Data MC68HC908AB32 Rev. 1.0 — Serial Communications Interface Module (SCI) MOTOROLA...
This read/write bit enables the IDLE bit to generate SCI receiver CPU interrupt requests. Reset clears the ILIE bit. 1 = IDLE enabled to generate CPU interrupt requests 0 = IDLE not enabled to generate CPU interrupt requests MC68HC908AB32 Rev. 1.0 Technical Data —...
Page 266
RWU bit. Reset clears the RWU bit. 1 = Standby state 0 = Normal operation Technical Data MC68HC908AB32 Rev. 1.0 — Serial Communications Interface Module (SCI) MOTOROLA...
Address: $0015 Bit 7 Bit 0 Read: ORIE NEIE FEIE PEIE Write: Reset: = Unimplemented R = Reserved U = Unaffected Figure 15-11. SCI Control Register 3 (SCC3) MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Serial Communications Interface Module (SCI)
Page 268
15.9.4 SCI Status Register 1.) Reset clears PEIE. 1 = SCI error CPU interrupt requests from PE bit enabled 0 = SCI error CPU interrupt requests from PE bit disabled Technical Data MC68HC908AB32 Rev. 1.0 — Serial Communications Interface Module (SCI) MOTOROLA...
SCTE bit by reading SCS1 with SCTE set and then writing to SCDR. Reset sets the SCTE bit. 1 = SCDR data transferred to transmit shift register 0 = SCDR data not transferred to transmit shift register MC68HC908AB32 Rev. 1.0 Technical Data —...
Page 270
This clearable, read-only bit is set when software fails to read the SCDR before the receive shift register receives the next character. The OR bit generates an SCI error CPU interrupt request if the ORIE Technical Data MC68HC908AB32 Rev. 1.0 — Serial Communications Interface Module (SCI)
Page 271
SCC3 also is set. Clear the FE bit by reading SCS1 with FE set and then reading the SCDR. Reset clears the FE bit. 1 = Framing error detected 0 = No framing error detected MC68HC908AB32 Rev. 1.0 Technical Data —...
PEIE bit in SCC3 is also set. Clear the PE bit by reading SCS1 with PE set and then reading the SCDR. Reset clears the PE bit. 1 = Parity error detected 0 = No parity error detected Technical Data MC68HC908AB32 Rev. 1.0 — Serial Communications Interface Module (SCI) MOTOROLA...
Polling RPF before disabling the SCI module or entering stop mode can show whether a reception is in progress. 1 = Reception in progress 0 = No reception in progress MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA...
R7:R0. Writing to address $0018 writes the data to be transmitted, T7:T0. Reset has no effect on the SCI data register. NOTE: Do not use read/modify/write instructions on the SCI data register. Technical Data MC68HC908AB32 Rev. 1.0 — Serial Communications Interface Module (SCI) MOTOROLA...
This makes the formula: CGMXCLK baud rate ----------------------------------- - × × 64 PD BD Table 15-8 shows the SCI baud rates that can be generated with a 4.9152MHz CGMXCLK. Technical Data MC68HC908AB32 Rev. 1.0 — Serial Communications Interface Module (SCI) MOTOROLA...
Overflow error flag with CPU interrupt capability • Programmable wired-OR mode • C (inter-integrated circuit) compatibility • I/O (input/output) port bit(s) software configurable with pullup device(s) if configured as input port bit(s) Technical Data MC68HC908AB32 Rev. 1.0 — Serial Peripheral Interface Module (SPI) MOTOROLA...
MCU and peripheral devices, including other MCUs. Software can poll the SPI status flags or SPI operation can be interrupt- driven. The following paragraphs describe the operation of the SPI module. Technical Data MC68HC908AB32 Rev. 1.0 — Serial Peripheral Interface Module (SPI) MOTOROLA...
SPI configured as a master. Therefore, the frequency of the SPSCK for an SPI configured as a slave can be any frequency less than or equal to the bus speed. Technical Data MC68HC908AB32 Rev. 1.0 — Serial Peripheral Interface Module (SPI)
SPI control register (SPCR). The clock polarity is specified by the CPOL control bit, which selects an active high or low clock and has no significant effect on the transmission format. MC68HC908AB32 Rev. 1.0 Technical Data —...
The slave’s SS pin must be toggled back to high and then low again between each byte transmitted as shown in Figure 16-5. Technical Data MC68HC908AB32 Rev. 1.0 — Serial Peripheral Interface Module (SPI) MOTOROLA...
SS. Any data written after the falling edge is stored in the transmit data register and transferred to the shift register after the current transmission. MC68HC908AB32 Rev. 1.0 Technical Data —...
FROM MASTER MISO BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 FROM SLAVE TO SLAVE CAPTURE STROBE Figure 16-6. Transmission Format (CPHA = 1) Technical Data MC68HC908AB32 Rev. 1.0 — Serial Peripheral Interface Module (SPI) MOTOROLA...
SPI bit time. That is, the maximum delay is two MCU bus cycles for DIV2, eight MCU bus cycles for DIV8, 32 MCU bus cycles for DIV32, and 128 MCU bus cycles for DIV128. MC68HC908AB32 Rev. 1.0 Technical Data —...
Also, if no new data is written to the data buffer, the last value contained in the shift register is the next data word to be transmitted. MC68HC908AB32 Rev. 1.0 Technical Data —...
SPI data register. OVRF generates a receiver/error CPU interrupt request if the error interrupt enable bit (ERRIE) is also set. The SPRF, MODF, and OVRF Technical Data MC68HC908AB32 Rev. 1.0 — Serial Peripheral Interface Module (SPI)
SPRF bit. Figure 16-10 illustrates this process. Generally, to avoid this second SPSCR read, enable the OVRF to the CPU by setting the ERRIE bit. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Serial Peripheral Interface Module (SPI)
For the MODF flag to be set, the mode fault error enable bit (MODFEN) must be set. Clearing the MODFEN bit does not clear the MODF flag but does prevent MODF from being set again after MODF is cleared. Technical Data MC68HC908AB32 Rev. 1.0 — Serial Peripheral Interface Module (SPI)
Page 295
When CPHA = 0, a MODF occurs if a slave is selected (SS is at logic 0) and later unselected (SS is at logic 1) even if no SPSCK is sent to that MC68HC908AB32 Rev. 1.0 Technical Data —...
CPU interrupt requests. NOT AVAILABLE SPTE SPTIE SPI TRANSMITTER CPU INTERRUPT REQUEST NOT AVAILABLE SPRIE SPRF SPI RECEIVER/ERROR CPU INTERRUPT REQUEST ERRIE MODF OVRF Figure 16-11. SPI Interrupt Request Generation MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Serial Peripheral Interface Module (SPI)
By not resetting the control bits when SPE is low, the user can clear SPE between transmissions without having to set all control bits again when SPE is set back high for the next transmission. Technical Data MC68HC908AB32 Rev. 1.0 — Serial Peripheral Interface Module (SPI)
The SPI module is inactive after the execution of a STOP instruction. The STOP instruction does not affect register conditions. SPI operation resumes after an external interrupt. If stop mode is exited by reset, any transfer in progress is aborted, and the SPI is reset. MC68HC908AB32 Rev. 1.0 Technical Data —...
MISO — Data received • MOSI — Data transmitted • SPSCK — Serial clock • SS — Slave select • CGND — Clock ground (internally connected to V Technical Data MC68HC908AB32 Rev. 1.0 — Serial Peripheral Interface Module (SPI) MOTOROLA...
MOSI pin and receives data on its MISO pin. When enabled, the SPI controls data direction of the MOSI pin regardless of the state of the data direction register of the shared I/O port. MC68HC908AB32 Rev. 1.0 Technical Data —...
A logic 1 voltage on the SS pin of a slave SPI puts the MISO pin in a high- impedance state. The slave SPI ignores all incoming SPSCK clocks, even if it was already in the middle of a transmission. Technical Data MC68HC908AB32 Rev. 1.0 — Serial Peripheral Interface Module (SPI)
CGND is the ground return for the serial clock pin, SPSCK, and the ground for the port output buffers. It is internally connected to V shown in Table 16-1. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Serial Peripheral Interface Module (SPI)
SPRF bit. The SPRF bit is set when a byte transfers from the shift register to the receive data register. Reset clears the SPRIE bit. 1 = SPRF CPU interrupt requests enabled 0 = SPRF CPU interrupt requests disabled Technical Data MC68HC908AB32 Rev. 1.0 — Serial Peripheral Interface Module (SPI) MOTOROLA...
Page 305
SPTE bit. SPTE is set when a byte transfers from the transmit data register to the shift register. Reset clears the SPTIE bit. 1 = SPTE CPU interrupt requests enabled 0 = SPTE CPU interrupt requests disabled MC68HC908AB32 Rev. 1.0 Technical Data —...
SPI status and control register with SPRF set and then reading the SPI data register. Reset clears the SPRF bit. 1 = Receive data register full 0 = Receive data register not full Technical Data MC68HC908AB32 Rev. 1.0 — Serial Peripheral Interface Module (SPI) MOTOROLA...
Page 307
During an SPTE CPU interrupt, the CPU clears the SPTE bit by writing to the transmit data register. Reset sets the SPTE bit. 1 = Transmit data register empty 0 = Transmit data register not empty MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA...
Use this formula to calculate the SPI baud rate: CGMOUT Baud rate ------------------------- - × 2 BD where: CGMOUT = base clock output of the clock generator module (CGM) BD = baud rate divisor Technical Data MC68HC908AB32 Rev. 1.0 — Serial Peripheral Interface Module (SPI) MOTOROLA...
Figure 16-15. SPI Data Register (SPDR) R7–R0/T7–T0 — Receive/Transmit Data Bits NOTE: Do not use read-modify-write instructions on the SPI data register since the register read is not the same as the register written. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA...
Page 310
Serial Peripheral Interface Module (SPI) Technical Data MC68HC908AB32 Rev. 1.0 — Serial Peripheral Interface Module (SPI) MOTOROLA...
A pin; a logic 0 disables the output buffer. Address: $0004 Bit 7 Bit 0 Read: DDRA7 DDRA6 DDRA5 DDRA4 DDRA3 DDRA2 DDRA1 DDRA0 Write: Reset: Figure 17-3. Data Direction Register A (DDRA) Technical Data MC68HC908AB32 Rev. 1.0 — Input/Output (I/O) Ports MOTOROLA...
PTBx/ATDx pin, while PTB is read as a digital input. Those ports not selected as analog input channels are considered digital I/O ports. Technical Data MC68HC908AB32 Rev. 1.0 — Input/Output (I/O) Ports...
The port C data register contains a data latch for each of the six port C pins. Address: $0002 Bit 7 Bit 0 Read: PTC5 PTC4 PTC3 PTC2 PTC1 PTC0 Write: Reset: Unaffected by reset Alternative Function: MCLK Figure 17-8. Port C Data Register (PTC) Technical Data MC68HC908AB32 Rev. 1.0 — Input/Output (I/O) Ports MOTOROLA...
Avoid glitches on port C pins by writing to the port C data register before changing data direction register C bits from 0 to 1. Figure 17-10 shows the port C I/O logic. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA...
TBCLK — Timer B Clock Input The PTD4 pin becomes TBCLK, the timer B (TIMB) external clock input when the TIMB prescaler select bits, PS[2:0] = 111. See Section 12. Timer Interface Module B (TIMB). MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA...
These writable bits are software programmable to enable pullup devices on an input port pin. 1 = Corresponding port D pin configured to have internal pullup 0 = Corresponding port D pin internal pullup disconnected MC68HC908AB32 Rev. 1.0 Technical Data —...
The PTE6/MOSI pin is the master out/slave in terminal of the SPI module. When the SPE bit is clear, the PTE6/MOSI pin is available for general-purpose I /O. See 16.14.1 SPI Control Register. Technical Data MC68HC908AB32 Rev. 1.0 — Input/Output (I/O) Ports MOTOROLA...
Page 327
E pins that are being used by the SPI module, TIMA, and SCI module. However, the DDRE bits always determine whether reading port E returns the states of the latches or the states of the pins. See Table 17-6. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA...
These read/write bits control port F data direction. Reset clears DDRF[7:0], configuring all port F pins as inputs. 1 = Corresponding port F pin configured as output 0 = Corresponding port F pin configured as input Technical Data MC68HC908AB32 Rev. 1.0 — Input/Output (I/O) Ports MOTOROLA...
Input, Hi-Z DDRF[7:0] PTF[7:0] Output DDRF[7:0] PTF[7:0] PTF[7:0] Notes: 1. X = don’t care. 2. Hi-Z = high impedance. 3. Writing affects data register, but does not affect the input. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Input/Output (I/O) Ports...
Port G is a 3-bit special-function port that shares all three of its pins with the keyboard interrupt (KBI) module. 17.9.1 Port G Data Register (PTG) The port G data register (PTG) contains a data latch for each of the three port G pins. Technical Data MC68HC908AB32 Rev. 1.0 — Input/Output (I/O) Ports MOTOROLA...
G pin; a logic 0 disables the output buffer. Address: $000E Bit 7 Bit 0 Read: DDRG2 DDRG1 DDRG0 Write: Reset: Figure 17-23. Data Direction Register G (DDRG) MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Input/Output (I/O) Ports...
Input, Hi-Z DDRG[2:0] PTG[2:0] Output DDRG[2:0] PTG[2:0] PTG[2:0] Notes: 1. X = don’t care. 2. Hi-Z = high impedance. 3. Writing affects data register, but does not affect the input. Technical Data MC68HC908AB32 Rev. 1.0 — Input/Output (I/O) Ports MOTOROLA...
Data direction register H determines whether each port H pin is an input or an output. Writing logic 1 to a DDRH bit enables the output buffer for the corresponding port H pin; a logic 0 disables the output buffer. MC68HC908AB32 Rev. 1.0 Technical Data —...
The data latch can always be written, regardless of the state of its data direction bit. Table 17-6 summarizes the operation of the port H pins. Technical Data MC68HC908AB32 Rev. 1.0 — Input/Output (I/O) Ports MOTOROLA...
Input, Hi-Z DDRH[1:0] PTH[1:0] Output DDRH[1:0] PTH[1:0] PTH[1:0] Notes: 1. X = don’t care. 2. Hi-Z = high impedance. 3. Writing affects data register, but does not affect the input. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Input/Output (I/O) Ports...
When set, the IMASK bit in the ISCR mask all external interrupt requests. A latched interrupt request is not presented to the interrupt priority logic unless the IMASK bit is clear. Technical Data MC68HC908AB32 Rev. 1.0 — External Interrupt (IRQ)
Use the BIH or BIL instruction to read the logic level on the IRQ pin. NOTE: When using the level-sensitive interrupt trigger, avoid false interrupts by masking interrupt requests in the interrupt routine. Technical Data MC68HC908AB32 Rev. 1.0 — External Interrupt (IRQ) MOTOROLA...
This read/write bit controls the triggering sensitivity of the IRQ pin. Reset clears MODE. 1 = IRQ interrupt requests on falling edges and low levels 0 = IRQ interrupt requests on falling edges only MC68HC908AB32 Rev. 1.0 Technical Data —...
With BCFE at logic 0 (its default state), writing to the ACK bit in the IRQ status and control register during the break state has no effect on the IRQ latch. Technical Data MC68HC908AB32 Rev. 1.0 — External Interrupt (IRQ)
Pin Selected for KBI Function by Full MCU Pin Name Generic Pin Name KBIEx Bit in KBIER KBD0 PTG0/KBD0 KBIE0 KBD1 PTG1/KBD1 KBIE1 KBD2 PTG2/KBD2 KBIE2 KBD3 PTH0/KBD3 KBIE3 KBD4 PTH1/KBD4 KBIE4 Technical Data MC68HC908AB32 Rev. 1.0 — Keyboard Interrupt Module (KBI) MOTOROLA...
If the MODEK bit is set, the keyboard interrupt pins are both falling edge- and low level-sensitive, and both of the following actions must occur to clear a keyboard interrupt request: MC68HC908AB32 Rev. 1.0 Technical Data —...
Page 348
However, the data direction register bit must be a logic 0 for software to read the pin. Technical Data MC68HC908AB32 Rev. 1.0 — Keyboard Interrupt Module (KBI) MOTOROLA...
This read/write bit controls the triggering sensitivity of the keyboard interrupt pins. Reset clears MODEK. 1 = Keyboard interrupt requests on falling edges and low levels 0 = Keyboard interrupt requests on falling edges only Technical Data MC68HC908AB32 Rev. 1.0 — Keyboard Interrupt Module (KBI) MOTOROLA...
19.7 Stop Mode The keyboard module remains active in stop mode. Clearing the IMASKK bit in the keyboard status and control register enables keyboard interrupt requests to bring the MCU out of stop mode. MC68HC908AB32 Rev. 1.0 Technical Data —...
With BCFE at logic 0 (its default state), writing to the keyboard acknowledge bit (ACKK) in the keyboard status and control register during the break state has no effect. Technical Data MC68HC908AB32 Rev. 1.0 — Keyboard Interrupt Module (KBI)
5 of the prescaler. NOTE: Service the COP immediately after reset and before entering or after exiting stop mode to guarantee the maximum time before the first COP counter overflow. Technical Data MC68HC908AB32 Rev. 1.0 — Computer Operating Properly (COP) MOTOROLA...
Reading the COP control register returns the low byte of the reset vector. 20.4.4 Power-On Reset The power-on reset (POR) circuit clears the COP prescaler 4096 CGMXCLK cycles after power-up. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA...
IRQ pin, the COP is automatically disabled until a POR occurs. 20.8 Low-Power Modes The WAIT and STOP instructions put the MCU in low power- consumption standby modes. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Computer Operating Properly (COP)
STOP instruction results in an illegal opcode reset. 20.9 COP Module During Break Mode The COP is disabled during a break interrupt when V is present on the RST pin. Technical Data MC68HC908AB32 Rev. 1.0 — Computer Operating Properly (COP) MOTOROLA...
LVI level for 9 or more consecutive CPU TRIPF cycles. V must be above LVI for only one CPU cycle to bring the TRIPR MCU out of reset. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Low-Voltage Inhibit (LVI)
If enabled in stop mode (LVISTOP set), the LVI module remains active in stop mode. If enabled to generate resets, the LVI module can generate a reset and bring the MCU out of stop mode. MC68HC908AB32 Rev. 1.0 Technical Data —...
A return-from-interrupt instruction (RTI) in the break routine ends the break interrupt and returns the MCU to normal operation. Figure 22-1 shows the structure of the break module. Technical Data MC68HC908AB32 Rev. 1.0 — Break Module (BRK) MOTOROLA...
SBSW is set (see Section 8. System Integration Module (SIM)). Clear the SBSW bit by writing logic 0 to it. Technical Data MC68HC908AB32 Rev. 1.0 — Break Module (BRK) MOTOROLA...
This read/write bit enables breaks on break address register matches. Clear BRKE by writing a logic 0 to bit 7. Reset clears the BRKE bit. 1 = Breaks enabled on 16-bit address match 0 = Breaks disabled on 16-bit address match MC68HC908AB32 Rev. 1.0 Technical Data —...
The SIM break status register (SBSR) contains a flag to indicate that a break caused an exit from wait mode. The flag is useful in applications requiring a return to wait mode after exiting from a break interrupt. Technical Data MC68HC908AB32 Rev. 1.0 — Break Module (BRK)
LOBYTE,SP ;If RETURNLO is not zero, DOLO ;then just decrement low byte. HIBYTE,SP ;Else deal with high byte, too. DOLO LOBYTE,SP ;Point to WAIT/STOP opcode. RETURN PULH ;Restore H register. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Break Module (BRK)
MCU is in a break state. To clear status bits during the break state, the BCFE bit must be set. 1 = Status bits clearable during break 0 = Status bits not clearable during break Technical Data MC68HC908AB32 Rev. 1.0 — Break Module (BRK) MOTOROLA...
≤ (V ) ≤ V range V or V . Reliability of operation is enhanced if unused inputs are connected to an appropriate logic voltage level (for example, either V or V Technical Data MC68HC908AB32 Rev. 1.0 — Electrical Specifications MOTOROLA...
2. K is a constant unique to the device. K can be determined for a known T and measured . With this value of K, P and T can be determined for any value of T MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA...
— Years Notes: 1. Programming a byte more times than the specified maximum may affect the data integrity of that byte. The byte must be erased before it can be programmed again. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Electrical Specifications...
TBD t 23.9 Timer Interface Module Characteristics Characteristic Symbol Unit t TIH , t TIL Input capture pulse width — t TCH , t TCL (1/f Input clock pulse width — Technical Data MC68HC908AB32 Rev. 1.0 — Electrical Specifications MOTOROLA...
2. Source impedances greater than 10 kΩ adversely affect internal RC charging time during input sampling. 3. Zero-input/full-scale reading requires sufficient decoupling measures for accurate conversions. 4. The external system error caused by input leakage current is approximately equal to the product of R source and input current. MC68HC908AB32 Rev. 1.0 Technical Data —...
, unless noted; 100 pF load on all SPI pins. 3. Time to data active from high-impedance state 4. Hold time to high-impedance state 5. With 100 pF on all SPI pins Technical Data MC68HC908AB32 Rev. 1.0 — Electrical Specifications MOTOROLA...
MASTER LSB OUT OUTPUT Note: This last clock edge is generated internally, but is not seen at the SPSCK pin. b) SPI Master Timing (CPHA = 1) Figure 23-1. SPI Master Timing MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Electrical Specifications...
OUTPUT MOSI BITS 6–1 MSB IN LSB IN INPUT Note: Not defined but normally LSB of character previously transmitted b) SPI Slave Timing (CPHA = 1) Figure 23-2. SPI Slave Timing Technical Data MC68HC908AB32 Rev. 1.0 — Electrical Specifications MOTOROLA...
Capacitor Pin Fact XCLK) (CGMXFC). must provide low AC impedance from f = /100 to 100 × 0.1 µF XCLK Bypass capacitor — — , so series VCLK resistance must be considered. MC68HC908AB32 Rev. 1.0 Technical Data — MOTOROLA Electrical Specifications...
× (N/4) over 2 ms (GBNT) Notes: ± 1. V = 5.0 Vdc 10%, V = 0 Vdc, T to T , unless otherwise noted. 2. GBNT guaranteed but not tested. Technical Data MC68HC908AB32 Rev. 1.0 — Electrical Specifications MOTOROLA...
7. The minimum row endurance value specifies each row of the FLASH memory is guaranteed to work for at least this many erase / program cycles. 8. The FLASH is guaranteed to retain data over the entire operating temperature range for at least the minimum time specified. MC68HC908AB32 Rev. 1.0 Technical Data —...
MC Order Numbers ....... . 389 25.2 Introduction This section contains ordering numbers for the MC68HC908AB32. 25.3 MC Order Numbers Table 25-1.
Page 390
Ordering Information Technical Data MC68HC908AB32 Rev. 1.0 — Ordering Information MOTOROLA...
Page 392
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.
Need help?
Do you have a question about the MC68HC908AB32 and is the answer not in the manual?
Questions and answers