The W79E8213 series are an 8-bit 4T-8051 microcontroller which has Flash EPROM which is
programmable by ICP (In Circuit Program) or by hardware writer. The instruction set of the W79E8213
series are fully compatible with the standard 8052. The W79E8213 series contain a 4K bytes of main
Flash EPROM; a 128 bytes of RAM; two 16-bit timer/counters; 4-channel 10-bit PWM; 3 edge detector
inputs; 8-channel multiplexed 10-bit A/D convert. The W79E8213 series supports 128 bytes NVM Data
Flash EPROM. These peripherals are supported by 10 sources four-level interrupt capability. To
facilitate programming and verification, the Flash EPROM inside the W79E8213 series allow the
program memory to be programmed and read electronically. Once the code is confirmed, the user can
protect the code for security.
Publication Release Date: July 11, 2008
- 4 - Revision A2
Preliminary W79E8213/W79E8213R Data Sheet
2. FEATURES
z Fully static design 8-bit 4T-8051 CMOS microcontroller:
VDD = 4.5V to 5.5V @20MHz
VDD = 2.7V to 5.5V @12MHz
VDD = 2.4V to 5.5V @4MHz
z Instruction-set compatible with MSC-51.
z Flexible CPU clock source configurable by config bit and software:
High speed external oscillator: upto 20MHz Crystal and resonator (enabled by config bit).
Internal RC oscillator: 20/10MHz selectable by config bit, only W79E8213R supports ±2%
accuracy internal RC oscillator at fixed voltage and temperature condition.
z 4K bytes of AP Flash EPROM, with ICP and external writer programmable mode.
z 128 bytes of on-chip RAM.
z W79E8213 series supports 128 bytes NVM Data Flash EPROM for customer data storage used
and 10K writer cycles.
8 pages. Page size is 16 bytes.
z Two 16-bit timer/counters.
z Ten interrupts source with four levels of priority.
z Three-edge detect interrupt inputs.
z Programmable Watchdog Timer.
z Four-channel 10-bit PWM (Pulse Width Modulator).
z Internal square wave generator for buzzer.
z Up to 18 I/O pins.
z The 4 outputs mode and TTL/Schmitt trigger selectable Port.
z LED drive capability (20mA) on all port pins. Sink 20mA; Drive: -15~-20mA @push-pull mode.
z Eight high sink capability (40mA) port pins.
z Eight-channel multiplexed with 10-bits A/D convert.
z Low Voltage Detect interrupt and reset.
z Development Tools:
Multifunction pins for T1, PWM0,
PWM3, BRAKE, AD0-7, Data
and Clock (for ICP).
Port1:
Support 4 output modes and
TTL/Schmitt trigger (except for
P1.5 input only).
Multifunction pins for /RST, T0,
/INT0-1, BUZ, PWM1-2, ED0-2,
STADC, and HV (for ICP).
P1.0-P1.7 have 40mA high sink
capability.
CRYSTAL2: This is the crystal
oscillator output. It is the
inversion of XTAL1. Also a
configurable i/o pin.
When operating as I/O, it
supports 4 output modes and
TTL/Schmitt trigger.
CRYSTAL1: This is the crystal
oscillator input. This pin may be
driven by an external clock or
configurable I/O pin.
When operating as I/O, it
supports 4 output modes and
TTL/Schmitt trigger.
Table 5-1: Pin Descriptions
Note:
On power-on-reset, all port pins will be tri-stated.
After power-on-reset, all port pins state will follow CONFIG0.PRHI bit definition.
Publication Release Date: July 11, 2008
- 7 - Revision A2
Preliminary W79E8213/W79E8213R Data Sheet
6. FUNCTIONAL DESCRIPTION
The W79E8213 series architecture consist of a 4T 8051 core controller surrounded by various
registers, 4K bytes Flash EPROM, 128 bytes of RAM, up to 18 general purpose I/O ports, two
timer/counters, 3 edge detector inputs, 4-channel PWM with 10-bits counter, 8-channel multiplexed
with 10-bit ADC analog input, Flash EPROM program by Writer and ICP. W79E8213 series supported
128 bytes NVM Data Flash EPROM.
6.1 On-Chip Flash EPROM
The W79E8213 series include one 4K bytes of main Flash EPROM for application program. A Writer
or ICP programming board is required to program the Flash EPROM or NVM Data Flash EPROM.
This ICP (In-Circuit Programming) feature makes the job easy and efficient when the application’s
firmware needs to be updated frequently. In some applications, the in-circuit programming feature
makes it possible for the end-user to easily update the system firmware without opening the chassis.
6.2 I/O Ports
The W79E8213 series have up to 18 I/O pins using internal RC oscillator & /RST is input only by reset
options. All ports can be used as four outputs mode when it may set by PxM1.y and PxM2.y SFR’s
registers, it has strong pull-ups and pull-downs, and does not need any external pull-ups. Otherwise it
can be used as general I/O port as open drain circuit. All ports can be used bi-directional and these
are as I/O ports. These ports are not true I/O, but rather are pseudo-I/O ports. This is because these
ports have strong pull-downs and weak pull-ups.
6.3 Timers
The W79E8213 series have two 16-bit timers that are functionally and similar to the timers of the 8052
family. When used as timers, the user has a choice of 12 or 4 clocks per count that emulates the
timing of the original 8052.
6.4 Interrupts
The Interrupt structure in the W79E8213 series is slightly different from that of the standard 8052. Due
to the presence of additional features and peripherals, the number of interrupt sources and vectors
has been increased.
6.5 Data Pointer
The data pointer of W79E8213 series is same as standard 8052 which have 16-bit Data Pointer
(DPTR).
6.6 Architecture
The W79E8213 series are based on the standard 8052 device. It is built around an 8-bit ALU that uses
internal registers for temporary storage and control of the peripheral devices. It can execute the
standard 8052 instruction set.
Publication Release Date: July 11, 2008
- 8 - Revision A2
Preliminary W79E8213/W79E8213R Data Sheet
6.6.1 ALU
The ALU is the heart of the W79E8213 series. It is responsible for the arithmetic and logical functions.
It is also used in decision making, in case of jump instructions, and is also used in calculating jump
addresses. The user cannot directly use the ALU, but the Instruction Decoder reads the op-code,
decodes it, and sequences the data through the ALU and its associated registers to generate the
required result. The ALU mainly uses the ACC which is a special function register (SFR) on the chip.
Another SFR, namely B register is also used in Multiply and Divide instructions. The ALU generates
several status signals which are stored in the Program Status Word register (PSW).
6.6.2 Accumulator
The Accumulator (ACC) is the primary register used in arithmetic, logical and data transfer operations
in the W79E8213 series. Since the Accumulator is directly accessible by the CPU, most of the high
speed instructions make use of the ACC as one argument.
6.6.3 B Register
This is an 8-bit register that is used as the second argument in the MUL and DIV instructions. For all
other instructions it can be used simply as a general purpose register.
6.6.4 Program Status Word
This is an 8-bit SFR that is used to store the status bits of the ALU. It holds the Carry flag, the Auxiliary
Carry flag, General purpose flags, the Register Bank Select, the Overflow flag, and the Parity flag.
6.6.5 Scratch-pad RAM
The W79E8213 series have a 128 bytes on-chip scratch-pad RAM. These can be used by the user for
temporary storage during program execution. A certain section of this RAM is bit addressable, and can
be directly addressed for this purpose.
6.6.6 Stack Pointer
The W79E8213 series have an 8-bit Stack Pointer which points to the top of the Stack. This stack
resides in the Scratch Pad RAM in the W79E8213 series. Hence the size of the stack is limited by the
size of this RAM.
6.7 Power Management
Power Management like the standard 8052, the W79E8213 series also have the IDLE and POWER
DOWN modes of operation. In the IDLE mode, the clock to the CPU is stopped while the timers, serial
ports and interrupt block continue to operate. In the POWER DOWN mode, all clocks are stopped and
the chip operation is completely stopped. This is the lowest power consumption state.
Publication Release Date: July 11, 2008
- 9 - Revision A2
Preliminary W79E8213/W79E8213R Data Sheet
7. MEMORY ORGANIZATION
The W79E8213 series separate the memory into two separate sections, the Program Memory and the
Data Memory. The Program Memory is used to store the instruction op-codes, while the Data Memory
is used to store data or for memory mapped devices.
FFFFHFFFFH
FC7FH
(16 bytes/page)
FC00H
1000H
0FFFH
0000H
Unused
Code Memory
128B
NVM
Data Memory
Unused
Code Memory
4K Bytes
On-Chip
Code Memory
Figure 7-1: W79E8213 series memory map
(128B NVM, 16bytes/page)
Page 7
Page 6
Page 5
Page 4
Page 3
Page 2
Page 1
Page 0
FC7Fh
FC70h
FC6Fh
FC60h
FC5Fh
FC50h
FC4Fh
FC40h
FC3Fh
FC30h
FC2Fh
FC20h
FC1Fh
FC10h
FC0Fh
FC00h
NVM Data Memory Area
CONFIG 1
CONFIG 0
Unused
Data Memory
0000H
External Data Memory SpaceOn-Chip Code Memory Space
7.1 Program Memory (on-chip Flash)
The Program Memory on the W79E8213 series can be up to 4K bytes long. All instructions are
fetched for execution from this memory area. The MOVC instruction can also access this memory
region.
7.2 Data Flash Memory
The NVM Data Memory of Flash EPROM on the W79E8213 series is 128 bytes long, with page size of
16 bytes, respectively. The W79E8213 series’ NVM size is controllable through CONFIG1 register.
The W79E8213 series read the content of data memory by using “MOVC A, @A+DPTR”. To write
data is by NVMADDRL, NVMDATA and NVMCON SFR’s registers.
Publication Release Date: July 11, 2008
- 10 - Revision A2
Preliminary W79E8213/W79E8213R Data Sheet
7.3 Data Memory (accessed by MOVX)
Not available in this product series.
7.4 Scratch-pad RAM and Register Map
As mentioned before the W79E8213 series have separate Program and Data Memory areas. The onchip 128 bytes scratch pad RAM is in addition to the external memory. There are also several Special
Function Registers (SFRs) which can be accessed by software. The SFRs can be accessed only by
direct addressing, while the on-chip RAM can be accessed by either direct or indirect addressing.
Figure 7-2: W79E8213 RAM and SFR memory map
Since the scratch-pad RAM is only 128 bytes it can be used only when data contents are small. There
are several other special purpose areas within the scratch-pad RAM. These are described as follows.
There are four sets of working registers, each consisting of eight 8-bit registers. These are termed as
Banks 0, 1, 2, and 3. Individual registers within these banks can be directly accessed by separate
instructions. These individual registers are named as R0, R1, R2, R3, R4, R5, R6 and R7. However, at
one time the W79E8213 series can work with only one particular bank. The bank selection is done by
setting RS1-RS0 bits in the PSW. The R0 and R1 registers are used to store the address for indirect
accessing.
Publication Release Date: July 11, 2008
- 12 - Revision A2
Preliminary W79E8213/W79E8213R Data Sheet
7.4.2 Bit addressable Locations
The Scratch-pad RAM area from location 20h to 2Fh is byte as well as bit addressable. This means
that a bit in this area can be individually addressed. In addition some of the SFRs are also bit
addressable. The instruction decoder is able to distinguish a bit access from a byte access by the type
of the instruction itself. In the SFR area, any existing SFR whose address ends in a 0 or 8 is bit
addressable.
7.4.3 Stack
The scratch-pad RAM can be used for the stack. This area is selected by the Stack Pointer (SP),
which stores the address of the top of the stack. Whenever a jump, call or interrupt is invoked the
return address is placed on the stack. There is no restriction as to where the stack can begin in the
RAM. By default however, the Stack Pointer contains 07h at reset. The user can then change this to
any value desired. The SP will point to the last used value. Therefore, the SP will be incremented and
then address saved onto the stack. Conversely, while popping from the stack the contents will be read
first, and then the SP is decreased.
Publication Release Date: July 11, 2008
- 13 - Revision A2
Preliminary W79E8213/W79E8213R Data Sheet
8. SPECIAL FUNCTION REGISTERS
The W79E8213 series uses Special Function Registers (SFRs) to control and monitor peripherals and
their Modes. The SFRs reside in the register locations 80-FFh and are accessed by direct addressing
only. Some of the SFRs are bit addressable. This is very useful in cases where users wish to modify a
particular bit without changing the others. The SFRs that are bit addressable are those whose
addresses end in 0 or 8. The W79E8213 series contain all the SFRs present in the standard 8052.
However some additional SFRs are added. In some cases the unused bits in the original 8052, have
been given new functions. The list of the SFRs is as follows.
F8
F0
E8
E0
D8
D0
C8
C0
B8
B0
A8
A0
98
90
88
IP1 BUZCON
B PADIDS IP1H
EIE
ACC ADCCON ADCH ADCCON1
WDCON PWMPL PWM0L PWM1L PWMCON1PWM2LPWM3L PWMCON2
PSW PWMPH PWM0HPWM1H
NVMCON NVMDATA
NVMADDRL TA
IP0
P0M1 P0M2 P1M1 P1M2 P2M1 P2M2 IP0H
IE
P2 AUXR1 EDIC
P1
TCON TMOD TL0 TL1 TH0 TH1 CKCON
PWM2HPWM3H PWMCON3
80
Note: 1. The SFRs in the column with dark borders are bit-addressable
2. The table is condensed with eight locations per row. Empty locations indicate that these are no registers at these
P0 SP DPL DPH PCON
Table 8-1: Special Function Register Location Table
addresses. When a bit or register is not implemented, it will read high.
Mnemonic: P0 Address: 80h
P0.7-0: General purpose Input/Output port. Most instructions will read the port pins in case of a port
read access, however in case of read-modify-write instructions, the port latch is read. These alternate
functions are described below:
BIT NAME FUNCTION
7 P0.7 AD7 pin or Timer 1 pin by alternative.
6 P0.6 AD3 pin by alternative.
5 P0.5 AD2 pin by alternative.
4 P0.4 AD1 pin by alternative.
3 P0.3 AD0 pin by alternative.
2 P0.2 AD4 pin or BRAKE pin by alternative.
1 P0.1 AD5 pin or PWM0 pin by alternative.
0 P0.0 AD6 pin or PWM3 pin by alternative.
Note: During power-on-reset, the port pins are tri-stated. After power-on -reset, the value of the port is set by CONFIG0.PRHI
bit. The default setting for CONFIG0.PRHI =1 which the alternative function output is turned on upon reset. If
CONFIG0.PRHI is set to 0, the user has to write a 1 to port SFR to turn on the alternative function output.
1: Set automatically when a brownout reset or interrupt has occurred. Also set at
power on.
0: Cleared by software.
1: Set automatically when a power-on reset has occurred.
1: The CPU goes into the POWER DOWN mode. In this mode, all the clocks are
stopped and program execution is frozen.
1: The CPU goes into the IDLE mode. In this mode, the clocks CPU clock stopped,
so program execution is frozen. But the clock to the serial, timer and interrupt
blocks is not stopped, and these blocks continue operating.
Publication Release Date: July 11, 2008
- 18 - Revision A2
Preliminary W79E8213/W79E8213R Data Sheet
BIT NAME FUNCTION
Timer 1 Overflow Flag. This bit is set when Timer 1 overflows. It is cleared
7 TF1
6 TR1
5 TF0
4 TR0
3 IE1
2 IT1
1 IE0
0 IT0
automatically when the program does a timer 1 interrupt service routine. Software
can also set or clear this bit.
Timer 1 Run Control. This bit is set or cleared by software to turn timer/counter on
or off.
Timer 0 Overflow Flag. This bit is set when Timer 0 overflows. It is cleared
automatically when the program does a timer 0 interrupt service routine. Software
can also set or clear this bit.
Timer 0 Run Control. This bit is set or cleared by software to turn timer/counter on
or off.
Interrupt 1 Edge Detect Flag: Set by hardware when an edge/level is detected on
INT1
. This bit is cleared by hardware when the service routine is vectored to only if
the interrupt was edge triggered. Otherwise it follows the inverse of the pin.
Interrupt 1 Type Control. Set/cleared by software to specify falling edge/ low level
triggered external inputs.
Interrupt 0 Edge Detect Flag. Set by hardware when an edge/level is detected on
INT0
. This bit is cleared by hardware when the service routine is vectored to only if
the interrupt was edge triggered. Otherwise it follows the inverse of the pin.
Interrupt 0 Type Control: Set/cleared by software to specify falling edge/ low level
triggered external inputs.
TIMER MODE CONTROL
Bit: 7 6 5 4 3 2 1 0
GATE
TIMER1 TIMER0
TC/
M1 M0 GATE
TC/
M1 M0
Mnemonic: TMOD Address: 89h
BIT NAME FUNCTION
INT1
7 GATE
Gating control: When this bit is set, Timer/counter 1 is enabled only while the
pin is high and the TR1 control bit is set. When cleared, the
INT1 pin has no effect,
and Timer 1 is enabled whenever TR1 control bit is set.
6
Timer or Counter Select: When clear, Timer 1 is incremented by the internal clock.
TC/
When set, the timer counts falling edges on the T1 pin.
5 M1 Timer 1 mode select bit 1. See table below.
4 M0 Timer 1 mode select bit 0. See table below.
3 GATE
Gating control: When this bit is set, Timer/counter 0 is enabled only while the
pin is high and the TR0 control bit is set. When cleared, the
INT0 pin has no effect,
INT0
and Timer 0 is enabled whenever TR0 control bit is set.
2
Timer or Counter Select: When clear, Timer 0 is incremented by the internal clock.
TC/
When set, the timer counts falling edges on the T0 pin.
1 M1 Timer 0 mode select bit 1. See table below.
0 M0 Timer 0 mode select bit 0. See table below.
M1, M0: Mode Select bits:
Publication Release Date: July 11, 2008
- 19 - Revision A2
Preliminary W79E8213/W79E8213R Data Sheet
M1 M0 MODE
0 0
Mode 0: 13-bits timer/counter; THx 8 bits and TLx 5 bits which serve as pre-scalar.
0 1
1 0
Mnemonic: P1 Address: 90h
P1.7-0: General purpose Input/Output port. Most instructions will read the port pins in case of a port
read access, however in case of read-modify-write instructions, the port latch is read. These alternate
functions are described below:
BIT NAME FUNCTION
7
6
5
4
3
2
1
0
Note: During power-on-reset, the port pins are tri-stated. After power-on-reset, the value of the port is set by CONFIG0.PRHI
- Reserved.
P1.7 PWM2 pin by alternative.
P1.6 PWM1 pin by alternative.
P1.5 /RST pin or input pin by alternative.
P1.4 STADC pin or /INT1 interrupt pin by alternative.
P1.3 /INT0 interrupt pin by alternative.
P1.2 Timer 0 pin or ED2 pin by alternative.
P1.1 ED1 pin by alternative.
P1.0 BUZ pin or ED0 pin by alternative.
bit. The default setting for CONFIG0.PRHI =1 which the alternative function output is turned on upon reset. If
CONFIG0.PRHI is set to 0, the user has to write a 1 to port SFR to turn on the alternative function output.
PORT 2
Bit: 7 6 5 4 3 2 1 0
- - - - - - P2.1 P2.0
Mnemonic: P2 Address: A0h
Publication Release Date: July 11, 2008
- 21 - Revision A2
Preliminary W79E8213/W79E8213R Data Sheet
BIT NAME FUNCTION
7-2 - Reserved.
1 P2.1 XTAL1 clock input pin.
0 P2.0 XTAL2 or CLKOUT pin by alternative.
Note: During power-on-reset, the port pins are tri-stated. After power-on -reset, the value of the port is set by CONFIG0.PRHI
bit. The default setting for CONFIG0.PRHI =1 which the alternative function output is turned on upon reset. If
CONFIG0.PRHI is set to 0, the user has to write a 1 to port SFR to turn on the alternative function output.
1: When any pin of port 1.0-1.2 that is enabled for the Edge Detect Interrupt
function trigger (falling/rising edge trigger configurable). Must be cleared by
software.
Brown Out Disable:
0: Enable Brownout Detect function.
1: Disable Brownout Detect function and save power.
Brown Out Interrupt:
0: Disable Brownout Detect Interrupt function and it will cause chip reset when
BOF is set.
1: This prevents Brownout Detection from causing a chip reset and allows the
Brownout Detect function to be used as an interrupt.
Low Power Brown Out Detect control:
0: When BOD is enable, the Brown Out detect is always turned on by normal run
or Power-down mode.
1: When BOD is enable, the Brown Out detect circuit is turned on by Power-
down mode. This control can help save 15/16 of the Brownout circuit power.
When uC is in Power-down mode, the BOD will enable internal RC OSC
(600KHz+/- 50%)
Software reset:
1: reset the chip as if a hardware reset occurred.
0: Disable ADC circuit.
1: Enable ADC circuit.
Square-wave enable bit:
0: Disable square wave output.
1: The square wave is output to the BUZ (P1.0) pin.
Edge detect 2 (ED2) trigger type bit:
0 – Falling edge on ED2 pin will cause EDF to be set (if ED2EN is enabled).
1 – Either falling or rising edge on ED2 pin will cause EDF to be set (if ED2EN is
enabled).
Edge detect 2 (ED2) enable bit:
0 – Disabled.
1 – Enable ED2 (P1.2 pin) as a cause of an edge detect interrupt.
0 – Falling edge on ED1 pin will cause EDF to be set (if ED1EN is enabled).
1 – Either falling or rising edge on ED1 pin will cause EDF to be set (if ED1EN is
enabled).
Edge detect 1 (ED1) enable bit:
0 – Disabled.
1 – Enable ED1 (P1.1 pin) as a cause of an edge detect interrupt.
Edge detect 0 (ED0) trigger type bit:
0 – Falling edge on ED0 pin will cause EDF to be set (if ED0EN is enabled).
1 – Either falling or rising edge on ED0 pin will cause EDF to be set (if ED0EN is
enabled).
Edge detect 0 (ED0) enable bit:
0 – Disabled.
1 – Enable ED0 (P1.0 pin) as a cause of an edge detect interrupt.
Publication Release Date: July 11, 2008
- 23 - Revision A2
Preliminary W79E8213/W79E8213R Data Sheet
BIT NAME FUNCTION
7 EA Global enable. Enable/Disable all interrupts.
6 EADC Enable ADC interrupt.
5 EBO Enable Brown Out interrupt.
4 - Reserved.
3 ET1 Enable Timer 1 interrupt.
2 EX1 Enable external interrupt 1.
1 ET0 Enable Timer 0 interrupt.
0 EX0 Enable external interrupt 0.
2 T0OE
1 P2M1.1 To control the output configuration of P2.1.
0 P2M1.0 To control the output configuration of P2.0.
PORT 2 OUTPUT MODE 2
Bit: 7 6 5 4 3 2 1 0
- - - - - - P2M2.1 P2M2.0
Mnemonic: P2M2 Address: B6h
BIT NAME FUNCTION
7-2 - Reserved.
1-0 P2M2.[1:0] To control the output configuration of P2 bits [1:0]
0: Disable Schmitt trigger inputs on port 1 and enable TTL inputs on port 1.
1: Enables Schmitt trigger inputs on Port 1.
0: Disable Schmitt trigger inputs on port 0 and enable TTL inputs on port 0
1: Enables Schmitt trigger inputs on Port 0.
1: The P0.7 pin is toggled whenever Timer 1 overflows. The output frequency is
therefore one half of the Timer 1 overflow rate.
1: The P1.2 pin is toggled whenever Timer 0 overflows. The output frequency is
therefore one half of the Timer 0 overflow rate.
PXM1.Y
(SEE NOTE)
0 0 Quasi-bidirectional
0 1 Push-Pull
1 0
1 1 Open Drain
Port Output Configuration Settings:
PXM2.Y PORT INPUT/OUTPUT MODE
Input Only (High Impedance)
P2M1.PxS=0, TTL input
P2M1.PxS=1, Schmitt input
Publication Release Date: July 11, 2008
- 25 - Revision A2
Preliminary W79E8213/W79E8213R Data Sheet
INTERRUPT HIGH PRIORITY
Bit: 7 6 5 4 3 2 1 0
- PADCH PBOH - PT1H PX1H PT0H PX0H
Mnemonic: IP0H Address: B7h
BIT NAME FUNCTION
7 - This bit is un-implemented and will read high.
6 PADCH 1: To set interrupt high prio rity of ADC is highest priority level.
5 PBOH 1: To set interrupt high priority of Brown Out Detector is highest priority level.
4 - Reserved.
3 PT1H 1: To set interrupt high priority of Timer 1 is highest priority level.
2 PX1H 1: To set interrupt high priority of External interrupt 1 is highest priority level.
1 PT0H 1: To set interrupt high priority of Timer 0 is highest priority level.
0 PX0H 1: To set interrupt high priority of External interrupt 0 is highest priority level.
INTERRUPT PRIORITY 0
Bit: 7 6 5 4 3 2 1 0
- PADC PBO - PT1 PX1 PT0 PX0
Mnemonic: IP Address: B8h
BIT NAME FUNCTION
7 - This bit is un-implemented and will read high.
6 PADC 1: To set interrupt priority of ADC is higher priority level.
5 PBO 1: To set interrupt priority of Brown Out Detector is higher priority level.
4 - Reserved.
3 PT1 1: To set interrupt priority of Timer 1 is higher priority level.
2 PX1 1: To set interrupt priority of External interrupt 1 is higher priority level.
1 PT0 1: To set interrupt priority of Timer 0 is higher priority level.
0 PX0 1: To set interrupt priority of External interrupt 0 is higher priority level.
The register indicates NVM data memory address on On-Chip code
memory space.
The Timed Access register:
The Timed Access register controls the access to protected bits. To access
protected bits, the user must first write AAH to the TA. This must be immediately
followed by a write of 55H to TA. Now a window is opened in the protected bits
for three machine cycles, during which the user can write to these bits.
NVM CONTROL
Bit: 7 6 5 4 3 2 1 0
EER EWR - - - - - -
Mnemonic: NVMCON Address: CEh
BIT NAME FUNCTION
NVM page(n) erase bit:
0: Without erase NVM page(n).
1: Set this bit to erase page(n) of NVM. The NVM has 8 pages and each page
7 EER
have 16 bytes data memory. Initiate page select by programming NVMADDL
register, which will automaticly enable page area. When user set this bit, the
page erase process will begin and program counter will halt at this instruction.
After the erase process is completed, program counter will continue executing
next instruction.
NVM data write bit:
6 EWR
0: Without write NVM data.
1: Set this bit to write NVM bytes and program counter will halt at this instruction.
After write is finished, program counter will kept next instruction then executed.
5-0 - Reserved
NVM DATA
Bit: 7 6 5 4 3 2 1 0
NVMDAT
A.7
NVMDAT
A.6
NVMDAT
A.5
NVMDAT
A.4
NVMDAT
A3
NVMDAT
A.2
NVMDAT
A.1
NVMDAT
A.0
Mnemonic: NVMDATA Address: CFh
Publication Release Date: July 11, 2008
- 27 - Revision A2
Preliminary W79E8213/W79E8213R Data Sheet
BIT NAME FUNCTION
7~0 NVMDATA.[7:0]The NVM data write register. The read NVM data is by MOVC instruction.
PROGRAM STATUS WORD
Bit: 7 6 5 4 3 2 1 0
CY AC F0 RS1 RS0 OV F1 P
Mnemonic: PSW Address: D0h
BIT NAME FUNCTION
Carry flag:
7 CY
Set for an arithmetic operation which results in a carry being generated from the
ALU. It is also used as the accumulator for the bit operations.