at 1-888-629-4642, or visit Maxim’s website at www.maximintegrated.com.
x3
SERIAL
UARTs
COMMUNICATE WITH
NEW AND LEGACY
EQUIPMENT
REMOTE MONITORING
AND CONTROL
VIA THE NETWORK
8051 µC
WITH TCP/IPv4/6
NETWORK STACK IN
ROM
10/100
ETHERNET
MAC
DS80C400/DS80C410/DS80C411
NETWORKED MICROCONTROLLER
HIGH-SPEED MICROCONTROLLER USER’S GUIDE:
NETWORK MICROCONTROLLER SUPPLEMENT
This document is provided as a supplement to the High-Speed Microcontroller User’s Guide, covering new or modified features spe-
cific to the DS80C400/DS80C410/DS80C411. This document must be used in conjunction with the High-SpeedMicrocontroller User’s Guide, available from Maxim. Addenda are arranged by section number, which correspond to sections in the High-Speed Microcontroller User’s Guide.
Unless otherwise specified, the references to the DS80C400 and its features also apply to the DS80C410 and DS80C411. Exceptions
include differences in the amount of internal memory and the inclusion/exclusion of the CAN module.
The following additions and changes, with respect to the High-Speed Microcontroller User’s Guide, are contained in this document.
This document is a work in progress, and updates/additions are added when available.
Rev: 12; 9/08
High-Speed Microcontroller User’s
Maxim Integrated
Guide: Network Microcontroller
Supplement
TABLE OF CONTENTS
ADDENDUM TO SECTION 1: INTRODUCTION 14
The DS80C400 is the third-generation microcontroller in the Maxim 8051 family. It is derived from the DS87C520, but adds a full CAN
2.0B controller, a 16/32-bit arithmetic accelerator, a 1-Wire®bus master, and an IEEE 802.3-compliant Ethernet media access controller. It incorporates the 8051-compatible high-speed microcontroller core, which has been redesigned to reduce the original 8051’s
twelve clocks per instruction cycle to four clocks, while using less power. The DS80C400 offers a maximum system clock speed of
75MHz. The DS80C400 also supports a larger program space, data memory space, and stack memory.
The DS80C400 supports three programmable address modes. The 16-bit 8051 address mode of operation is identical with the original 8051 operation. The 24-bit paged address mode is fully compatible with the 8051 operation, but is still capable of supporting a
larger memory address range within a multiple page mode configuration. The 24-bit contiguous address mode is supported by a full
24-bit program counter and has eight instructions modified to operate in the 24-bit address range. The 24-bit contiguous address mode
requires assembler, compiler, and linker support. The DS80C400 also supports an extended stack in 1kB of internal data RAM.
The DS80C400 provides four data pointers and implements programmable features that are capable of modifying the INC DPTR
instruction to actually decrement the active data pointer, automatically toggle the selection of the data pointer, and automatically increment/decrement the select data pointer.
Features
Seven bidirectional parallel ports
Four 16-bit timers/counters with one up/down timer, capture, and baud-rate generation features
Power-on reset flag
Stop mode exit on interrupts, reset, and CAN bus activity
256 bytes of scratchpad memory
Low-power CMOS
High-speed, four clocks-per-machine cycle architecture
Clock rates: DC to 75MHz (18.75 MIPS)
Minimum instruction cycle of 53ns
24-bit program/data address memory access
Program counter with selectable 16-bit, 24-bit paged, or 24-bit contiguous mode
16MB external interface
64kB on-chip ROM for bootstrap loader
Supports network boot over Ethernet using DHCP and TFTP
Full application-accessible TCP/IP network stack
Supports IPv4 and IPv6
Implements UDP, TCP, DHCP, ICMP, and IGMP
Preemptive, priority-based task scheduler
MAC address acquisition from IEEE-registered DS2502-E48
9kB(DS80C400) / 65kB(DS80C410/411) data SRAM
Four data pointers with auto INC/DEC function
Extended 1kB stack
High-speed math accelerator for 16/32-bit multiply and divide calculations
One’s complement adder
1-Wire bus master
Ethernet controller supports 100/10Mbps full-duplex and half-duplex operation
Three serial port UARTs with framing error detection and automatic address recognition
1-Wire is a registered trademark of Maxim Integrated Products, Inc.
14
High-Speed Microcontroller User’s
Maxim Integrated
Guide: Network Microcontroller
Supplement
16 interrupt sources, 6 external and 10 internal with three levels of interrupt nesting and two programmable priority levels
Crash-proof, bandgap-referenced power-fail warning; voltage sense reset; and automatic power-up reset timeout
Programmable system clock divide control of crystal oscillator. Options include:
Divide-by-1–18.75MHz max. crystal
Divide-by-2–37.5MHz max. crystal
Divide-by-4–Standard operation
Divide-by-1024–Low-speed/power
Status register to verify active-interrupt nesting and real-time serial port transmit/receive activity
User-selectable multiplexed or nonmultiplexed external address/data interface
Programmable watchdog timer
Programmable clock-out and reset-out for additional external stand-alone CAN support
Full CAN 2.0B controller (DS80C400 and DS80C410):
15 message centers
Standard 11-bit or extended 29-bit identification modes
Two data byte masks and associated IDs for DeviceNet™, SDS, and other higher-layer CAN protocol
External transmit disable for autobaud
SIESTA low-power mode
100-pin QFP package
ADDENDUM TO SECTION 2: ORDERING INFORMATION
Refer to the individual data sheets for the available versions.
ADDENDUM TO SECTION 3: ARCHITECTURE
The DS80C400 is designed to provide direct compatibility to all of the traditional 80C32 functions, including a 256-byte special function register (SFR), SRAM memory, a third timer (timer 2), and serial port framing-error detection and automatic address recognition.
Features on the DS80C400 that are compatible with the DS87C520 include a bandgap-based power monitor for interrupt and reset,
timed-access protection, programmable on-board data memory (expanded to 9kB x 8 on the DS80C400, 65kB on the DS80C410/411),
programmable system-clock divide ratios, two serial ports, and a programmable watchdog timer. Expanding on these features, the
DS80C400 also contains an expanded interrupt capability of 16 interrupts with two programmable interrupt priorities, levels for 15 of
the interrupts, and a third-level interrupt priority for power-fail. Additional features include, a math accelerator, a one’s complement
adder, a 1-Wire bus master, a full CAN 2.0B processor (DS80C400/410), an IEEE 802.3-compliant Ethernet media access controller, a
selectable external multiplexed or nonmultiplexed address/data interface, 16-bit, 24-bit paged or 24-bit contiguous addressing operation, and internally decoded chip enables.
The DS80C400 is designed to function similarly to the DS80C390 and run with external program and data memory. The DS80C400 has
been designed to operate with an extended 24-bit address map and to support external memories with a minimum of external logic.
The DS80C400 also supports an optional extended stack pointer and a 1kB stack memory.
CPU Core and CPU Registers
The CPU core of the DS80C400 executes the same binary-compatible instruction set as that of the 80C32. The principal difference
between the core of the DS80C400 and the 80C32 is the number of clocks required to execute specific instructions. The DS80C400
uses a divide-by-4 of the crystal oscillator, and the 80C32 functions with a divide-by-12 of the crystal oscillator. A machine cycle in the
DS80C400 defaults to four periods of the crystal oscillator. A machine cycle in the 80C32 is interpreted as 12 cycles of the oscillator.
The four MOVX data memory instructions of the DS80C400 have the additional capability of being stretched (external data memory
bus access only) from the original data memory access (read or write) time. The MOVX instruction ranges from two machine cycles to
12 machine cycles across eight programmable settings. This MOVX stretch control is user-selectable with the MD2, MD1, and MD0
bits in the clock control register. The ability to do an instruction-based decrement of the DPTR registers is also now supported, through
additional control bits in the DPS1 and DPS SFRs.
DeviceNet is a trademark of OpenDeviceNet Vendor Association Inc.
15
High-Speed Microcontroller User’s
Maxim Integrated
Guide: Network Microcontroller
Supplement
The DS80C400 supports one of three different addressing modes, as selected by software through the AM1 and AM0 bits in the ACON
SFR. The microcontroller functions in either the traditional 16-bit address mode, a 24-bit paged address mode, or in a 24-bit contiguous program mode. The microprocessor defaults after a reset to the traditional 16-bit mode, which is identical to the DS80C320
(A23–A16 are forced to 00h). The 24-bit paged address mode is binary code compliant with traditional compilers for the standard 16bit address range, but allows for up to 16MB of program and 4MB of data memory. A new address page SFR implements an internal
bank-switching mechanism in response to a certain set of call/return instructions. The 24-bit contiguous mode requires a 24-bit address
compiler that supports contiguous program flow over the entire 24-bit address range by the addition of an operand and/or cycles to
eight basic instructions (without the need of bank switching).
The instruction is fetched and sent over the 8-bit internal data bus to the instruction register. The ALU performs math functions, logical
operations, and makes comparisons and general decisions. The ALU primarily uses the accumulator and the B register as either the
source or destination for most operations.
All peripherals and operations that are not explicit instructions in the DS80C400 are controlled by SFRs. The accumulator is the primary register used in the CPU. It is the source or destination for most operations. The B register is used as the second 8-bit argument
in multiply and divide operations. When not used in these operations, the B register can be used as a general-purpose register.
The program status word (PSW) contains a selection of bit flags that include the carry flag, auxiliary carry flag, general-purpose flag,
register bank select, overflow flag, and parity flag.
The data pointers are used in accessing program or data memory with the MOVC or MOVX instruction. Two pairs of pointers are provided, simplifying source and destination address tracking when moving data from one memory area to another memory area or to a
memory-mapped peripheral.
The DS80C400 provides a stack in either the original 8052 scratchpad area or a 1kB programmable area of the on-chip SRAM. The
stack pointer register or register pair, when using the extended 1kB stack, denotes the last used location at the top of the stack.
There are three internal buses, which include a 24-bit address bus and two 8-bit data buses. The address bus provides addresses for op
code/operand fetching. The DA data bus is used for addressing SFRs, fetching instructions and operands from external memory, and providing addresses for the internal stack. The DB data bus is used for data exchange between SFRs and the output of all ALU operations.
ADDENDUM TO SECTION 4: PROGRAMMING MODEL
The DS80C400 microprocessor is based on the industry-standard 80C32. The core is an accumulator-based architecture using internal registers for data storage and peripheral control. It executes the standard 8051 instruction set. This section provides a brief description of each architecture feature. Details concerning the programming model, instruction set, and register description are provided in
Section 4.
The high-speed microcontroller uses several distinct memory areas. These are registers, program memory, and data memory. Registers
serve to control on-chip peripherals and as RAM. Note that registers (on-chip RAM) are separate from data memory. Registers are
divided into three categories including directly addressed on-chip RAM, indirectly addressed on-chip RAM, and SFRs. As follows, the
program and data memory areas are discussed under Memory Map, and the registers are discussed under Registers Map.
Memory Map
The DS80C400 microcontroller defaults to the memory compatibility of the 8051. This device can address up to 1kB of on-chip SRAM.
In addition to the standard 16-bit address mode, the DS80C400 can operate in 24-bit paged or 24-bit contiguous address mode. The
DS80C400 has four internal memory areas: 256 bytes of scratchpad RAM, 9kB(DS80C400) / 65kB(DS80C410/411) SRAM, 256 bytes
of RAM reserved for the CAN message centers, and 64kB of embedded ROM firmware. A 22-bit address bus and an 8-bit data bus
operating in multiplexed or demultiplexed mode can address 16MB of external memory. By configuring the SFRs, eight available chipenable pins are used to access 16MB of external program memory. Also, 4MB of external data memory is accessible by configuring
four peripheral, chip-enable bits in the SFRs. The addresses of the program and data segments can overlap since they are accessed
in different ways. Program memory is fetched by the microprocessor automatically. These addresses are never written by software.
There is one instruction (MOVC) that is used to explicitly read the program area. This is commonly used to read lookup tables. The data
memory area is accessed explicitly using the MOVX instruction. This instruction provides multiple ways of specifying the target
address. In addition, the DS80C400 can be configured to permit a merged von Neumann-style program/data memory space. Detailed
descriptions of the memory mapping alternatives are discussed in a separate section of this user’s guide supplement.
16
High-Speed Microcontroller User’s
Maxim Integrated
Guide: Network Microcontroller
Supplement
Register Map
The register map is separate from the program and data memory areas mentioned above. A separate class of instructions is used to
access the registers. There are 256 potential register location values. In practice, the high-speed microcontroller has 256 bytes of
scratchpad RAM and up to 128 SFRs. This is possible since the upper 128 scratchpad RAM locations can only be accessed indirectly.
That is, the contents of a working register, described later, designate the RAM location. Thus, a direct reference to one of the upper
128 locations must be an SFR access. Direct RAM is reached at locations 0 to 7Fh (0–127). SFRs are accessed directly between 80h
and FFh (128–255). The RAM locations between 128 and 255 can be reached through an indirect reference to those locations.
Scratchpad RAM is available for general-purpose data storage. It is commonly used in place of off-chip RAM when the total data contents are small. When off-chip RAM is needed, the scratchpad area still provides the fastest general-purpose access. Within the 256
bytes of RAM, there are several special-purpose areas, which are described as follows.
Bit-Addressable Locations
In addition to direct register access, some individual bits in both the RAM and SFR area are also accessible. In the scratchpad RAM
area, registers 20h to 2Fh are bit addressable. This provides 128 (16 x 8) individual bits available to software. The type of instruction
distinguishes a bit access from a full register access. In the SFR area, any register location ending in a 0 or 8 is bit addressable.
Working Registers
As part of the lower 128 bytes of RAM, there are four banks of general-purpose working registers, each bank containing registers
R0–R7. The bank is selected by bits in the program status word register. Since there are four banks, the currently selected bank is used
by any instruction using R0–R7. This allows software to change context by switching banks. The working registers also allow their contents to be used for indirect addressing of the upper 128 bytes of RAM. Thus, an instruction can designate the value stored in R0, for
example, to address the upper RAM. This value might be the result of another calculation.
Stack
Another use of the scratchpad area is for the programmer’s stack. This area is selected using the stack pointer (SP: 81h) SFR.
Whenever a call or interrupt is invoked, the return address is placed on the stack. It is also available to the programmer for variables,
etc. The stack pointer defaults to 07h on reset, but can be relocated as needed. A convenient location would be the upper RAM area
(> 7Fh), since this is only available indirectly. The SP points to the last used value. Therefore, the next value placed on the stack is put
at SP + 1. Each PUSH or CALL increments the SP by the appropriate value. Each POP or RET decrements, as well.
The DS80C400 supports an optional 10-bit (1kB) stack. This greatly increases programming efficiency and allows the device to support large programs. When enabled by setting the stack address (SA) bit in the ACON register, 1kB of the internal SRAM is allocated
for use as the stack. The 10-bit address is formed by concatenating the lower 2 bits of the extended stack pointer (ESP: 9Bh) and the
8-bit stack pointer (SP: 81h). The exact address of the 1kB is dependent on the setting of the IDM1-0 bits.
Special-Function Register Maps
Most of the unique features of the high-speed microcontroller family are controlled by bits in SFRs located in unused locations in the
8052 SFR map. This allows for increased functionality, while maintaining complete instruction set compatibility. The SFRs reside in register locations 80h–FFh and are accessed using direct addressing. SFRs that end in 0h or 8h are bit addressable.
The Special Function Register Map table indicates the names and locations of the SFRs used by the DS80C400. The Special Function
Register Location table shows individual bits in those registers. Bits protected by the timed-access function are shaded. The Special
Function Register Reset Values table indicates the reset state of all SFR bits. Following these tables is a complete description of
DS80C400 SFRs that are new to the 8051 architecture or have new or modified functionality.
*Bits in this SFR may have different functions depending on the specific device. Consult the SFR description for details.
23
High-Speed Microcontroller User’s
76543210
SFR 80h
P4.7
A19
P4.6
A18
P4.5
A17
P4.4
A16
P4.3
CE3
P4.2
CE2
P4.1
CE1
P4.0
CE0
RW-0RW-0RW-0RW-0RW-1RW-1RW-1RW-1
Maxim Integrated
Guide: Network Microcontroller
Supplement
Special-Function Registers
The DS80C400 has many unique features as compared to the standard 8052 microcontroller. These features are controlled by use of
the SFRs located in the unused locations of the 8052 SFR map. While maintaining complete instruction set compatibility with the 8052,
increased functionality is achieved with the DS80C400. The description for each bit indicates its read and write access, as well as its
reset state.
Port 4 (P4)
R = Unrestricted read, W = Unrestricted write, -n = Value after reset
P4.7–0Port 4 bit 7–0. This port is composed of eight pins that are user-programmable as I/O, extended program
memory chip enables, or extended address lines. The configuration of the eight pins is established
through the programming of the port 4 control register (P4CNT). Following a reset, and if EA is low,
P4.3–P4.1 are driven high and are assigned as chip enables; port pins P4.7–P4.4 and P4.0 are cleared
to a low state and are assigned as addresses and chip enable, respectively. Additional information on
external memory interfacing is found in the port 4 control register SFR description and later sections of
this user’s guide supplement.
A19
Bit 7
A18
Bit 6
A17
Bit 5
A16
Bit 4
CE3
Bit 3
CE2
Bit 2
CE1
Bit 1
CE0
Bit 0
Programmable parallel port. When programmed to function as a general I/O port (thr
ough the
P4CNT.7–P4CNT.0 in the port 4 control register), data written to the P4.7–P4.0 SFR bits results in setting
the port I/O configuration, as well as setting the state on the corresponding port pin. A 1 written to a port
4 latch, previously programmed low (0), activates a high-current, one-shot pullup on the corr
esponding
pin. This is followed by a static, low-current pullup, which remains on until the port is changed again.
The final high state of the port pin is considered a pseudo-input mode and can be easily overdriven from
an external source. Port latches previously in a high-output state do not change, nor does the high-current one-shot fire when a 1 is loaded. Loading a 0 to a port latch results in a static, high-current pulldown on the corresponding pin. This mode is termed the I/O output state, since no weak devices are
used to drive the pin. Port 4 pins, which have previously been assigned to function as an external memory interface (by the PCNT.7–PCNT.0 control bits), are not altered by a write to the port 4 SFR register.
Port 4 alternate function. Port 4 alternate function is established through the programming of the port
4 control register.
Program/data memory address 19. When this bit is set to logic 1 and the P4CNT register is configured
correctly, the corresponding device pin represents the A19 memory signal.
Program/data memory address 18. When this bit is set to logic 1 and the P4CNT register is configured
correctly, the corresponding device pin represents the A18 memory signal.
Program/data memory address 17. When this bit is set to logic 1 and the P4CNT register is configured
correctly, the corresponding device pin repr
esents the A17 memory signal.
Program/data memory address 16. When this bit is set to logic 1 and the P4CNT register is configured
correctly, the corresponding device pin represents the A16 memor
y signal.
Program memory chip enable 3. When this bit is set to logic 1 and the P4CNT register is configured
correctly, the corresponding device pin r
epresents the memory signal.
Program memory chip enable 2. When this bit is set to logic 1 and the P4CNT register is configured
correctly, the corresponding device pin repr
esents the memory signal.
Program memory chip enable 1. When this bit is set to logic 1 and the P4CNT register is configured
correctly, the corresponding device pin r
epresents the memory signal.
Program memory chip enable 0. When this bit is set to logic 1 and the P4CNT register is configured
correctly, the corresponding device pin repr
R = Unrestricted read, W = Unrestricted write, -n = Value after reset
SP.7–0
Bits 7–0
Stack pointer. This stack pointer identifies current location of the stack. The stack pointer is incremented before every PUSH operation. This register defaults to 07h after reset. The reset value is used
when the stack is in 8051 stack mode. When the 10-bit stack is enabled (SA = 1), this register is combined with the extended stack pointer (ESP: 9Bh) to form the 10-bit address.
Data Pointer Low 0 (DPL)
R = Unrestricted read, W = Unrestricted write, -n = Value after reset
DPL.7–0
Bits 7–0
Data pointer low 0. This register is the low byte of the standard 8051 data pointer and contains the loworder byte of the 24-bit data address. The data pointer low byte 0 is cleared to 00h on all forms of reset.
Data Pointer High 0 (DPH)
R = Unrestricted read, W = Unrestricted write, -n = Value after reset
DPH.7–0
Bits 7–0
Data pointer high 0. This register is the high byte of the standard 8051 data pointer and contains the
middle-order byte of the 24-bit data address. The data pointer high byte 0 is cleared to 00h on all forms
of reset.
Data Pointer Low 1 (DPL1)
R = Unrestricted read, W = Unrestricted write, -n = Value after reset
DPL1.7–0
Bits 7–0
Data pointer low 1. This register is the low byte of auxiliary data pointer 1 and contains the low-order
byte of the 24-bit data address. When the SEL1: 0 bits (DPS.1:0) are set to 01b, DPX1, DPL1 and DPH1
are used during DPTR operations. The data pointer low byte 1 is cleared to 00h on all forms of reset.
Data Pointer High 1 (DPH1)
R = Unrestricted read, W = Unrestricted write, -n = Value after reset
DPH1.7–0
Bits 7–0
25
Data pointer high 1. This register is the high byte of auxiliary data pointer 1 and contains the middle-
order byte of the 24-bit data address. When the SEL1:0 bits (DPS1:0) are set to 01b, DPX1, DPL1 and
DPH1 are used during DPTR operations. The data pointer high byte 1 is cleared to 00h on all forms of
reset.
Data Pointer Select (DPS)
76543210
SFR 86hID1ID0TSLAIDSEL1—
—SEL
RW-0RW-0RW-0R-0R-0R-1RW-0RW-0
Maxim Integrated
R = Unrestricted read, W = Unrestricted write, -n = Value after reset
High-Speed Microcontroller User’s
Guide: Network Microcontroller
Supplement
ID1, ID0
Bits 7–6
TSL
Bit 5
AID
Bit 4
Reserved
Bits 2, 1
SEL1, SEL
Bits 3, 0
Increment/decrement function select. These bits define whether the INC DTPR instruction 7-6 increments or decrements the active data pointer when DPTR1 or DPTR are selected by the SEL1, SEL bits.
Toggle select enable. When set, this bit allows the following five DPTR-related instructions to toggle the
SEL bit, followingexecution of the instruction. When TSL = 0, DPTR-related instructions do not affect the
state of the SEL bit. DPTR-related instructions are:
INC DPTRz
MOV DPTR, #data16
MOVC A, @A+DPTR
MOVX @DPTR, A
MOVX A, @DPTR
Automatic increment/decrement enable. This bit allows three of the DPTR-related instructions to increment (or decrement) the content of the active DPTR, if enabled. The actual function (increment or decrement) is dependent on the setting of the ID3, ID2, ID1, and ID0 bits. The active data pointer is incremented (or decremented) by 1 after execution of DPTR-r
When AID is cleared to 0, a DPTR-related instruction does not affect the content of the active DPTR.
This option is affected by the following instructions:
MOVC A, @A+SPTR
MOVX @SPTR, A
MOVX A, @DPTR
Reserved. (Returns 10b when r
other SFR bits in the register when using INC DPS to toggle the pointer selection.
Data pointer select 1, data pointer select. These bits select the active data pointer.
SEL1, SEL = 00: Use DPX, DPH and DPL as DPTR
SEL1, SEL = 01: Use DPX1, DPH1 and DPL1 as DPTR
SEL1, SEL = 10: Use DPX2, DPH2 and DPL2 as DPTR
SEL1, SEL = 11: Use DPX3, DPH3 and DPL3 as DPTR
1Decrement DPTRIncrement DPTR1
ement DPTR1
elated instruction when AID bit is set to logic 1.
ead.) These bits are needed to prevent carr
y passing through the
26
High-Speed Microcontroller User’s
76543210
SFR 87hSMOD_0SMOD0OFDFODFEGF1GF0STOPIDLE
RW-0RW-0RW-0*RW-0RW-0RW-0RW-0RW-0
Maxim Integrated
Guide: Network Microcontroller
Supplement
Power Control (PCON)
R = Unrestricted read, W = Unrestricted write, -n = Value after reset, * = See description
SMOD_0
Bit 7
SMOD0
Bit 6
OFDF
Bit 5
OFDE
Bit 4
GF1
Bit 3
GF0
Bit 2
STOP
Bit 1
IDLE
Bit 0
Serial port 0 baud-rate doubler enable. This bit enables/disables the serial baud-rate doubling
function for serial port 0.
0 = Serial port 0 baud rate is defined by the baud-rate generation equation.
1 = Serial port 0 baud rate is double that defined by the baud-rate generation equation.
Framing error detection enable. This bit selects the function of the SCON0.7 and SCON1.7, and
SCON2.7.
SMOD0 = 0: SCON0.7, SCON1.7, and SCON2.7 function as SM0 as defined for serial por
SMOD0 = 1: SCON0.7, SCON1.7, and SCON2.7 are converted to the framing error (FE) flag for the
respective serial port.
Oscillator fail-detect flag. When set, this bit indicates that the preceding reset was caused by the
detection of the crystal oscillator frequency falling below approximately 30kHz, if OFDE = 1. OFDF bit
must be clear
when OFDE = 0. OFDF is not set when the processor forces the crystal to stop operation by the stop
mode.
Oscillator fail-detect enable. When the OFDE = 1, a system reset is generated any time the crystal
oscillator frequency falls below approximately 30kHz. This bit does not for
is stopped by the software-enabled stop mode, or if the crystal is stopped when the processor is running from the internal ring oscillator. When the OFDE bit is cleared to logic 0, no reset is issued when
the cr
ystal falls below the 30kHz.
General-purpose user flag 1. This is a bit-addressable, general-purpose flag for software control.
General-purpose user flag 0. This is a bit-addressable, general-purpose flag for software control.
Stop mode select. Setting this bit stops program execution, halts the CPU oscillator and internal timers
and places the CPU in a low-power mode. This bit is cleared and operation is resumed by
an exter
this bit while IDLE = 1 places the device in an undefined state. Setting this bit also clears the CTM
bit. This bit cannot be set while either CAN module is active, i.e., SWINT = CRST = PDE = 0. The following sequence should be used to activate Stop mode: (1) set (CRST or SWINT or PDE) = 1 for
both CANs, (2) clear all CAN bus activity bits for both CANs, (3) set STOP = 1.
Idle mode select. Setting this bit stops program execution, but leaves the CPU oscillator, timers, serial
ports, and interrupts active. This bit is cleared by a reset, or any of the external interrupts, and resumes
mal program execution.
nor
ed by software, and it is not altered by the crystal oscillator frequency falling below 30kHz
ce a reset when the oscillator
nal reset or execution of an enabled external interrupt. This bit is always read as 0. Setting
t control registers.
,
27
Timer/Counter Control (TCON)
76543210
SFR 88hTF1TR1TF0TR0IE1IT1IE0IT0
RW-0RW-0RW-0RW-0RW-0RW-0RW-0RW-0
Maxim Integrated
R = Unrestricted read, W = Unrestricted write, -n = Value after reset
High-Speed Microcontroller User’s
Guide: Network Microcontroller
Supplement
TF1
Bit 7
TR1
Bit 6
TF0
Bit 5
TR0
Bit 4
IE1
Bit 3
IT1
Bit 2
IE0
Bit 1
IT0
Bit 0
Timer 1 overflow flag. This bit indicates when timer 1 overflows its maximum count as defined
by the current mode. This bit can be cleared by software and is automatically cleared when the CPU
vectors to the timer 1 interrupt service routine.
0 = No timer 1 overflow has been detected.
1 = Timer 1 has overflowed its maximum count.
Timer 1 run control. This bit enables/disables the operation of timer 1.
0 = Timer 1 is halted.
1 = Timer 1 is enabled.
Timer 0 overflow flag. This bit indicates when timer 0 overflows its maximum count as defined
by the current mode. This bit can be cleared by software and is automatically cleared when the CPU
vectors to the timer 0 interrupt service r
0 = No timer 0 overflow has been detected.
1 = Timer 0 has overflowed its maximum count.
Timer 0 run control. This bit enables/disables the operation of timer 0.
0 = Timer 0 is halted.
1 = Timer 0 is enabled.
Interrupt 1 edge detect. This bit is set when an edge/level of the type defined by IT1 is
detected. If IT1 = 1, this bit remains set until cleared in software or until the start of the external interrupt
vice routine. If IT1 = 0, this bit inversely reflects the state of the INT1 pin.
1 ser
Interrupt 1 type select. This bit selects whether the INT1 pin detects edge- or level-triggered
interrupts.
0 = INT1 is level triggered.
1 = INT1 is edge triggered.
Interrupt 0 edge detect. This bit is set when an edge/level of the type defined by IT0 is
detected. If IT0 = 1, this bit r
service r
Interrupt 0 type select. This bit selects whether the INT0 pin detects edge- or level-trigger
interrupts.
0
1
outine. If IT0 = 0, this bit inversely r
= INT0 is level trigger
= INT0 is edge triggered.
emains set until clear
ed.
outine or by software.
ed in softwar
eflects the state of the INT0 pin.
e or the star
t of the exter
nal interrupt 0
ed
28
High-Speed Microcontroller User’s
76543210
SFR 89hGATEC/TM1M0GATEC/TM1M0
RW-0RW-0RW-0RW-0RW-0RW-0RW-0RW-0
Maxim Integrated
Guide: Network Microcontroller
Supplement
Timer Mode Control (TMOD)
R = Unrestricted read, W = Unrestricted write, -n = Value after reset
GATE
Bit 7
C/T
Bit 6
M1, M0
Bits 5-4
GATE
Bit 3
C/T
Bit 2
M1, M0
Bits 1-0
Timer 1 gate control. This bit enables/disables the ability of timer 1 to increment.
0 = Timer 1 clocks when TR1 = 1, regardless of the state of INT1.
1 = Timer 1 clocks only when TR1 = 1 and INT1 = 1.
Timer 1 counter/timer select.
0 = Timer 1 is incremented by internal clocks.
1 = Timer 1 is incremented by pulses on T1 when TR1 (TCON.6) is 1.
Timer 1 mode select. These bits select the operating mode of timer 1.
M1M0Mode
00Mode 0: 8 bits with 5-bit prescale
01Mode 1: 16 bits
1
11Mode 3: Timer 1 is halted but holds its count
Timer 0 gate control. This bit enables/disables the ability of timer 0 to increment.
0 = Timer 0 clocks when TR0 = 1, regardless of the state of INT0.
1 = Timer 0 clocks only when TR0 = 1 and INT0 = 1.
Timer 0 counter/timer select.
0
1 = Timer 0 is incremented by pulses on T0 when TR0 (TCON.4) is 1.
Timer 0 mode select. These bits select the operating mode of timer 0. When timer 0 is in mode 3, TL0
is started/stopped by TR0 and TH0 is started/stopped by TR1. Run control from timer 1 is then provided through the timer 1 mode selection.
M1M0Mode
0
01
10Mode 2: 8 bits with autoreload
11Mode 3: Two 8-bit timers for timer 0; timer 1 is stopped.
0Mode 2: 8 bits with autoreload
= Timer incremented by internal clocks.
0Mode 0: 8 bits with 5-bit prescale
Mode 1: 16 bits
29
Timer 0 LSB (TL0)
76543210
SFR 8AhTL0.7TL0.6TL0.5TL0.4TL0.3TL0.2TL0.1TL0.0
RW-0RW-0RW-0RW-0RW-0RW-0RW-0RW-0
76543210
SFR 8BhTL1.7TL1.6TL1.5TL1.4TL1.3TL1.2TL1.1TL1.0
RW-0RW-0RW-0RW-0RW-0RW-0RW-0RW-0
76543210
SFR 8ChTH0.7TH0.6TH0.5TH0.4TH0.3TH0.2TH0.1TH0.0
RW-0RW-0RW-0RW-0RW-0RW-0RW-0RW-0
76543210
SFR 8DhTH1.7TH1.6TH1.5TH1.4TH1.3TH1.2TH1.1TH1.0
RW-0RW-0RW-0RW-0RW-0RW-0RW-0RW-0
Maxim Integrated
R = Unrestricted read, W = Unrestricted write, -n = Value after reset
High-Speed Microcontroller User’s
Guide: Network Microcontroller
Supplement
TL0.7–0
Timer 0 LSB. This register contains the least significant byte of timer 0.
Bits 7–0
Timer 1 LSB (TL1)
R = Unrestricted read, W = Unrestricted write, -n = Value after reset
TL1.7–0
Timer 1 LSB. This register contains the least significant byte of timer 1.
Bits 7–0
Timer 0 MSB (TH0)
R = Unrestricted read, W = Unrestricted write, -n = Value after reset
TH0.7–0
Timer 0 MSB. This register contains the most significant byte of timer 0.
Bits 7–0
Timer 1 MSB (TH1)
R = Unrestricted read, W = Unrestricted write, -n = Value after reset
TH1.7–0
Timer 1 MSB. This register contains the most significant byte of timer 1.
Bits 7–0
30
Loading...
+ 191 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.