• Single Package Fully-integrated 4-bit Microcontroller with RF Transmitter
• Low Power Consumption in Sleep Mode (< 1 µA Typically)
• Flash Controller for Application Program Available
• Maximum Output Power (10 dBm) with Low Supply Current (9.5 mA Typically)
• 2.0 V to 4.0 V Operation Voltage for Single Li-cell Power Supply
• -40°C to +125°C Operation Temperature
• SSO24 Package
• About Seven External Components
Microcontroller
with UHF
Description
The T48C862-R8 is a single package dual-chip circuit. It combines a UHF ASK/FSK
transmitter with a 4-bit mi crocontr oller. It suppor ts highly i ntegrated sol utions in car
access and tire pressure monitoring applications, as well as manifold applications in
the industrial and consumer segment. It is available for the frequency range of
429 MHz to 439 MHz with data rates up to 32 kbaud.
For further frequency ranges 310 MHz to 330 MHz and 868 MHz to 928 MHz separate
data sheets are available.
The device contains a flash microcontroller.
Figure 1. Application Diagram
T48C862
Antenna
UHF ASK/FSK
Receiver
Micro-
controller
Keys
Micro-
controller
PLL-
Transmitter
ASK/FSK
Transmitter
T48C862-R8
Preliminary
Rev. 4590B–4BMCU–02/03
1
Pin Configuration
Figure 2. Pinning SSO24
XTAL
VS
GND
ENABLE
NRESET
BP63/T3I
BP20/NTE
BP23
BP41/T2I/VMI
BP42/T2O
BP43/SD/INT3
VSS
1
2
3
4
5
6
7
8
9
10
11
12
ANT1
24
ANT2
23
PA_ENABLE
22
CLK
21
BP60/T3O
20
OSC2
19
OSC1
18
BP50/INT6
17
BP52/INT1
16
BP53/INT1
15
BP40/SC/INT3
14
VDD
13
Pin Description: RF Part
PinSymbolFunctionConfiguration
1XTALConnection for crystal
1.5k
XTAL
182 mA
VS
VS
1.2k
2VSSupply voltageESD protection circuitry (see Figure 8)
3GNDGroundESD protection circuitry (see Figure 8)
4ENABLEEnable input
ENABLE
200k
2
T48C862-R8
4590B–4BMCU–02/03
Pin Description: RF Part
PinSymbolFunctionConfiguration
21CLKClock output signal for microcontroller
The clock output fre quency is set by the
crystal to f
XTAL
/4
T48C862-R8
VS
100
100
22PA_ENABLESwitches on power amplifier, used for
PA_ENABLE
50k
ASK modulation
20 µA
23
24
ANT2
ANT1
Emitter of antenna output stage
Open collector antenna output
Pin Description: Microcontroller Part
NameTypeFunctionAlternate FunctionPin No.
V
DD
V
SS
BP20I/OBi-directional I/O line of Port 2.0NTE-test mode enable, see also section "Master Reset"7
BP40I/OBi-directional I/O line of Port 4.0SC-serial clock or INT3 external interrupt input14
BP41I/OBi-directional I/O line of Port 4.1
BP42I/OBi-directional I/O line of Port 4.2T2O Timer 2 output10
BP43I/OBi-directional I/O line of Port 4.3S D ser ial data I/O or INT3-external interrupt input11
BP50I/OBi-directional I/O line of Port 5.0I NT 6 external interrupt input17
BP52I/OBi-directional I/O line of Port 5.2I NT 1 external interrupt input16
BP53I/OBi-directional I/O line of Port 5.3I NT 1 external interrupt input15
BP60I/OBi-directional I/O line of Port 6.0T3O Timer 3 output20
BP63I/OBi-directional I/O line of Port 6.3T3I Timer 3 input6
OSC1IOscillator input
OSC2OOscillator output
NRESETI/OBi-directional reset pin–5
–Supply voltage–13
–Circuit ground–12
VMI voltage monitor input or T2I external clock input
Timer 2
4-MHz crystal input or 32-kHz crystal input or external
clock input or external trimming resistor input
4-MHz crystal output or 32-kHz crystal output or external
clock input
CLK
ANT1
ANT2
9
18
19
Uref=1.1V
Reset State
NA
NA
Input
Input
Input
Input
Input
Input
Input
Input
Input
Input
Input
Input
I/O
4590B–4BMCU–02/03
3
UHF ASK/FSK Transmitter Block
Features
• Integrated PLL Loop Filter
• ESD Protection also at ANT1/ANT2
(4 kV HBM/200 V MM, Except Pin 2: 4 kV HBM/100 V MM)
• High Output Power (5.5 dBm) with Low Supply Current (8.5 mA)
• Modulation Scheme ASK/FSK
– FSK Modulation is Achieved by Connecting an Additional Capacitor between the XTAL Load Capacitor and the Open-
drain Output of the Modulating Microcontroller
• Easy to Design-in Due to Excellent Isolation of the PLL from the PA and Power Supply
• Single Li-cell for Power Supply
• Supply Voltage 2.0 V to 4.0 V in the Temperature Range of -4 0°C to 85°C/125°C
• Package TSSOP8L
• Single-ended Antenna Output with High Efficient Power Amplifier
• CLK Output for Clocking the Microcontroller
• One-chip Solution with Minimum External Circuitry
• 125°C Operation for Tire Pressure Systems
Description
The PLL transmitter block has been developed for the demands of RF low-cost transmission systems, at data rates up to
32 kbaud. The transmitting frequency range is 868 MHz to 928 MHz. It can be used in both FSK and ASK systems.
4
T48C862-R8
4590B–4BMCU–02/03
Figure 3. Block Diagram
T48C862-R8
T48C862
CLK
PA_ENABLE
ANT2
ANT1
OSC2
OSC1
V
DD
V
SS
NRESET
BP20/NTE
BP23
BP10
BP13
BP21
BP22
Brown-out protect.
RESET
Voltage moni tor
External input
VMI
Port 1
n
o
i
t
c
2
e
t
r
r
i
o
d
P
a
t
a
D
f
4
PA
RC
oscillators
EEPROM
4 K x 8 bit
4-bit CPU core
Power up /
down
f
32
PFD
CP
LF
VCO
PLL
Crystal
oscillators
Clock management
clock input
RAM
256 x 4 bit
I/O bus
External
XTO
UTCM
Timer 1
interval- and
watchdog timer
Timer 2
8/12-bit timer
with modulator
SSI
Serial int erface
Timer 3
8-bit
timer / counter
with modulator
and demodulat or
ENABLE
VS
GND
XTAL
µC
T2I
T2O
SD
SC
T3O
T3I
4590B–4BMCU–02/03
Data direction +
alternate fu nction
Port 4
BP40
BP41
INT3
VMI
SC
T2I
BP42
T2O
BP43
INT3
SD
Data direction +
interrupt control
Port 5
BP51
INT6
BP52
BP50
INT1
INT6
BP53
INT1
Data direction +
alternate function
Port 6
BP60
T3O
BP63
T3I
EEPROM
2 x 32 x 16 bit
5
General Desc riptionThe fully-integrated PLL transmitter that allows particularly simple, low-cost RF minia-
ture transmitters to be assembled. The VCO is locked to 64 ´ f
13.5672 MHz crystal is needed for a 868.3 MHz transmitter and a 14.2969 MHz crystal
for a 915 MHz transmitter. All other PLL and VCO peripheral elements are integrated.
The XTO is a series res onance oscillator so that only one capac itor together with a
crystal connected in series to GND are needed as external elements.
The crystal oscillator together with the PLL needs typically < 1 ms until the PLL is locked
and the CLK output is st able. A wait ti me of ³ 4 ms must be used until the CLK is use d
for the microcontroller and the PA is switched on.
The power amplifier is an open-collector output delivering a current pulse which is nearly
independent from t he load imped ance. The del ivered ou tput power is controlle d via the
connected load impedance.
This output configuration enables a simple matching to any kind of antenna or to 50 W. A
high power efficiency of h =P
868.3 M Hz r esults when a n opti mized load imp edanc e of Z
at 3 V supply voltage.
out
/(I
´ VS ) of 24% for the power amplifier at
S,PA
= (166 + j226) W is used
Load
XTAL
, thus, a
Functional
Description
If ENABLE = L and PA_ENABLE = L, the circuit is in standby mode consuming only a
very small amount of current, so that a lithium cell used as power supply can work for
several years.
With ENABLE = H, the XTO, PLL and the CLK driver are switched on. If PA_ENABLE
remains L, only the PLL and the XT O are r unn ing and the CLK si gn al is del iver ed to the
microcontroller. The VCO locks to 64 times the XTO frequency.
With ENABLE = H and PA_ENABLE = H, the PLL, XTO, CLK driver and the power
amplifier are on. With PA_ENABLE, the power amplifier can be switched on and off,
which is used to perform the ASK modulation.
ASK TransmissionThe PLL transmit ter bl oc k is a ct iv ated by ENA BL E = H. PA_ENABLE m us t r em ain L for
t ³ 4 ms, then the CLK signal can be taken to clock the microcontroller and the output
power can be modulated by means of pin PA_ENABLE. After transmission,
PA_ENABLE is switched to L and the microcontroller switches back to internal clocking.
The T48C862-R8 is switched back to standby mode with ENABLE = L.
FSK TransmissionThe PL L t ra ns mit ter bl ock is a ct iv ated by ENA BLE = H. PA_ENAB LE m us t r em ain L for
t ³ 4 ms, then the CLK signal can be taken to c lock the microcontroller and the power
amplifier is sw itch ed on with PA_ENA BLE = H. The chip is then re ady f or F SK mo dulation. The microcontroller starts to switch on and off the capacitor between the XTAL load
capacitor and GND with an open-drain output port, thus changing the reference frequency of the PLL. If the switch is closed, the output frequency is lower than if the switch
is open. After tra nsmission PA_E NABLE is switch ed to L and the micro controller
switches back to internal clockin g. The PLL transm itter block is switc hed back to
standby mode with ENABLE = L.
The accuracy of the freq uency dev ia tio n with XT A L pulli ng me tho d is abo ut ±25% when
the following tolerances are considered.
6
T48C862-R8
4590B–4BMCU–02/03
Figure 4. Tolerances of Frequency Modulation
~
V
S
C
XTAL
~
Stray1
CMLMR
Crystal equivalent circuit
C
0
T48C862-R8
C
Stray2
S
C
4
C
5
C
Switch
Using C
capacitances on each side of the crystal of C
capacitance of the crystal of C
=9.2pF ±2%, C5= 6.8 pF ±5%, a switch port with C
4
= 3.2 pF ±10% and a crystal with CM= 13 fF ±10%, an
0
Stray1=CStray2
= 3 pF ±10% , s tray
Switch
= 1 pF ±1 0%, a paralle l
FSK deviation of ± 21 kHz typical wit h worst cas e tolera nces of ±16 .3 kHz to ±28.8 kHz
results.
CLK OutputAn output CLK signal is provided for a connected microcontroller. The delivered signal is
CMOS compatible if the load capacitance is lower than 10 pF.
Clock Pulse Take OverThe clock of the crystal oscillator can be used for clocking the microcontroller. Atmel’s
M4xCx9x has the special feature of starting with an integrated RC-oscillator to switch on
the PLL transmitter block with ENABLE = H, and after 4 ms to assume the clock signal
of the transmission IC, so the message can be sent with crystal accuracy.
Output Matching and Power
Setting
The output power is set by the l oad impe dance o f the ante nna. Th e maximum output
power is achieved with a load impedance of Z
There must be a low resistive path to V
to deliver the DC current.
S
Load,opt
= (166 + j226) W at 868.3 MHz.
The delivered current pulse of the power amplifier is 7.7 mA and the maximum output
power is delivered to a resistive load of 475 W if the 0.53 pF output capacitance of the
power amplifier is compensated by the load impedance.
An optimum load impedance of:
Z
=475W ||j/(2 ´p´f ´ 0.53 pF) = (166 + j226) W thus results for the maximum out-
Load
put power of 5.5 dBm.
4590B–4BMCU–02/03
The load impedance is def ine d as th e im ped anc e s ee n from the PL L tr ans m itte r blo ck’s
ANT1, ANT2 into the ma tching network . Do not confus e this la rge si gnal load impedance with a small signal input impedance delivered as input characteristic of RF
amplifiers and me asured fr om the appl icatio n into the IC i nstead of from the IC into th e
application for a power amplifier.
Less output power is achieved by lowering the real parallel part of 475 W where the
parallel imaginary part should be kept constant.
Output power measurement can be done with the cir cuit shown in Figure 5. Note that
the component values must be changed to compensate the individual board parasitics
until the PLL transmi tter bloc k has the right l oad im pedance Z
= (166 + j226) W at
Load,opt
868.3 MHz. Also the damping of the cable used to measure the output power must be
calibrated.
7
Figure 5. Output Power Measurement
V
S
C1 = 1n
= 33n
L
~
ANT1
Z
ANT2
~
1
C2 = 2.2p
Lopt
Z = 50 W
Power
meter
R
in
50 W
Application CircuitFor the supply-voltage blocking capacitor C
(see Figure 6 and Figure 7). C
amplifier where C
typically is 3. 9 pF/NP0 an d C2 is 1pF/NP0; for C2 two capacitors in
1
series should be us ed to achiev e a better tole rance val ue and to hav e the possi bility to
realize the Z
C
forms together with the pins of PLL transmitter block and the PCB board wires a
1
by using standard valued capacitors.
Load,opt
series resonance lo op that supp resses the 1
PCB is important. Norma lly the best su pressi on is achi eved whe n C
as possible to the pins ANT1 and ANT2.
The loop antenna should not exceed a width of 1.5 mm, otherwise the Q-factor of the
loop antenna is too high.
L
(»50 nH to 100 nH) can be printed on PCB. C4 should be selected so the XTO runs
1
on the load resonance fr equency of the crysta l. Normal ly, a valu e of 12 pF results for a
15 pF load-capacitance crystal.
and C2 are used to match the loop antenna to the power
1
, a value of 68 nF/X7R is recommended
3
st
harmonic, thus, the position of C1 on the
is placed as close
1
8
T48C862-R8
4590B–4BMCU–02/03
Figure 6. ASK Application Circuit
T48C862-R8
VS
C4
XTAL
VS
XTAL
VS
C3
GND
ENABLE
L1
241
ANT1
23
ANT2
22
PA_ENABLE
21
CLK
C1
Loop
Antenna
C2
PLL
VCO
LF
CP
PFD
32
PA
f
4
f
XTO
2
3
4
Power up/down
4590B–4BMCU–02/03
NRESET
BP63/T3I
BP20/NTE
BP23
BP41/T2I/VMI
BP42/T2O
BP43/SD/
INT3
VSS
10
11
12
5
6
7
8
9
BP60/T3O
20
OSC2
19
OSC1
18
BP50/INT6
17
BP52/INT1
16
BP53/INT1
15
BP40/SC/INT3
17
VDD
13
S1
S2
S3
VS
9
Figure 7. FSK Application Circuit
VS
C4
C5
XTAL
VS
XTAL
VS
C3
GND
ENABLE
L1
241
ANT1
23
ANT2
22
PA_ENABLE
21
CLK
C1
Loop
Antenna
C2
PLL
VCO
LF
CP
PFD
32
PA
f
4
f
XTO
2
3
4
Power up/down
10
NRESET
5
BP63/T3I
BP20/NTE
BP41/T2I/VMI
BP42/T2O
BP43/SD/
INT3
6
7
BP23
8
9
10
11
VSS
12
T48C862-R8
BP60/T3O
20
OSC2
19
OSC1
18
BP50/INT6
17
BP52/INT1
16
BP53/INT1
15
BP40/SC/INT3
17
VDD
13
S1
S2
S3
VS
4590B–4BMCU–02/03
Figure 8. ESD Protection Circuit
VS
T48C862-R8
ANT1
CLKPA_ENABLE
GND
ANT2
XTALENABLE
Absolute Maximum Ratings
ParametersSymbolMin.Max.Unit
Supply voltageV
Power dissipationP
Junction temperatureT
Storage temperatureT
Ambient temperatureT
tot
stg
amb
S
j
-55125°C
-55125°C
5V
100mW
150°C
Thermal Resistance
ParametersSymbolValueUnit
Junction ambientR
thJA
170K/W
Electrical Characteristics
VS = 2.0 V to 4.0 V, T
Typical values are given at V
ParametersTest ConditionsSymbolMin.Typ.Max.Unit
Supply currentPower down,
Supply currentPower up, PA off, V
Output powerV
Output power v ariation for the full
temperature range
4590B–4BMCU–02/03
= -40°C to 125°C unless otherwise specified.
amb
= 3.0 V and T
S
V
ENABLE
V
PA_ENABLE
V
PA_ENABLE
= 25°C. All parameters are refered to GND (Pin 7).
amb
< 0.25 V , -40°C to 85°C
< 0.25 V, -85°C to +125°C
< 0.25 V, 25°C
(100% correlation tested)
= 3 V
V
ENABLE
> 1.7 V, V
S
PA_ENABLE
<0.25V
Power up, VS= 3.0 V
ENABLE
= 3.0 V, T
S
> 1.7 V, V
amb
V
f = 868.3 MHz, Z
T
= -40°C to +85°C
amb
= 3.0 V
V
S
V
= 2.0 V
S
PA_ENABLE
=25°C
Load
>1.7V
= (166 + j226) W
I
S_Off
I
S
I
S_T r ansmit
P
Ref
DP
Ref
DP
Ref
350
7
<10
3.64.6mA
8.511mA
3.55.58dBm
-1.5
-4.0
nA
µA
nA
dB
dB
11
Electrical Characteristics (Continued)
VS = 2.0 V to 4.0 V, T
Typical values are given at V
= -40°C to 125°C unless otherwise specified.
amb
= 3.0 V and T
S
= 25°C. All parameters are refered to GND (Pin 7).
amb
ParametersTest ConditionsSymbolMin.Typ.Max.Unit
Output power v ariation for the full
temperature range
Achievable output-power rangeSelectable by load impedanceP
Spurious emissionf
T
= -40°C to +125°C
amb
V
= 3.0 V
S
= 2.0 V
V
S
= P
P
Out
CLK
Ref
= f0/128
+ DP
Ref
DP
DP
Out_typ
Ref
Ref
-2.0
-4.5
dB
dB
-3+5.5dBm
Load capacitance at Pin CLK = 10 pF
fO ± 1´ f
± 4 ´ f
f
O
CLK
CLK
-52
-52
dBc
dBc
other spurious are lower
Oscillator frequency XTO
(= phase comparator frequency)
= f0/32
f
XTO
= resonant frequency of the
f
XTAL
XTAL, C
£ 10 fF, load capacitance
M
selected accordingly
T
= -40°C to +85°C
amb
= -40°C to +125°C
T
amb
f
XTO
-30
-40
f
XTAL
+30
+40
ppm
ppm
PLL loop bandwidth250kHz
Phase noise of phase
comparator
Referred to f
25 kHz distance to carrier
PC
= f
XT0,
-116-110dBc/Hz
In loop phase noise PLL25 kHz distance to carrier-80-74dBc/Hz
Phase noise VCOat 1 MHz
at 36 MHz
Frequency range of VCOf
Clock output frequen cy (CMOS
microcontroller compatible)
Voltage swing at Pin CLKC
£ 10 pFV
Load
VCO
0h
V
868928MHz
VS´ 0.8
0l
-89
-120
/256MHz
f
0
V
-86
-117
´ 0.2
S
dBc/Hz
dBc/Hz
V
V
Series resonance R of the c rystalRs110W
Capaictive load at Pin XT07pF
FSK modulation frequency rateDuty cycle of the modulation signal =
50%
ASK modulation frequency rateDuty cycle of the modulation signal =
50%
ENABLE input Low level input voltage
High level input voltage
Input current high
PA_ENA BLE input Low level input voltage
High level input voltage
Input current high
V
Il
V
Ih
I
In
V
Il
V
Ih
I
In
032kHz
032kHz
0.25
1.7
20
0.25
1.7
5
V
V
mA
V
V
mA
12
T48C862-R8
4590B–4BMCU–02/03
Microcontroller Block
T48C862-R8
Features
• 4-Kbyte ROM, 256 x 4-bit RAM
• EEPROM Programmable Options
• Read Protection fo r the EEPROM Program Memory
• 16 Bi-directional I/Os
• Up to Seven External/Internal Interrupt Sources
• Eight Hardware and Software Interrupt Priorities
• Multifunction Timer/Counter
- IR Remote Control Carrier Generator
- Biphase-, Manchester- and Pulse-width Modulator and Demodulator
- Phase Control Function
• Programmable System Clock with Prescaler and Five Different Clock Sources
• Very Low Sleep Current (< 1 µA)
• 2 × 512-bit EEPROM Data Memory
• 256 × 4-bi t RAM Data Memory
• Synchronous Serial Interface (2-wire, 3-wire)
• Watchdog, POR and Brown-out Function
• Voltage Monitoring Inclusive Lo_BAT Detect
DescriptionThe microcontroller is designed with EEPROM cel ls so it can be progr ammed several
times. To offer full compatibility with each ROM version, the I/O configuration is stored
into a separate internal EEPROM block during programming. The configuration is downloaded to the I/Os with every power-on reset.
IntroductionThe microcontroller block is a member of Atmel’s family of 4-bit single-chip microcontrol-
lers. Instead of ROM it contains EEPRO M, RAM, parallel I/O ports, two 8-bit
programmable multifunction timer/counters, voltage supervisor, interval timer with
watchdog function an d a soph isticated on-chip c lock gene ration wi th integrat ed RC-,
32-kHz and 4-MHz crystal oscillators.
Differences between T48C862-R8 and ATAR862 Microconrtollers
Program MemoryThe program memory of the devices is realized as an EEPROM. The memory size for
user programs is 40 96 bytes. It is pro grammed as 258 ´ 16 bytes blocks of data. the
implement LOCK-bit function is user-selectable and protects the device from unauthorized read-out of the program memory.
Configuration MemoryAn additional area of 3 2 bytes of the EE PROM is u sed to s tore inform ation abou t the
hardware configuration. All the options that are selectable for the ROM versions are
available to the user. T his i nc lud es not o nly th e di fferen t port op tio ns but a lso th e pos s ibilities to select different capacitors for OSC1 and OSC2, the option to enable or disable
the hardlock for the watchdog, the option to select OSC2 instead of OSC1 as external
clock input and the option to enable the external clock monitor as a reset source.
Data MemoryThe microcontroller block contains an internal data EEPROM that is organized as two
pages of 32 ´ 16-bit. To be compatible with the ROM parts, the page used has to be
defined within the applic ati on softwar e by writi ng the 2- wir e in ter face c omm and "09 h" to
the EEPROM. This command has no effect for the microcontroller block, if it is left inside
the HEX-file for the ROM versio n. Also for c ompatibilit y reasons, th e access to the
EEPROM is handled via the MCL (serial interface) as in the corresponding ROM parts.
13
4590B–4BMCU–02/03
Reset FunctionDuring each reset (power-on or brown-out), the I/O configuration is deleted and
reloaded with the data from the configuration memory. This leads to a slightly different
behavior compare d to the ROM v ersions . Both devi ces switc h their I/O s to input dur ing
reset but the ROM part has the mask selected pull-up or pull-down resistors active while
the MTP has them removed until the download is finished.
Microcontroller
Architecture General
Description
The microcontroller consists of an advanced stack-based, 4-bit CPU core and on-chip
peripherals. The CPU is base d on the Harvard architec ture with physically separated
program memory (ROM) an d data memory (RAM ). Three independen t buses, the
instruction bus, the memory bus and the I/O bus, are used for parallel communication
between ROM, RAM and peripherals. This enhances program execution speed by
allowing both inst ructio n pre fetchi ng, and a si multan eous commu nicat ion to the on -chip
peripheral circuitry. The extremely powerful integr ated interrupt controller with associated eight prioritized interrupt levels supports fast and efficient processing of hardware
events. The mic rocontroller i s designed fo r the high-leve l programming language
qFORTH. The core inclu des both an expressio n and a return stac k. This architect ure
enables high-level language programming without any loss of efficiency or code density.
Figure 9. Microcontroller Core
MARC4 CORE
SP
RP
CCR
X
Y
RAM
256 x 4-bit
TOS
ALU
Reset
Clock
System
clock
Sleep
Reset
Program
memory
Instruction
bus
Instruction
decoder
Interrupt
controller
PC
Memory bus
I/O bus
On-chip peripheral modules
Components of
Microcontroller Core
The core contai ns ROM, RAM, ALU, prog ram cou nter, RAM ad dress r egiste rs, instr uction decoder and interrupt controller. The following sections describe each functional
block in more detail.
Program MemoryThe program memor y (EEPROM) is prog rammable with the c ustomer applicat ion
program during the fabrication of the microcontroller. The EEPROM is addressed by a
12-bit wide pr ogram counter , thus predefi ning a maximu m program ban k size of
4-Kbytes. The lowest user program memory address segment is taken up by a
512 bytes Zero page which contains predefined start addresses for interrupt service routines and special subroutines accessible with single byte instructions (SCALL).
14
T48C862-R8
4590B–4BMCU–02/03
T48C862-R8
The corresponding memory map is shown in Figur e 4. Look-up tab les of consta nts can
also be held in ROM and are accessed via the microcontrollers’ built-in table instruction.
Figure 10. ROM Map of the Microcontroller Block
1F8h
FFFh
7FFh
1FFh
000h
EEPROM
(4 K x 8 bit)
Zero page
1F0h
1E8h
1E0h
page
SCALL addresses
020h
018h
010h
008h
000h
1E0h
1C0h
180h
140h
100h
0C0h
080h
040h
008h
000h
INT7
INT6
INT5
INT4
INT3
INT2
INT1
INT0
$RESET
$AUTOSLEEP
RAMThe microcontroller block contains a 256 x 4-bit wide static random access memory
(RAM), which is used for the expression stack. The return stack and data memory are
used for variables and arrays. The RAM is addressed by any of the four 8-bit wide RAM
address registers SP, RP, X and Y.
Expression StackThe 4-bit wide expression stack is addressed with the expression stack pointer (SP). All
arithmetic, I/O and memory reference operations take their operands, and return their
results to the expression stack. The microcontroller performs the operations with the top
of stack items (TOS and TOS-1). The TOS register contains the top eleme nt of the
expression stack and works in the same way as an accumulator. This stack is also used
for passing parameters between subroutines and as a scratch pad area for temporary
storage of data.
Return StackThe 12-bit wide return stack is ad dr es se d by the re tu rn s tac k p oin ter ( RP ) . It i s us ed for
storing return ad dresses of subr outines, interrupt r outines and for keeping l oop index
counts. The return stack can also be used as a temporary storage area.
The microcontroller instruction set supports the exchange of data between the top elements of the expression stack and the return stack. The two stacks within the RAM have
a user definable location and maximum depth.
4590B–4BMCU–02/03
15
Figure 11. RAM Map
FCh
X
Y
RAM
(256 x 4-bit)
Autosleep
FFh
Global
variables
Expression stack
30
TOS
TOS-1
TOS-2
4-bit
SP
SP
RAM address register:
RP
04h
00h
TOS-1
Expression
stack
Return
stack
07h
03h
Global
v
variables
Return stack
011
RP
12-bit
RegistersThe microcontroll er ha s se ven p rogramm able regis ters a nd o ne co nditio n cod e reg ister
(see Figure 12).
Program Counter (PC)The program co unter is a 12-b it regis ter whic h conta ins th e addres s of the next in stru c-
tion to be fetched from the EEPROM. Instructions currently being executed are decoded
in the instruction decoder to determine the internal micro-operations. For linear code (no
calls or branches), the prog ram counte r is increm ented with every instructio n cycle. If a
branch-, call-, return-instruction or an interrupt is executed, the program counter is
loaded with a new address . The program co unter is also used with the tab le instruc tion
to fetch 8-bit wide EEPROM constants.
Figure 12. Programming Mode l
PC
11
RP
SP
X
Y
7
7
7
TOS
C
CCR
--
0
Program counter
0
00
Return stack pointer
0
Expression stack pointer
0
RAM address register (X)
07
RAM address register (Y)
03
Top of stack register
03
B
Condition code register
I
Interrupt enable
Branch
Reserved
Carry / borrow
16
T48C862-R8
4590B–4BMCU–02/03
T48C862-R8
RAM Address RegistersThe RAM is addressed with the four 8-bit wide RAM address registers: SP, RP, X and Y.
These registers allow access to any of the 256 RAM nibbles.
Expression Stack Pointer (SP)The stack poi nter conta ins the add ress of the next-to-t op 4-bit it em (TOS-1 ) of the
expression stack. The pointer is automatically pre-incremented if a nibble is moved onto
the stack or post-decremented if a nibble is removed from the stack. Every post -decrement operation moves the item (TOS-1) to the TOS register before the SP is
decremented. After a reset, the stack pointer has to be initialized with >SP S0 to allocate
the start address of the expression stack area.
Return Stack Pointer (RP)The return stack pointer points to the top ele ment of the 12-bit wide return stack . The
pointer automatically pre-increments if an element is moved onto the stack, or it postdecrements if an element is removed from the stack. The return stack pointer increments and decrements in steps of 4. This means that every time a 12-bit element is
stacked, a 4-bit RAM location is left unwritten. This location is used by the qFORTH
compiler to allocate 4-bit variables. After a reset the return stack pointer has to be initialized via >RP FCh.
RAM Address Registers
(X and Y)
Top of Stack (TOS)The top of stack register is the ac cumulator of the microcontroller block. All arith-
Condition Code Register
(CCR)
Carry/Borrow (C)The car ry /bor row flag indicates that the bor rowi ng o r c arr ying out of arithmetic logic unit
Branch (B)The branch flag co ntrol s the con di tio nal progr a m br an ch ing . S hou ld the br anc h flag has
Interrupt Enable (I)The interrupt enable flag globally enables or disables the triggering of all interrupt rou-
The X and Y registers are used to add ress any 4-bit item in the RAM. A fetch ope ratio n
moves the addressed nibble onto the TOS. A store operation moves the TOS to the
addressed RAM location. By using either the pre-increment or post-decrement addressing mode arrays in the RAM can be compared, filled or moved.
metic/logic, memo ry refere nce and I /O opera tions us e this r egister. T he TOS register
receives data from the ALU, EEPROM, RAM or I/O bus.
The 4-bit wide condition code register contains the branch, the carry and the interrupt
enable flag. The se bits ind icate the curren t stat e of the CPU . The CCR flags are se t or
reset by ALU oper ations. The i nstructions SET_BCF, T OG_BF, CCR! and DI allow
direct manipulation of the condition code register.
(ALU) occurred during the last arithmetic operation. During shift and rotate operations,
this bit is used as a fifth bit. Boolean operations have no effect on the C-flag.
been set by a previous instruction, a conditional branch will cause a jump. This flag is
affected by arithmetic, logic, shift, and rotate operations.
tines with the excepti on of the no n-maska ble rese t. After a rese t or while ex ecuting th e
DI instruction, the interrupt enable flag is reset, thus disabling all interrupts. The core will
not accept any further interrupt requests until the interrupt enable flag has been set
again by either executing an EI or SLEEP instruction.
4590B–4BMCU–02/03
17
ALUThe 4-bit ALU performs all the arithmetic, logical, shift and rotate operations with the top
two elements of the expression stack (TOS and TOS-1) and returns the result to the
TOS. The ALU operations affects the carry/borrow and branch flag in the condition code
register (CCR).
Figure 13. ALU Zero-address Operations
RAM
SP
TOS-1
TOS-2
TOS-3
TOS-4
TOS
ALU
CCR
I/O BusThe I/O ports and the registers of the peripheral modules are I/O mapped. All communi-
cation between the c ore a nd th e on -chip per ipher als ta ke place via th e I/O bu s a nd th e
associated I/O control. With the microcontroller IN and OUT instructions, the I/O bus
allows a direct read or wr it e ac ces s to o ne o f th e 16 pr im ar y I/O ad dr es se s. Mor e abo ut
the I/O access to the on -chip perip herals is described in the sec tion “Perip heral Modules”. The I/O bus is interna l and is not accessible by the customer on the final
microcontroller device, but it is used as the interface for the mic rocontroller emulation
(see also the section“”Emulation”).
Instruction SetThe microcontroller instruction set is optimized for the high level programming language
qFORTH. Many microc ontroll er instr uctions are qFO RTH wo rds. Th is ena bles th e compiler to generate a fast and compact program code. The CPU has an instruction pipeline
allowing the controlle r to prefetc h an inst ructio n from EE PROM at the sam e time as the
present instruction is being e xecuted. The microc ontroller is a zer o-address machine,
the instructions contain only the operation to be performed and no source or destination
address fields. The operations are implicitly performed on the data placed on the stack.
There are one- and two- byte instructio ns which are exec uted within 1 to 4 machine
cycles. A microcontroller machine cycle is made up of two system clock
cycles (SYSCL). Most of the instructions are only one byte long and are executed in a
single machine cycle. For more info rm ation re fer to the “MARC4 Pro grammer’s Guide”.
Interrupt StructureThe microcontroller can handle interrupts with eight different priority levels. They can be
generated from the internal and external inter rupt sources or by a software interrupt
from the CPU itself. Each interrupt level has a hard-wired priority and an associated vector for the service routine in the EEPROM (see Table 1). The programmer can postpone
the processing of interrupts by resetting the interrupt enable flag (I) in the CCR. An interrupt occurrence will still be registered, but the interrupt routine only started after the
I-flag is set. All interrupts can be masked, and the priority individually software configured by programming the appropriate control register of the interrupting module (see
section “Peripheral Modules”).
18
T48C862-R8
4590B–4BMCU–02/03
T48C862-R8
Interrupt ProcessingFor processing the eight interrupt levels, the microcontroller includes an interrupt con-
troller with two 8-bit wide interrupt pending and interrupt active registers. The interrupt
controller samples all interrupt requests during every non-I/O instruction cycle and
latches these in the in terrupt pe nding regi ster. If no hi gher pri ority int errupt is present in
the interrupt active register, it signals the CPU to interrupt the current program execution. If the interrupt enable bit is set, the processor enters an interrupt acknowledge
cycle. During this cycle a short call (SCALL) instruction to the service routine is executed and the curr ent PC is sa ved on the re turn stack . An interru pt service routine is
completed with the RTI i nstru ction . This in st ruction , rese ts the c orres pondin g bits i n the
interrupt pending/a ctive regis ter and f etches the ret urn a ddress from the retur n st ack to
the program counter. Whe n the interrupt ena ble flag is rese t (triggering of in terrupt routines is disabled), th e executi on of new int errupt ser vice r outine s is inh ibited but n ot the
logging of the interrupt requests in the interrupt pending register. The execution of the
interrupt is delayed until the inte rrupt enable flag is set again. Note that interrupts are
only lost if an interrupt request occurs while the corresponding bit in the pending register
is still set (i.e., the interrupt service routine is not yet finished).
It should be noted that automatic stacking of the RBR is not carried out by the hardware
and so if ROM banking is used, the RBR must be stacked on the expression stack by
the application program and res tored before the RTI. After a mast er reset (power-o n,
brown-out or watchdog reset), the interru pt enable flag and the inter rupt pending and
interrupt active register are all reset.
Interrupt LatencyThe interrupt latency is the time from the occurrence of the interrupt to the interrupt
service routine being activated. This is extremely short (taking between 3 to 5 machine
cycles depending on the state of the core).
Figure 14. Interrupt Handling
INT7
7
6
5
4
3
Priority level
2
1
0
Main /
Autosleep
INT5
INT5 active
INT3
INT3 active
INT7 active
RTI
INT2
RTI
INT2 pending
SWI0
INT2 active
INT0 pending
RTI
RTI
INT0 active
RTI
Main /
Autosleep
4590B–4BMCU–02/03
Time
19
Table 1. Interrupt Priority
InterruptPriorityROM Addr essInterrupt Opcode Function
External hardware interrupt, any edge at BP52 or
BP53
SSI interrupt or ex te rnal hardw are in terrupt at B P 40
or BP43
External hardware interrupt, at an y edge at BP5 0 or
BP51
Table 2. Hardware Interrupts
Interrupt Mask
Interrupt
INT1P5CR
INT2T1MT1IMTimer 1
INT3SISCSIMSSI buffer full/empty or BP40/BP43 interrupt
INT4T2CMT2IMTimer 2 compare match/overflow
T3CM1
INT5
INT6P5CR
INT7VCMVIMExternal/internal voltag e mon itoring
T3CM2
T3C
P52M1, P52M2
P53M1, P53M2
T3IM1
T3IM2
T3EIM
P50M1, P50M2
P51M1, P51M2
Interrupt SourceRegisterBit
Any edge at BP52
any edge at BP53
Timer 3 compare register 1 match
Timer 3 compare register 2 match
Timer 3 edge event occurs (T3I)
Any edge at BP50,
any edge at BP51
Software InterruptsThe programmer ca n generate interrupts by using the software interrupt ins truction
(SWI), which is supporte d in qFO RTH by pre defined m acros na med SW I0...SW I7. Th e
software triggered inte rrupt operates exactly like any hardw are triggered interrupt. The
SWI instruction takes the top two elements from the expression stack and writes the corresponding bits via the I/O bus to th e i nter rup t pending register. T heref or e, by us in g th e
SWI instruction, interrupts can be re-prioritized or lower priority processes scheduled for
later execution.
Hardware InterruptsIn the microcontroller block, there are eleven hardware interrupt s ources with seven
different levels. Each source can be masked individually by mask bits in the corresponding control registers. An overview of the possible h ardware configurations is shown in
Table 3.
20
T48C862-R8
4590B–4BMCU–02/03
T48C862-R8
Master ResetThe master reset forces the CPU into a well-defined condition. It is unmaskable and is
activated independent of the current program state. It can be triggered by either initial
supply power-up, a short collapse of the power supply, brown-out detection circuitry,
watchdog time-out, or an external input clock supervisor stage (see Figure 15). A master
reset activation will rese t the i nterr upt enab le fl ag, the in ter rupt pe ndi ng r egis ter and th e
interrupt active regi ster. Durin g the power- on reset pha se, the I/O bus contr ol signals
are set to reset m ode, th ereby , init ializi ng al l on- chip periphe rals . All b i-di rection al por ts
are set to input mode.
Attention: During any reset phase, the BP20/NTE input is driven towards V
additional internal strong pull-up transistor. This pin must not be pulled down to V
by an
DD
SS
dur-
ing reset by any external circuitry representing a resistor of less than 150 kW.
Releasing the reset res ults in a sh ort call inst ructi on (opc ode C1h) to the R OM add ress
008h. This activates the initializ ation routine $RESET which in turn has to initia lize all
necessary RAM variables, stack pointers and peripheral configuration registers (see
Table 6).
Figure 15. Reset Configuration
V
DD
Pull-up
CL
NRST
Reset
timer
res
CL=SYSCL/4
Power-on
reset
Brown-out
detection
Internal
reset
V
DD
V
SS
V
DD
V
SS
Po we r-on Reset and
Brown-out Detection
4590B–4BMCU–02/03
Watch-
dog
Ext. clock
supervisor
res
CWD
ExIn
The microcontrolle r bloc k has a ful ly in tegr ate d po wer -on r eset an d br own -o ut de tect io n
circuitry. For reset generation no external components are needed.
These circuits ensure that the core is held in the reset state until the minimum operating
supply voltage has been reached. A reset condition will also be generated should the
supply voltage drop momentarily below the minimum operating l evel except when a
power-down mode is activated (the core is in SLEEP mode and the peripheral clock is
stopped). In this power-down mode the brown-out detection is disabled.
Two values for the brown-out voltage threshold are programmable via the BOT-bit in the
SC-register.
21
A power-on reset pulse i s generat ed by a VDD rise across the default BOT voltage level
(1.7 V). A brown-out reset pulse is generated when V
falls below the br own-o ut volt -
DD
age threshold. T wo values for t he brown-o ut volt age thres hold are programma ble via
the BOT-bit in the SC-register. When the controller runs in the upper supply voltage
range with a high system clock fr equency, the high threshold must be used. When it
runs with a lower system c lock freq uency , the lo w thresho ld and a wider su pply v oltag e
range may be chosen. F or further details , see the e lectrical speci fication and the SCregister description for BOT programming.
Figure 16. Brown-out Detection
V
DD
2.0 V
1.7 V
t
CPU
Reset
CPU
Reset
BOT = '1'
BOT = '0'
d
t
d
t
t
d
td= 1.5 ms (typically)
BOT = 1, low brown-out voltage threshold 1.7 V (is reset value).
BOT = 0, high brown-out voltage threshold 2.0 V.
Watchdog ResetThe watchdog’s function can be enabled at the WDC-register and triggers a reset with
every watchdog counter overflow. To suppress the watchdog reset, the watchdog
counter must be regularly reset by reading the watchdog register address (CWD). The
CPU reacts in exactly the same manner as a reset stimulus from any of the above
sources.
External Clock SupervisorThe external input clock su per v isor func tion c an be enab led if the ex te rn al inpu t cl oc k is
selected within the CM- and SC-reg isters of the clock module . Th e CPU reacts in
exactly the same manner as a reset stimulus from any of the above sources.
Voltage MonitorThe voltage monitor consists of a comparator with internal voltage reference. It is used
to supervise the supply voltage or an external voltage at the VMI-pin. The comparator
for the supply voltage has three internal programmable thresholds one lower threshold
(2.2 V), one middle threshold (2.6 V) and one higher threshold (3.0 V). For external voltages at the VMI-pin, the comparator threshold is set to V
indicates if the supervised voltage is below (VMS = 0) or above (VMS = 1) this threshold. An interrupt can be g enerated wh en the V MS-b it is set or res et to de tect a risin g or
falling slope. A voltage monitor interrupt (INT7) is enabled when the interrupt mask bit
(VIM) is reset in the VMC-register.
= 1.3 V. The VMS-bit
BG
22
T48C862-R8
4590B–4BMCU–02/03
Figure 17. Voltage Monitor
BP41/
VMI
VMC :
Voltage monitor
IN
VM2
VM1 VM0 VIM
T48C862-R8
V
DD
OUT
INT7
Voltage Monitor
Control/Status Register
VMST :
- - res
VMS
Primary register address: "F"hex
Bit 3Bit 2Bit 1Bit 0
VMC: WriteVM2VM1VM0VIMReset value: 1111b
VMST: R ead––reservedVMSReset value: xx11b
VM2:Voltage monitor Mode bit 2
VM1:Voltage monitor Mode bit 1
VM0:Voltage monitor Mode bit 0
VIM = 0, voltage monitor interrupt is enabled
VIM = 1, voltage monitor interrupt is disabled
VMSVoltage Monitor Status bit
VMS = 0, the voltage at the comparator input is below V
VMS = 1, the voltage at the comparator input is above V
Ref
Ref
23
Figure 18. Internal Supply Voltage Supervisor
Low threshold
VMS = 1
V
DD
3.0 V
2.6 V
2.2 V
Middle threshold
High threshold
Low threshold
Middle threshold
High threshold
VMS = 0
Figure 19. External Input Voltage Supervisor
VMI
Negative slope
VMS = 1
1.3 V
VMS = 0
Positive slope
Internal reference level
Interrupt positive slope
VMS = 1
VMS = 0
Interrupt negative slope
t
Clock Generation
Clock ModuleThe T48C862-R8 contains a clock module with 4 different internal oscillator types: two
RC-oscillators, one 4-MHz crystal oscillator and one 32-kHz crystal oscillator. The pins
OSC1 and OSC2 are the inter face to co nnect a crys tal eith er to the 4-M Hz, or to the
32-kHz crystal oscillator. OSC1 can be used as input for external clocks or to connect an
external trimming resistor for the RC-oscillator 2. All necessary circuitry, except the crystal and the trimming resistor, is integrated on-chip. One of these oscillator types or an
external input clock can be selected to generate the system clock (SYSCL).
24
T48C862-R8
In applications that do not r equire exact timing, it is possible to use the fully integrated
RC-oscillator 1 without any external components. The RC-oscillator 1 center frequency
tolerance is better than ± 50%. The RC-oscillator 2 is a trimmable oscillator whereby the
oscillator frequency can be trimmed with an external resistor attached between OSC1
and V
. In this configuration, the RC-oscillator 2 frequency can be maintained stable
DD
with a tolerance of ± 15% over the full operating temperature and voltage range.
The clock module is programmable via software with the clock management register
(CM) and the system configuration register (SC). The requir ed oscillator c onfiguration
can be selected with the OS1-bit and the OS0-bit in the SC-register. A programmable
4-bit divider stage allows the adjustment of the system clock speed. A special feature of
the clock management is that an external oscillator may be used and switched on and
off via a port pin for the power-down mode. Before the external clock is switched off, the
internal RC-oscillator 1 must be s elected with the CCS-bit and then the SLEE P mode
may be activated. In this state an interrupt can wake up the controller with the RC-oscillator, and the external oscillator can be activated and selected by software. A
synchronization stage avoids too short clock periods if the clock source or the clock
speed is changed. If an external input clock is selected, a supervisor circuit monitors the
external input and gen er ate s a har dwa re reset if the external cl ock s ou rc e f ail s or dr ops
below 500 kHz for more than 1 ms.
Oscillator Circuits and
External Clock Input
Stage
RC-oscillator 1
Fully Integrated
The clock module generates two output clocks. One is the system clock (SYSCL) and
the other the periphery (SUBCL). The SYSCL can supply the core and the peripherals
and the SUBCL can supply only the peripherals with cloc ks. The modes for clock
sources are programmable with the OS1-bit and OS0-bit in the SC-register and the
CCS-bit in the CM-regi ste r.
The microcontroller block se ries consi sts of fou r different in ternal os cillators: t wo RCoscillators, one 4-MHz crystal oscillator, one 32-kHz crystal oscillator and one external
clock input stage.
For timing insensitive applications, it is possible to use the fully integrated RC
oscillator 1. It operates without any external components and saves additional costs.
The RC-oscillator 1 center frequency tolerance is better than ±50% over the full temperature and voltage r ange. The basic center fr equency of the RC-oscilla tor 1 is
f
» 3.8 MHz. The RC oscillator 1 is selected by default after power-on reset.
O
4590B–4BMCU–02/03
25
Figure 21. RC-oscillator 1
RC
oscillator 1
RcOut1
Stop
Control
RcOut1
Osc-Stop
External Input ClockThe OSC1 or OSC2 (mask option) can be driven by an external clock source provided it
meets the specified duty cycle, rise and fall times and input level s. Additionally, the
external clock stage conta ins a superv isory circuit for the input clock . The supervi sor
function is controlled via the OS1, OS0-bit in the SC-register and the CCS-bit in the CMregister. If the external input clock is missing for more than 1 ms and CCS = 0 is set in
the CM-register, the supervisory circuit generates a hardware reset.
Figure 22. External Input Clock
RC-oscillator 2 with External
Trimming Resistor
Ext.
Clock
or
Ext.
Clock
OSC1
OSC2
Ext. input clock
ExOut
ExIn
Stop
Clock monitor
RcOut1
Osc-Stop
CCS
Res
OS1OS0CCSSupervisor Reset Output (Res)
110Enable
111Disable
x0xDisable
The RC-oscillator 2 is a high resolution trimmable oscillator whereby the oscillator frequency can be tri mmed with an exte rnal resistor betw een OSC1 and V
. In this
DD
configuration, the RC-oscillator 2 frequency can be maintained stable with a tolerance of
±10% over the full operating temperature and a voltage range V
from 2.5 V to 6.0 V.
DD
For example:
An output frequency at the RC-oscill ator 2 of 2 MHz can be obtai ned by connecting a
resistor R
= 360 kW (see Figure 23).
ext
26
T48C862-R8
4590B–4BMCU–02/03
T48C862-R8
Figure 23. RC-oscillator 2
V
DD
R
ext
OSC1
OSC2
4-MHz OscillatorThe microcontroller block 4-MHz oscillato r options need a crystal or ceramic r esonator
connected to the OSC1 and OSC2 pins to establish oscillation. All the necessary oscillator circuitry is integrated, except the actual crystal, resonator, C3 and C4.
4-MHz Crystal Oscillator
RC
oscillator 2
R
Trim
RcOut2
Stop
RcOut2
Osc-Stop
OSC1
XTAL
4 MHz
OSC2
*
Configurable
Figure 24. Ceramic Resonator
C3
OSC1
OSC2
C4
*
Configurable
Cer.
Res
*
C1
*
C2
*
C1
*
C2
Oscin
4-MHz
oscillator
Oscout
Oscin
oscillator
Oscout
4-MHz
4Out
Stop
4Out
Stop
4Out
Osc-Stop
4Out
Osc-Stop
32-kHz OscillatorSome appli catio ns requ ire long- term tim e kee ping o r lo w res olution t iming . In thi s c ase,
an on-chip, low power 32-kHz cr ystal oscillator can be use d to generate both the
SUBCL and the SYSCL. In this mode, power consumption is greatly reduced. Th e
32-kHz crystal oscillator can not be stopped while the power-down mode is in operation.
27
4590B–4BMCU–02/03
Figure 25. 32-kHz Crystal Oscillator
OSC1
XTAL
32 kHz
OSC2
*
Configurable
*
C1
*
C2
Oscin
32-kHz
oscillator
Oscout
32Out
32Out
Clock ManagementThe clock management register controls the system clock divider and synchronization
stage. Writing to this register triggers the synchronization cycle.
Clock Management Register
(CM)
Bit 3Bit 2Bit 1Bit 0
CM:NSTOPCCSCSS1CSS0Reset value: 1111b
Auxiliary register address: "3"hex
NSTOPNot STOP peripheral clock
NSTOP = 0, stops the peripheral clock while the core is in SLEEP mode
NSTOP = 1, enables the peripheral clock while the core is in SLEEP mode
CCSCore Clock Select
CCS = 1, the internal RC-oscillator 1 generates SYSCL
CCS = 0, the 4-MHz crystal oscillator, the 32-kHz crystal oscillator, an external
clock source or the internal RC-oscillator 2 with the external resistor at OSC1
generates SYSCL dependent on the setting of OS0 and OS1 in the system
configuration register
CSS1Core Speed Select 1
CSS0Core Speed Select 0
CSS1CSS0DividerNote
0016
118Reset value
104
012
28
T48C862-R8
4590B–4BMCU–02/03
T48C862-R8
System Configuration
Register (SC)
Primary register address: "3"hex
Bit 3Bit 2Bit 1Bit 0
SC: writeBOT---OS1OS0Reset value: 1x11b
BOTBrown-Out Threshold
BOT = 1, low brown-out voltage threshold (1.7 V)
BOT = 0, high brown-out voltage threshold (2.0 V)
OS1Oscillator Select 1
OS0Oscillator Select 0
ModeOS1OS0Input for SUBCLSelecte d Oscillators
111C
201C
310C
40032 kHz
Note:If the bit CCS = 0 in the CM-register the RC-oscillator 1 always stops.
16RC-oscillator 1 and external input clock
in/
/16RC-oscillator 1 and RC-oscillator 2
in
/16RC-oscillator 1 and 4-MHz crystal oscillator
in
RC-oscillator 1 and 32-kHz crystal
oscillator
Power-down ModesThe sleep mode is a shut-down condition which is used to reduce the average system
power consumption in applications where the microcontroller is not fully utilized. In this
mode, the system clock is stopped. The sleep mode is entered via the SLEEP instruction. This instruction sets the interrupt enable bit (I) in the condition code register to
enable all interrup ts and stops the core. Durin g the sleep mode the periphe ral modules
remain active and are able to gene rate interrupt s. The microco ntroller exits the s leep
mode by carrying out any interrupt or a reset.
The sleep mode c an only be kept whe n none of th e interr upt pend ing or ac tive re gister
bits are set. The application of the $AUTOSLEEP routine ensures the correct function of
the sleep mode. For standard applications use the $AUTOSLEEP r outine to enter the
power-down mode. Using the S LE EP in str uc tion i ns tea d of th e $A UTO SLE E P follo win g
an I/O instruction requ ires to ins ert 3 non-I/O inst ructi on cyc les (for exam ple N OP N OP
NOP) between the IN or OUT command and the SLEEP command.
The total power consumption is directly proportional to the active time of the microcontroller. For a rough estimation of the expected average system current consumption, the
following formula should be used:
I
(VDD,f
total
IDD depends on VDD and f
syscl
) = I
syscl
+ (IDD ´ t
Sleep
active/ttotal
)
4590B–4BMCU–02/03
29
The microcontroller block has various power-down modes. During the sleep mode the
clock for the microcontroller block core is stopped. With the NSTOP-bit in the clock management register (CM), it is programmable if the clock for the on-chip peripherals is
active or stopped during the s leep m ode. If the cloc k fo r the co re an d the perip herals is
stopped, the selected oscillator is switched off. An exception is the 32-kHz oscillator, if it
is selected it runs continuously independent of the NSTOP-bit. If the oscillator is stopped
or the 32-kHz oscillator is selected, power consumption is extremely low.
Table 4. Power-down Modes
RC-oscillator 1
Brown-
CPU
Mode
ActiveRUNNOActiveRUNRUNYES
Power-
down
SLEEPSLEEPYESSTOPSTOPRUNSTOP
Note:1. Osc-Stop = SLEEP and NSTOP and WDL
Core
SLEEPNOActiveRUNRUNYES
Osc-
Stop
(1)
out
Function
RC-oscillator 2
4-MHz
Oscillator
32-kHz
Oscillator
External
Input
Clock
Peripheral Modules
Addressing Peripheral s Accessing the peripheral modules takes place via the I/O bus (see Figure 21). The IN or
OUT instructions allow direct addressing of up to 16 I/O modul es. A dual register
addressing scheme has be en ado pted to ena ble dir ect a ddressi ng of the prim ary regi ster. To address the auxiliary register, the access must be switched with an auxiliary
switching m odul e. Thus , a si ngle IN (or OU T) to the module address will read (or write
into) the module primar y register . Accessin g the auxili ary registe r is perform ed with the
same instruction preceded by writing the module address into the auxiliary switching
module. Byte wide regist ers are accessed by multiple IN- (or OUT-) instructions. For
more complex peripheral modules, with a larger number of registers, extended addressing is used. In this case, a bank of up to 16 subport registers are indirectly addressed
with the subport address. The first OUT-instruction writes the subport address to the sub
address register, the second IN- or OUT-instruction reads data from or writes data to the
addressed subport.
30
T48C862-R8
4590B–4BMCU–02/03
Loading...
+ 77 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.