Please be aware that an important notice concerning availability, standard warranty, and use in critical applications of
Texas Instruments semiconductor products and disclaimers thereto appears at the end of this data sheet.
All trademarks are the property of their respective owners.
PRODUCTION DATA information is current as of publication date.
Products conform to specifications per the terms of Texas Instruments
standard warranty. Production processing does not necessarily include
testing of all parameters.
MSC1200Y24kTQFP-48PFB–40°C to +85°CMSC1200Y2
MSC1200Y24k
MSC1200Y38kTQFP-48PFB–40°C to +85°CMSC1200Y3
MSC1200Y38k
NOTE: (1) For the most current package and ordering information, see the Package Option Addendum at the end of this data sheet, or refer to our web site at
www.ti.com/msc.
FLASHPACKAGETEMPERATUREPACKAGE
ABSOLUTE MAXIMUM RATINGS
Analog Inputs
Input Current ............................................................ 100mA, Momentary
Input Current ..............................................................10mA, Continuous
Input Voltage.............................................AGND – 0.3V to AV
Power Supply
DV
to DGND......................................................................–0.3V to 6V
DD
AV
to AGND ......................................................................–0.3V to 6V
DD
AGND to DGND .............................................................. –0.3V to +0.3V
V
to AGND ....................................................... –0.3V to AVDD + 0.3V
REF
Digital Input Voltage to DGND .............................. –0.3V to DV
Digital Output Voltage to DGND ...........................–0.3V to DV
Maximum Junction Temperature ................................................ +150°C
Operating Temperature Range ...................................... –40°C to +85°C
Storage Temperature Range ....................................... –65°C to +150°C
Lead Temperature (soldering, 10s) ............................................ +235°C
Package Power Dissipation ............................... (T
Output Current All Pins ................................................................ 200mA
Output Pin Short Circuit .....................................................................10s
Thermal Resistance, Junction-to-Ambient
Thermal Resistance, Junction-to-Case (
Digital Outputs
Output Current ......................................................... 100mA, Continuous
Power Pin Maximum .................................................................... 300mA
NOTE: (1) Stresses beyond those listed under “Absolute Maximum Ratings”
may cause permanent damage to the device. Exposure to absolute-maximumrated conditions for extended periods may affect device reliability.
(
θ
JA
θ
) ...........................12.8°C/W
JC
(1)
SPECIFIED
"" ""
"" ""
(1)
ELECTROSTATIC
DISCHARGE SENSITIVITY
+ 0.3V
DD
+ 0.3V
DD
+ 0.3V
DD
Max – T
J
)....................... 56.5°C/W
AMBIENT
)/
θ
JA
This integrated circuit can be damaged by ESD. Texas Instruments recommends that all integrated circuits be handled with
appropriate precautions. Failure to observe proper handling
and installation procedures can cause damage.
ESD damage can range from subtle performance degradation
to complete device failure. Precision integrated circuits may be
more susceptible to damage because very small parametric
changes could cause the device not to meet its published
specifications.
MSC1200Yx FAMILY FEATURES
FEATURES
Flash Program Memory (Bytes)Up to 4kUp to 8k
Flash Data Memory (Bytes)Up to 2kUp to 4k
Internal Scratchpad RAM (Bytes)128128
NOTES: (1) All peripheral features are the same on all devices; the flash
memory size is the only difference. (2) The last digit of the part number (N)
represents the onboard flash size = (2
(1)
MSC1200Y2
N
)kBytes.
(2)
MSC1200Y3
(2)
ELECTRICAL CHARACTERISTICS: AVDD = 5V
All specifications from T
unless otherwise noted.
PARAMETERCONDITIONMINTYPMAXUNITS
ANALOG INPUT (AIN0-AIN7, AINCOM)
Analog Input RangeBuffer OFFAGND – 0.1AV
Full-Scale Input Voltage Range(In+) – (In–)±V
Differential Input ImpedanceBuffer OFF7/PGAMΩ
Input CurrentBuffer ON0.5nA
Bandwidth
Fast Settling Filter–3dB0.469 • f
Sinc2 Filter–3dB0.318 • f
Sinc3 Filter–3dB0.262 • f
Programmable Gain AmplifierUser-Selectable Gain Ranges1128
Input CapacitanceBuffer ON7pF
Input Leakage CurrentMultiplexer Channel Off, T = +25°C0.5pA
Burnout Current SourcesBuffer ON±2µA
ADC OFFSET DAC
Offset DAC Range
Offset DAC Monotonicity8Bits
Offset DAC Gain Error±1.0% of Range
Offset DAC Gain Error Drift0.6ppm/°C
MIN
to T
MAX
, DV
= +2.7V to 5.25V, f
DD
= 15.625kHz, PGA = 1, Buffer ON, f
MOD
Buffer ONAGND + 50mVAV
= 10Hz, Bipolar, and V
DATA
MSC1200Yx
±V
/(2 • PGA)
REF
≡ (REF IN+) – (REF IN–) = +2.5V,
REF
+ 0.1V
DD
– 1.5V
DD
/PGAV
REF
DATA
DATA
DATA
V
2
www.ti.com
MSC1200
SBAS289E
ELECTRICAL CHARACTERISTICS: AVDD = 5V (Cont.)
All specifications from T
unless otherwise noted.
PARAMETERCONDITIONMINTYPMAXUNITS
SYSTEM PERFORMANCE
Resolution24Bits
ENOB22Bits
Output NoiseSee Typical Characteristics
No Missing CodesSinc
Integral NonlinearityEnd Point Fit, Differential Input±0.0004±0.0015%FSR
Offset ErrorAfter Calibration1.5ppm of FS
Offset Drift
Gain Error
(1)
(2)
Gain Error Drift
System Gain Calibration Range80120% of FS
System Offset Calibration Range–5050% of FS
Common-Mode RejectionAt DC100120dB
Normal Mode Rejectionf
Power-Supply RejectionAt DC, dB = –20log(∆V
VOLTAGE REFERENCE INPUTS
Reference Input RangeREF IN+, REF IN–AGNDAV
V
REF
Common-Mode RejectionAt DC115dB
Input CurrentV
ON-CHIP VOLTAGE REFERENCE
Output VoltageVREFH = 1 at +25°C2.5V
Short-Circuit Current Source9mA
Short-Circuit Current Sink10mA
Short-Circuit DurationSink or SourceIndefinite
Startup Time from Power ON0.4ms
Temperature Sensor
Temperature Sensor VoltageT = +25°C115mV
Temperature Sensor Coefficient375µV/°C
IDAC OUTPUT CHARACTERISTICS
Full-Scale Output Current1mA
Maximum Short-Circuit Current DurationIndefinite
Compliance VoltageAVDD – 1.5V
NOTES: (1) Calibration can minimize these errors. (2) The gain calibration cannot have a REF IN+ of more than AV
turn buffer off. (3) DV
to T
MIN
MAX
(1)
is change in digital result.
OUT
, DV
= +2.7V to 5.25V, f
DD
ADC
VREF
IDAC
= 15.625kHz, PGA = 1, Buffer ON, f
MOD
= 10Hz, Bipolar, and V
DATA
≡ (REF IN+) – (REF IN–) = +2.5V,
REF
MSC1200Yx
3
Filter24Bits
Before Calibration0.02ppm of FS/°C
After Calibration0.005%
Before Calibration0.5ppm/°C
f
= 60Hz, f
CM
f
= 50Hz, f
CM
f
= 60Hz, f
CM
= 50Hz, f
SIG
f
= 60Hz, f
SIG
V
≡ (REF IN+) – (REF IN–)0.32.5AV
REF
= 2.5V, PGA = 11µA
REF
= 10Hz130dB
DATA
= 50Hz120dB
DATA
= 60Hz120dB
DATA
= 50Hz100dB
DATA
= 60Hz100dB
DATA
OUT
/∆VDD)
(3)
100dB
(2)
DD
DD
VREFH = 01.25V
DD
4.755.05.25V
PGA = 1, Buffer OFF170µA
PGA = 128, Buffer OFF430µA
PGA = 1, Buffer ON230µA
PGA = 128, Buffer ON770µA
ADC ON360µA
IDAC = 00
H
230µA
– 1.5V with buffer ON. To calibrate gain,
DD
V
V
MSC1200
SBAS289E
www.ti.com
3
ELECTRICAL CHARACTERISTICS: AVDD = 3V
All specifications from T
unless otherwise noted.
PARAMETERCONDITIONMINTYPMAXUNITS
ANALOG INPUT (AIN0-AIN7, AINCOM)
Analog Input RangeBuffer OFFAGND – 0.1AV
Full-Scale Input Voltage Range(In+) – (In–)±V
Differential Input ImpedanceBuffer OFF7/PGAMΩ
Input CurrentBuffer ON0.5nA
Bandwidth
Fast Settling Filter–3dB0.469 • f
Sinc2 Filter–3dB0.318 • f
Sinc3 Filter–3dB0.262 • f
Programmable Gain AmplifierUser-Selectable Gain Ranges1128
Input CapacitanceBuffer On7pF
Input Leakage CurrentMultiplexer Channel Off, T = +25°C0.5pA
Burnout Current SourcesBuffer ON±2µA
ADC OFFSET DAC
Offset DAC Range
Offset DAC Monotonicity8Bits
Offset DAC Gain Error±1.5% of Range
Offset DAC Gain Error Drift0.6ppm/°C
SYSTEM PERFORMANCE
Resolution24Bits
ENOB22Bits
Output NoiseSee Typical Characteristics
No Missing CodesSinc
Integral NonlinearityEnd Point Fit, Differential Input±0.0004±0.0015%FSR
Offset ErrorAfter Calibration1.3ppm of FS
Offset Drift
Gain Error
(1)
(2)
Gain Error Drift
System Gain Calibration Range80120% of FS
System Offset Calibration Range–5050% of FS
Common-Mode RejectionAt DC100130dB
Normal Mode Rejectionf
Power-Supply RejectionAt DC, dB = –20log(DV
VOLTAGE REFERENCE INPUTS
Reference Input RangeREF IN+, REF IN–AGNDAV
V
REF
Common-Mode RejectionAt DC110dB
Input CurrentV
ON-CHIP VOLTAGE REFERENCE
Output VoltageVREFH = 0 at +25°C1.25V
Short-Circuit Current Source4mA
Short-Circuit Current Sink5µA
Short-Circuit DurationSink or SourceIndefinite
Startup Time from Power ON0.2ms
Temperature Sensor
Temperature Sensor VoltageT = +25°C115mV
Temperature Sensor Coefficient375µV/°C
IDAC OUTPUT CHARACTERISTICS
Full-Scale Output Current1mA
Maximum Short-Circuit Current DurationIndefinite
Compliance VoltageAVDD – 1.5V
FLASH MEMORY CHARACTERISTICS: DVDD = 2.7V to 5.25V
t
= 1µs, t
USEC
PARAMETERCONDITIONMINTYPMAXUNITS
Flash Memory Endurance100,0001,000,000cycles
Flash Memory Data Retention100Years
Mass and Page Erase TimeSet with FER Value in FTCON10ms
Flash Memory Write TimeSet with FWR Value in FTCON3040µs
The MSC1200Yx is a completely integrated family of mixedsignal devices incorporating a high-resolution delta-sigma
ADC, 8-bit IDAC, 8-channel multiplexer, burnout detect current sources, selectable buffered input, offset DAC, programmable gain amplifier (PGA), temperature sensor, voltage
reference, 8-bit microcontroller, Flash Program Memory, Flash
Data Memory, and Data SRAM, as shown in Figure 1.
On-chip peripherals include an additional 32-bit accumulator,
basic SPI, basic I
ports, watchdog timer, low-voltage detect, on-chip power-on
reset, brownout reset, timer/counters, system clock divider,
PLL, on-chip oscillator, and external interrupts.
The device accepts low-level differential or single-ended
signals directly from a transducer. The ADC provides 24 bits
of resolution and 24 bits of no-missing-code performance
using a Sinc
ADC also has a selectable filter that allows for high-resolution single-cycle conversion.
The microcontroller core is 8051 instruction set compatible. The
microcontroller core is an optimized 8051 core that executes up
to three times faster than the standard 8051 core, given the
same clock source. This makes it possible to run the device at
a lower external clock frequency and achieve the same performance at lower power than the standard 8051 core.
2
C, USART, multiple digital input/output
3
filter with a programmable sample rate. The
The MSC1200Yx allows the user to uniquely configure the
Flash memory map to meet the needs of their application.
The Flash is programmable down to 2.7V using serial programming. Flash endurance is typically 1M Erase/Write cycles.
The part has separate analog and digital supplies, which can
be independently powered from 2.7V to +5.25V. At +3V
operation, the power dissipation for the part is typically less
than 4mW. The MSC1200Yx is packaged in a TQFP-48
package.
The MSC1200Yx is designed for high-resolution measurement
applications in smart transmitters, industrial process control,
weigh scales, chromatography, and portable instrumentation.
ENHANCED 8051 CORE
All instructions in the MSC1200 family perform exactly the same
functions as they would in a standard 8051. The effect on bits,
flags, and registers is the same. However, the timing is different.
The MSC1200 family utilizes an efficient 8051 core which results
in an improved instruction execution speed of between 1.5 and
3 times faster than the original core for the same external clock
speed (4 clock cycles per instruction versus 12 clock cycles per
instruction, as shown in Figure 2). This translates into an effective
throughput improvement of more than 2.5 times, using the same
code and same external clock speed. Therefore, a device
frequency of 33MHz for the MSC1200Yx actually performs at an
equivalent execution speed of 82.5MHz compared to the
AIN0
AIN1
AIN2
AIN3
AIN4
AIN5
AIN6
AIN7
AINCOM
IDAC
FIGURE 1. Block Diagram.
instr_cycle
AGNDREFOUT/REFIN+ REFIN–DVDDDGND
AV
DD
AV
DD
Burnout
Detect
Temperature
Sensor
MUX
AGND
NOTE (1) REF IN− must be tied to AGND when using internal V
CLK
BUFFERPGA
Burnout
Detect
8-Bit IDAC
n + 1n + 2
V
REF
8-Bit
Offset DAC
REF
Modulator
4K or 8K
FLASH
128 Bytes
SRAM
.
POR
(1)
ALVD
DBOR
Digital
System
Clock
Divider
Filter
ACC
8051
SFR
Timers/
Counters
WDT
PORT1
PORT3
On-Chip
Oscillator
PLL
XIN XOUT
RST
CAP
Alternate
Functions
DIN
DOUT
SS
EXT (4)
PROG
USART
EXT (2)
T0
T1
SCK/SCL/CLKS
220pF Ceramic
cpu_cycle
FIGURE 2. Instruction Cycle Timing.
14
C1C2C3C4C1C2C3C4C1
www.ti.com
MSC1200
SBAS289E
standard 8051 core. This allows the user to run the device at
slower clock speeds, which reduces system noise and power
consumption, but provides greater throughput. This performance
difference can be seen in Figure 3. The timing of software loops
will be faster with the MSC1200. However, the timer/counter
operation of the MSC1200 may be maintained at 12 clocks per
increment or optionally run at 4 clocks per increment.
Single-Byte, Single-Cycle
Instruction
ALE
PSEN
Internal
AD0-AD7
Internal
A8-A15
4 Cycles
CLK
12 Cycles
ALE
PSEN
AD0-AD7
PORT 2
Standard 8051 TimingMSC1200 Timing
Single-Byte, Single-Cycle
Instruction
FIGURE 3. Comparison of MSC1200 Timing to Standard
8051 Timing.
The MSC1200 also provides dual data pointers (DPTRs).
Furthermore, improvements were made to peripheral fea-
tures that off-load processing from the core and the user, to
further improve efficiency. For instance, a 32-bit accumulator
was added to significantly reduce the processing overhead
for the multiple byte data from the ADC or other sources. This
allows for 24-bit addition and shifting to be accomplished in
a few instruction cycles, compared to hundreds of instruction
cycles through software implementation.
Family Device Compatibility
The hardware functionality and pin configuration across the
MSC1200 family is fully compatible. To the user, the only
difference between family members is the memory configuration.
This makes migration between family members simple. Code
written for the MSC1200Y2 can be executed directly on an
MSC1200Y3. This gives the user the ability to add or subtract
software functions and to freely migrate between family members. Thus, the MSC1200 can become a standard device used
across several application platforms.
Family Development Tools
The MSC1200 is fully compatible with the standard 8051
instruction set. This means that the user can develop software for the MSC1200 with existing 8051 development tools.
Additionally, a complete, integrated development environment is provided with each demo board, and third-party
developers also provide support.
Power Down Modes
The MSC1200 can power several of the peripherals and put
the CPU into IDLE. This is accomplished by shutting off the
clocks to those sections, as shown in Figure 4.
t
SYS
SYSCLK
t
CLK
USEC
MSECH
ADC Power Down
PDCON.3
IDLE
C7
9A
Flash Write
Timing
Flash Erase
Timing
SECINT
WDTCON
SCL/SCK
(30µs to 40µs)
(5ms to 11ms)
milliseconds
interrupt
FA
ADC Output Rate
F9
FF
seconds
interrupt
watchdog
FD
ACLK
FB
MSECL
FC
F6
Timers 0/1
CPU Clock
PDCON.0
ms
PDCON.1
HMSEC
divide
by 64
Modulator Clock
SPICON/
I2CCON
µs
FE
ADCON3ADCON2
FTCON
[3:0]
FTCON
[7:4]
100ms
PDCON.2
DFDE
Decimation Ratio
USART
EF
EF
MSINT
FIGURE 4. MSC1200 Timing Chain and Clock Control.
MSC1200
SBAS289E
www.ti.com
15
OVERVIEW
The MSC1200 ADC structure is shown in Figure 5. The figure lists the components that make up the ADC, along with the
corresponding special function register (SFR) associated with each component.
AV
DD
AIN0
AIN1
AIN2
AIN3
AIN4
AIN5
AIN6
AIN7
AINCOM
Input
Multiplexer
Temperature
Sensor
ADMUXD7
H
REFIN+ f
V
IN
∆Σ ADC
Modulator
REFIN−
Burnout
MOD
H
H
H
Burnout
Detect
Detect
ADCON1DD
ADCON2DE
ADCON3DF
In+
In−
AGND
f
DATA
FAST
SINC2
SINC3
AUTO
REFIN+
BufferPGA
REFIN−
ADCON0DC
H
ΣX
Offset
Calibration
Register
OCRGCRADRES
D3
HD2HD1H
Gain
Calibration
Register
D6HD5HD4HDBHDAHD9
f
SAMP
Sample
and Hold
ACLKF6
H
ADC
Result Register
H
Σ
Offset
DAC
ODACE6
H
Summation
Block
Σ
SUMR
E5HE4HE3HE2
E1
SSCON
H
H
FIGURE 5. MSC1200 ADC Structure.
16
www.ti.com
MSC1200
SBAS289E
INPUT MULTIPLEXER
R
SWITCH
(3kΩ typical)
Sampling Frequency = f
SAMP
High Impedance
> 1GΩ
C
S
AGND
A
IN
PGAf
SAMP
1, 2, 4f
MOD
82 × f
MOD
164 × f
MOD
328 × f
MOD
64, 128 16 × f
MOD
PGAC
S
19pF
218pF
4 to 12836pF
The input multiplexer provides for any combination of differential
inputs to be selected as the input channel, as shown in Figure 6.
If AIN0 is selected as the positive differential input channel, any
other channel can be selected as the negative differential input
channel. With this method, it is possible to have up to eight fully
differential input channels. It is also possible to switch the polarity
of the differential input pair to negate any offset voltages.
AIN0
AIN1
AIN2
AV
DD
Burnout Detect (2µA)
BURNOUT DETECT
When the Burnout Detect (BOD) bit is set in the ADC control
configuration register (ADCON0 DC
), two current sources are
H
enabled. The current source on the positive input channel sources
approximately 2µA of current. The current source on the negative
input channel sinks approximately 2µA. This allows for the
detection of an open circuit (full-scale reading) or short circuit
(small differential reading) on the selected input differential pair.
Enabling the buffer is recommended when BOD is enabled.
INPUT BUFFER
The analog input impedance is always high, regardless of
PGA setting (when the buffer is enabled). With the buffer
enabled, the input voltage range is reduced and the analog
power-supply current is higher. If the limitation of input
voltage range is acceptable, then the buffer is always preferred.
The input impedance of the MSC1200 without the buffer
is 7MΩ/PGA. The buffer is controlled by the state of the BUF
bit in the ADC control register (ADCON0 DC
).
H
AIN3
In+
AIN4
In–
AIN5
AIN6
AGND
AIN7
AINCOM
Buffer
Burnout Detect (2µA)
Temperature Sensor
AV
DD
80 • I
AV
DD
I
FIGURE 6. Input Multiplexer Configuration.
In addition, current sources are supplied that will source or
sink current to detect open or short circuits on the pins.
ANALOG INPUT
When the buffer is not selected, the input impedance of the
analog input changes with ACLK clock frequency (ACLK
F6
) and gain (PGA). The relationship is:
H
Apedance
Im( )Ω=
IN
where ACLK frequency (f
f
and f
MOD
=
ACLK
64
.
MHz
17
ACLKFrequencyMPGA
) =
ACLK
Figure 7 shows the basic input structure of the MSC1200.
f
CLK
ACLK
+1
Ω
•
TEMPERATURE SENSOR
On-chip diodes provide temperature sensing capability. When
the configuration register for the input MUX is set to all 1s,
the diodes are connected to the input of the ADC. All other
channels are open.
MSC1200
SBAS289E
FIGURE 7. Analog Input Structure (without buffer).
www.ti.com
17
PGA
The PGA can be set to gains of 1, 2, 4, 8, 16, 32, 64, or 128.
Using the PGA can actually improve the effective resolution
of the ADC. For instance, with a PGA of 1 on a ±2.5V fullscale range, the ADC can resolve to 1.5µV. With a PGA of
128 on a ±19mV full-scale range, the ADC can resolve to
75nV. With a PGA of 1 on a ±2.5V full-scale range, it would
require a 26-bit ADC to resolve 75nV, as shown in Table I.
The analog output from the PGA can be offset by up to half
the full-scale input range of the PGA by using the ODAC
register (SFR E6
bit value; the MSB is the sign and the seven LSBs provide
the magnitude of the offset. Since the ODAC introduces an
analog (instead of digital) offset to the PGA, using the ODAC
does not reduce the range of the ADC.
). The ODAC (Offset DAC) register is an 8-
H
requires a positive full-scale differential input signal. It then
computes a gain value to nullify gain errors in the system.
Each of these calibrations will take seven t
periods to
DATA
complete.
Calibration should be performed after power on, a change in
temperature, power supply, voltage reference, decimation
ratio, buffer, or a change of the PGA. Calibration will remove
the effects of the Offset DAC; therefore, changes to the
Offset DAC register should be done after calibration.
At the completion of calibration, the ADC Interrupt bit goes
high, which indicates the calibration is finished and valid data
is available.
DIGITAL FILTER
The Digital Filter can use either the Fast Settling, Sinc2, or
3
Sinc
filter, as shown in Figure 8. In addition, the Auto mode
changes the Sinc filter after the input channel or PGA is
changed. When switching to a new channel, it will use the
Fast Settling filter, for the next two conversions the first of
which should be discarded. It will then use the Sinc
by the Sinc
3
filter to improve noise performance. This combines the low-noise advantage of the Sinc
quick response of the Fast Settling Time filter. The frequency
response of each filter is shown in Figure 9.
Adjustable Digital Filter
3
Sinc
2
followed
3
filter with the
MODULATOR
The modulator is a single-loop 2nd-order system. The modulator runs at a clock speed (f
using the value in the Analog Clock register (ACLK, F6
) that is derived from the CLK
MOD
H
The data output rate is:
f
MOD
DecimationRatio
f
=
where f
Data Rate = f
=
MOD
ACLK
()+•
=
DATA
f
CLKACLK
164 64
CALIBRATION
The offset and gain errors in the MSC1200, or the complete
system, can be reduced with calibration. Calibration is controlled through the ADCON1 register (SFR DD
CAL2:CAL0. Each calibration process takes seven t
periods (data conversion time) to complete. Therefore, it
takes 14 t
periods to complete both an offset and gain
DATA
calibration.
For system calibration, the appropriate signal must be
applied to the inputs. The system offset calibration requires a
zero-differential input signal. It then computes an offset value
that will nullify offset in the system. The system gain calibration
), bits
H
DATA
Modulator
).
FILTER SETTLING TIME
FILTER(Conversion Cycles)
3
Sinc
2
Sinc
Fast1
NOTE: (1) With Synchronized Channel Changes.
AUTO MODE FILTER SELECTION
1234+
DiscardFastSinc
FIGURE 8. Filter Step Responses.
2
Sinc
Fast Settling
SETTLING TIME
CONVERSION CYCLE
Data Out
(1)
3
(1)
2
(1)
2
Sinc
3
18
www.ti.com
MSC1200
SBAS289E
0
PROG
–20
–40
–60
Gain (dB)
–80
–100
SINC3 FILTER RESPONSE
(–3dB = 0.262 • f
DATA
If the internal V
is not used, then V
REF
should be disabled
REF
in ADCON0.
)
If the external voltage reference is selected it can be used as
either a single-ended input of differential input, for ratiometric
measures. When using an external reference, it is important
to note that the input current will increase for V
with higher
REF
PGA settings and with a higher modulator frequency. The
external voltage reference can be used over the input range
specified in the electrical characteristics section.
–120
012345
0
–20
–40
–60
Gain (dB)
–80
–100
–120
012345
0
–20
–40
–60
Gain (dB)
–80
–100
–120
012345
SINC2 FILTER RESPONSE
FAST SETTLING FILTER RESPONSE
NOTE: f
DATA
f
DATA
(–3dB = 0.318 • f
f
DATA
(–3dB = 0.469 • f
f
DATA
= Data Output Rate = 1/t
DATA
DATA
DATA
)
)
FIGURE 9. Filter Frequency Responses.
VOLTAGE REFERENCE
The MSC1200 can use either an internal or external voltage
reference. The voltage reference selection is controlled via
ADC Control Register 0 (ADCON0, SFR DC
power-up configuration for the voltage reference is 2.5V
internal.
The internal voltage reference can be selected as either 1.25V
or 2.5V. The analog power supply (AV
DD
specified range for the selected internal voltage reference.
The valid ranges are: V
5.25V) and V
internal V
= 1.25 internal (AVDD = 2.7V to 5.25V). If the
REF
is selected then AGND must be connected to
REF
= 2.5 internal (AVDD = 4.1V to
REF
REFIN–. The REFOUT/REFIN+ pin should also have a 0.1µF
capacitor connected to AGND as close as possible to the pin.
). The default
H
) must be within the
IDAC
The 8-bit IDAC in the MSC1200 can be used to provide a
current source that can be used for ratiometric measurements. The IDAC operates from its own voltage reference
and is not dependent on the ADC voltage reference. The fullscale output current of the IDAC is approximately 1mA. The
equation for the IDAC output current is:
IDACOUT = IDAC • 3.6µA
RESET
Taking the RST pin HIGH will stop the operation of the
device, and taking the RST pin LOW will initiate a reset. The
device can also be reset by the power on reset circuitry,
digital brownout Reset, or software reset. The timing of the
reset operation is shown in the Electrical Characteristics
section.
If the P1.0/PROG
pin is unconnected or tied HIGH, the
device will enter User Application mode on reset. If P1.0/
is tied LOW during reset, the device will enter Serial
Programming mode.
POWER ON RESET
The on-chip Power On Reset (POR) circuitry releases the
device from reset at approximately DVDD = 2.0V. The POR
accommodates power-supply ramp rates as slow as
1V/10ms. To ensure proper operation, the power supply
should ramp monotonically. Note that, as the device is
released from reset and program execution begins, the
device current consumption may increase, which may result
in a power-supply voltage drop. If the power supply ramps at
a slower rate, is not monotonic, or a brownout condition
occurs (where the supply does not drop below the 2.0V
threshold), then improper device operation may occur. The
on-chip Brownout Reset (BOR) may provide benefit in these
conditions. A POR circuit is shown in Figure 10.
DV
DD
0.1µF
10kΩ
1MΩ
FIGURE 10. Typical Reset Circuit.
5
MSC1200
RST
MSC1200
SBAS289E
www.ti.com
19
DIGITAL BROWNOUT RESET
The Digital Brownout Reset (DBOR) is enabled through
Hardware Configuration Register 1 (HCR1). If the conditions
for proper POR are not met or the device encounters a
brownout condition which does not generate a POR, DBOR
can be used to ensure proper device operation. The DBOR
will hold the state of the device when the power supply drops
below the threshold level programmed in HCR1 and then
generate a reset when the supply rises above the threshold
level. Note that, as the device is released from reset and
program execution begins, the device current consumption
may increase, which can result in a power-supply voltage
drop, which may initiate another brownout condition. Additionally, the DBOR comparison is done against an analog
reference; therefore, AV
must be within its valid operating
DD
range for DBOR to function.
The DBOR level should be chosen to match closely with the
application. That is, with a high external clock frequency, the
BOR level should match the minimum operating voltage
range for the device, or improper operation may still occur.
ANALOG LOW VOLTAGE DETECT
The MSC1200 contains an analog low-voltage detect. When
the analog supply drops below the value programmed in
LVDCON (SFR E7
), an interrupt is generated.
H
POWER-UP—SUPPLY VOLTAGE RAMP RATE
The built-in (on-chip) power-on reset circuitry was designed
to accommodate analog or digital supply ramp rates as slow
as 1V/10ms. To ensure proper operation, the power supply
should ramp monotonically at the specified rate. If DBOR is
enabled, the ramp rate can be slower.
CLOCKS
The MSC1200 can operate in three separate clock modes:
internal oscillator mode (IOM), external clock mode (ECM),
and PLL mode. A block diagram is shown in Figure 11. The
clock mode for the MSC1200 is selected via the CLKSEL bits
in HCR2. IOM is the default mode for the device.
Serial Flash Programming mode uses IO LF mode (the
HCR2 and CLKSEL bits have no effect). Table II shows the
active clock mode for the various startup conditions.
Internal Oscillator
In IOM, the CPU executes either in LF mode (if HCR2,
CLKSEL = 111) or HF mode (if HCR2, CLKSEL = 110).
External Clock
In ECM (HCR2, CLKSEL = 011), the CPU can execute from
an external crystal, external ceramic resonator, external
STOP
Int Osc
PLLDIV
100kΩ
CAP
220pF
Ceramic
VCO
(1)
PLL DAC
XIN
XOUT
Phase
Detector
NOTE: (1) The trace length connecting the CAP pin to the 220pF ceramic capacitor should be as short as possible.
PLL LF ModeActive 32.768kHz Clock at XINPLL LF Mode
PLL HF ModeActive 32.768kHz Clock at XINPLL HF Mode
NOTES: (1) Clock detection is only done at startup; refer to Electrical Characteristics parameter t
(2) PLL operation requires that both AVDD and DVDD are within their specified operating range.
Active Clock Present at XINExternal Clock Mode
No Clock Present at XINIO LF Mode
No Clock Present at XINNominal: 50% of IO LF Mode Rate
No Clock Present at XINNominal: 50% of IO HF Mode Rate
(1)
ACTIVE CLOCK MODE (f
in Figure B.
RFD
TABLE II. Active Clock Modes.
t
PLL/tIOM
t
OSC
t
SYS
SYSDIV
)
SYS
t
CLK
20
www.ti.com
MSC1200
SBAS289E
XINExternal Clock
clock, or external oscillator. If an external clock is detected at
SPI /I2C
Data Write
SPICON
I2CCON
I2C
Stretch
Control
Counter
Start/Stop
Detect
SPI /I2C
Data Read
Pad Control
DOUT
P1.2
P1.4
P3.6
P1.3
Logic
DOUT
TX_CLK
RX_CLK
SS
SCK/SCL
CNT_CLK
CNT INT
I2C INT
DIN
CLKS
(refer to PASEL, SFR F2
H
)
SS
SCK
DIN
startup, then the CPU will begin execution in ECM after
startup. If an external clock is not detected at startup, then
the device will revert to the mode shown in Table II.
XIN
C
1
PLL
In Phase Lock Loop (PLL) mode (HCR2, CLKSEL = 101 or
HCR2, CLKSEL = 100), the CPU can execute from an
external 32.768 kHz crystal. This mode enables the use of a
phase-lock loop (PLL) circuit that synthesizes the selected
clock frequencies (PLL LF mode or PLL HF mode). If an
external clock is detected at startup, then the CPU will begin
execution in PLL mode after startup. If an external clock is
not detected at startup, then the device will revert to the
mode shown in Table II. The status of the PLL can be
determined by first writing the PLLLOCK bit (enable) and
then reading the PLLLOCK status bit in the PLLH SFR.
The frequency of the PLL is preloaded with default trimmed
values. However, the PLL frequency can be fine-tuned by
writing to the PLLDIV1 and PLLDIV0 SFRs. The equation for
the PLL frequency is:
PLL Frequency = ((PLLDIV9:PLLDIV0) + 1) • f
where f
= 32.768kHz.
OSC
OSC
The default value for PLL LF mode is automatically loaded
into the PLLDIV SFR. For PLL HF mode, the user must load
PLLDIV with the appropriate value (0383
).
H
For different connections to external clocks, see Figures 12,
13, and 14.
SPI
The MSC1200 implements a basic SPI interface which includes the hardware for simple serial data transfers. Figure 15
shows a block digram of the SPI. The peripheral supports
master and slave mode, full duplex data transfers, both clock
polarities, both clock phases, bit order, and slave select.
XOUT
C
2
NOTE: Refer to the crystal manufacturer's specification
for C
and C2 values.
1
FIGURE 12. External Crystal Connection.
FIGURE 13. External Clock Connection.
C
1
C
2
32.768kHz
NOTE: Typical configuration is shown.
R
S
FIGURE 14. PLL Connection.
XIN
XOUT
FIGURE 15. SPI/I2C Block Diagram.
MSC1200
SBAS289E
www.ti.com
21
The timing diagram for supported SPI data transfers is
shown in Figure 16.
The I/O pins needed for data transfer are Data In (DIN), Data
Out (DOUT) and serial clock (SCK). The slave select (
SS
pin can also be used to control the output of data on DOUT.
The DIN pin is used for shifting data in for both master and
slave modes.
The DOUT pin is used for shifting data out for both master
and slave modes.
The SCK pin is used to synchronize the transfer of data for
both master and slave modes. SCK is always generated by
the master. The generation of SCK in master mode can be
done in SW by simply toggling the port pin, or the generation
of SCK can be accomplished by configuring the output on the
SCK pin via PASEL (SFR F2
). A list of the most common
H
methods of generating SCK follows, but the complete list of
clock sources can be found by referring to the PASEL SFR.
• Toggle SCK by setting and clearing the port pin.
• Memory Write Pulse (WR) which is idle high. Whenever a
external memory write command (MOVX) is executed then a
pulse is seen on P3.6. This method can be used only if CPOL
is set to ‘1’.
• Memory Write Pulse toggle version: In this mode, SCK
toggles whenever an external write command (MOVX) is
executed.
• T0_Out signal can be used as a clock. A pulse is generated
on SCK whenever Timer 0 expires. The idle state of the
signal is low, so this can be used only if CPOL is cleared to
pin can be used to control the output of data on
DOUT when the MSC1200 is in slave mode. The
is enabled or disabled by the ESS bit of the SPICON SFR.
When enabled, the
)
SS
input of a slave device must be
externally asserted before a master device can exchange
data with the slave device.
SS
must be low before data
transactions and must stay low for the duration of the
transaction. When
SS
is high then data will not be shifted into
the shift register nor will the counter increment. When SPI is
enabled,
When
and when
SS
also controls the drive of the line DOUT (P1.2).
SS
is low in slave mode, the DOUT pin will be driven
SS
is high then DOUT will be high impedance.
The SPI generates an interrupt ECNT (AIE.2) to indicate that
the transfer/reception of the byte is complete. The interrupt
goes high whenever the counter value is equal to 8 (indicating that 8 SCKs have occurred). The interrupt is cleared on
reading or writing to the SPIDATA register. During the data
transfer, the actual counter value can be read from the
SPICON SFR.
Power Down
The SPI is powered down by the PDSPI bit in the power
control register (PDCON). This bit needs to be cleared to
enable the SPI function. When the SPI is powered down the
pins P1.2, P1.3, P1.4, and P3.6 revert to general-purpose
I/O pins.
Application Flow
Explained below are the steps of the typical application
usage flow of SPI in master and slave mode:
Master Mode Application Flow
1. Configure the port pins.
2. Configure the SPI.
SS
3. Assert
4. Write data to SPIDATA.
5. Generate 8 SCKs.
6. Read the received data from SPIDATA.
to enable slave communications (if applicable).
SS
function
SCK Cycle #
SCK (CPOL = 0)
SCK (CPOL = 1)
Sample Input
(CPHA = 0) Data Out
Sample Input
(CPHA = 1) Data Out
SS to Slave
1) SS Asserted
2) First SCK Edge
3) CNTIF Set (dependent on CPHA bit)
4) SS Negated
1
FIGURE 16. SPI Timing Diagram.
22
12345678
MSB654321LSB
MSB654321 LSB
2
Slave CPHA = 1 Transfer in Progress
Slave CPHA = 0 Transfer in Progress
www.ti.com
43
MSC1200
SBAS289E
Slave Mode Application Flow
1. Configure the ports pins.
SS
2. Enable
(if applicable).
3. Configure the SPI.
4. Write data to SPIDATA.
5. Wait for the Count Interrupt (8 SCKs).
6. Read the data from SPIDATA.
Caution: If SPIDATA is not read before the next SPI transaction the ECNT interrupt will be removed and the previous
data will be lost.
I2C
The I/O pins needed for I2C transfer are: serial clock (SCL)
and serial data (SDA—implemented by connecting DIN and
DOUT externally).
The MSC1200 I
1) Master or slave I
2) Standard or fast modes of transfer
3) Clock stretching
4) General call
When used in I
should be tied together externally. The DIN pin should be
configured as an input pin and the DOUT pin should be configured as open drain or standard 8051 by setting the P1DDR
(DOUT should be set high so that the bus is not pulled low).
The MSC1200 I2C can generate two interrupts:
1) I2C interrupt for START/STOP interrupt (AIE.3)
2) CNT interrupt for bit counter interrupt (AIE.2)
The START/STOP interrupt is generated when a START
condition or STOP condition is detected on the bus. The bit
counter generates an interrupt on a complete (8-bit) data
transfer and also after the transfer of the ACK/NACK.
The bit counter for serial transfer is always incremented on the
falling edge of SCL and can be reset by reading or writing to
I2CDATA (SFR 9B
detected. The bit counter can be polled or used as an interrupt.
The bit counter interrupt occurs when the bit counter value is
equal to 8, indicating that eight bits of data have been
2
C supports:
2
C operation (control in software)
2
C mode, pins DIN (P1.3) and DOUT (P1.2)
) or when a START/STOP condition is
H
transferred. I
2
C mode also allows for interrupt generation on
one bit of data transfer (I2CCON.CNTSEL). This can be used
for ACK/NACK interrupt generation. For instance, the I
2
interrupt can be configured for 8-bit interrupt detection, on the
eighth bit the interrupt is generated. Following this interrupt,
the clock will be stretched (SCL held low). The interrupt can
then be configured for 1-bit detection. The ACK/NACK can be
written by the software, which will terminate clock stretching.
The next interrupt will be generated after the ACK/NACK has
been latched by the receiving device. The interrupt is cleared
on reading or writing to the I2CDATA register. If I2CDATA is
not read before the next data transfer, the interrupt will be
removed and the previous data will be lost.
Master Operation
The source for the SCL is controlled in the PASEL register or
can be generated in software.
Transmit
The serial data must be stable on the bus while SCL is high.
Therefore, the writing of serial data to I2CDATA must be
coordinated with the generation of the SCL, since SDA
transitions on the bus may be interpreted as a START or
STOP while SCL is high. The START and STOP conditions
on the bus must be generated in software. After the serial
data has been transmitted, the generation of the ACK/NACK
clock must be enabled by writing 0xFF
to I2CDATA. This
H
allows the master to read the state of ACK/NACK.
Receive
The serial data is latched into the receive buffer on the rising
edge of SCL. After the serial data has been received,
ACK/NACK is generated by writing 0x7F
(for ACK) or 0xFF
H
(for NACK) to I2CDATA.
Slave Operation
Slave operation is supported, but address recognition, R/W
determination, and ACK/NACK must be done under software
control.
Transmit
Once address recognition, R/W determination, and
ACK/NACK are complete, the serial data to be transferred
can be written to I2CDATA. The data is automatically shifted
out based on the master SCL. After data transmission,
C
H
SDA
SCL
START
Condition
ADDRESS
(1)
1-78
(2)
NOTES:
R/W
(1) Generate in software; write 0x7F to I2CDATA.
(2) I2CDATA register.
(3) Generate in software. Can enable bit count = 1 interrupt prior to ACK/NACK for interrupt use.
(4) Generate in software; write 0xFF to I2CDATA.
91-7891-789
(3)
(2)
ACK
Generate ACK by writing 0x7F to I2CDATA; generate NACK by writing 0xFF to I2CDATA.
DATA
(2)
FIGURE 17. Timing Diagram for I2C Transmission and Reception.
MSC1200
SBAS289E
www.ti.com
ACK
PS
(3)
DATA
(2)
ACK
(3)
STOP
Condition
(4)
23
CNTIF is generated and SCL is stretched by the MSC1200
until the I2CDATA register is written with a 0xFF
. The
H
ACK/NACK from the master can then be read.
Receive
Once address recognition, R/W determination, and
ACK/NACK are complete, I2CDATA must be written with
0xFF
to enable data reception. Upon completion of the data
H
shift, the MSC1200 generates the CNT interrupt and stretches
SCL. Received data can then be read from I2CDATA. After
the serial data has been received, ACK/NACK is generated
by writing 0x7F
(for ACK) or 0xFFH (for NACK) to I2CDATA.
H
The write to I2CDATA clears the CNT interrupt and clock
stretch.
MEMORY MAP
The MSC1200 contains on-chip SFR, Flash Memory,
Scratchpad RAM Memory, and Boot ROM. The SFR registers are primarily used for control and status. The standard
8051 features and additional peripheral features of the
MSC1200 are controlled through the SFR. Reading from
undefined SFR will return zero; writing to undefined SFR
registers is not recommended and may have indeterminate
effects.
Flash Memory is used for both Program Memory and Data
Memory. The user has the ability to select the partition size
of Program and Data Memories. The partition size is set
through hardware configuration bits, which are programmed
through serial programming. Both Program and Data Flash
Memories are erasable and writable (programmable) in user
application mode. However, program execution can only
occur from Program Memory. As an added precaution, a lock
feature can be activated through the hardware configuration
bits, which disables erase and writes to the first 4kB of
Program Flash Memory or the entire Program Flash Memory
in user application mode.
FLASH MEMORY
The MSC1200 uses a memory addressing scheme that
separates Program Memory from Data Memory. The program
and data segments can overlap since they are accessed by
different instructions. Program Memory is fetched by the
microcontroller automatically. There is one instruction (MOVC)
that is used to explicitly read the program area. This is commonly
used to read lookup tables.
The MSC1200 has three Hardware (HW) Configuration
registers (HCR0, HCR1, and HCR2) that are programmable
only during Flash Memory Programming mode.
The MSC1200 allows the user to partition the Flash Memory
between Program Memory and Data Memory. For instance,
the MSC1200Y3 contains 8kB of Flash Memory on-chip.
Through the HW configuration registers, the user can define
the partition between Program Memory (PM) and Data
Memory (DM), as shown in Tables III and IV and Figure 18.
The MSC1200 family offers two memory configurations.
It is important to note that the Flash Memory is readable and
writable (depending on the MXWS bit in the MWS SFR) by
the user through the MOVX instruction when configured as
either Program or Data Memory. This means that the user
may partition the device for maximum Flash Program Memory
size (no Flash Data Memory) and use Flash Program Memory
as Flash Data Memory. This may lead to undesirable behavior if the PC points to an area of Flash Program Memory that
is being used for data storage. Therefore, it is recommended
to use Flash partitioning when Flash Memory is used for data
storage. Flash partitioning prohibits execution of code from
Data Flash Memory. Additionally, the Program Memory erase/
write can be disabled through hardware configuration bits
(HCR0), while still providing access (read/write/erase) to
Data Flash Memory.
The effect of memory mapping on Program and Data Memory
is straightforward. The Program Memory is decreased in size
from the top of Flash Memory. To maintain compatibility with
the MSC121x, the Flash Data Memory maps to addresses
0400
. Therefore, access to Data Memory (through MOVX)
H
will access Flash Memory for the addresses shown in
Table IV.
Data Memory
The MSC1200 has on-chip Flash Data Memory, which is
readable and writable (depending on Memory Write Select
register) during normal operation (full V
range). This memory
DD
is mapped into the external Data Memory space, which
requires the use of the MOVX instruction to program. Note
that the page size is 64 bytes for both Program and Data
Memory and the page must be erased before it can be
written.
REGISTER MAP
The Register Map is illustrated in Figure 19. It is entirely
separate from the Program and Data Memory areas mentioned before. A separate class of instructions is used to
access the registers. There are 128 register locations. In
practice, the MSC1200 has 128 bytes of Scratchpad RAM
and up to 128 SFRs. Thus, a direct reference to one of the
upper 128 locations will be an SFR access. Direct RAM is
reached at locations 0 to 7F
FF
H
80
H
7F
H
00
H
(0 to 127).
H
Direct
Special Function
Registers
Direct
Scratchpad
RAM
255
128
127
0
SFRs are accessed directly between 80
and FFH (128 to
H
255). 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. Within the 128 bytes of
RAM, there are several special-purpose areas.
Bit Addressable Locations
In addition to direct register access, some individual bits are
also accessible. These are individually addressable bits in
both the RAM and SFR area. In the Scratchpad RAM area,
registers 20
(16 • 8) individual bits available to software. A bit access is
distinguished from a full-register access by the type of
instruction. In the SFR area, any register location ending in
a 0
or 8H is bit addressable. Figure 20 shows details of the
H
on-chip RAM addressing including the locations of individual
RAM bits.
to 2FH are bit addressable. This provides 128
H
7F
H
2F
7F 7E 7D 7C 7B 7A 79 78
H
2E
77 76 7574 73 7271 70
H
2D
6F 6E 6D 6C 6B 6A 69 68
H
2C
67 66 6564 63 6261 60
H
2B
5F 5E 5D 5C 5B 5A 59 58
H
2A
57 56 5554 53 5251 50
H
29
4F 4E 4D 4C 4B 4A 49 48
H
28
47 46 4544 43 4241 40
H
27
3F 3E 3D 3C 3B 3A 39 38
H
26
37 36 3534 33 3231 30
H
2F 2E 2D 2C 2B 2A 29 28
25
H
24
27 26 2524 23 2221 20
H
1F 1E 1D 1C 1B 1A 19 18
23
H
17 16 1514 13 1211 10
22
H
0F 0E 0D 0C 0B 0A 09 08
21
H
07 06 0504 03 0201 00
20
H
1F
H
18
H
17
H
10
H
0F
H
08
H
07
H
00
H
MSBLSB
Direct
RAM
Bank 3
Bank 2
Bank 1
Bank 0
Bit Addressable
FIGURE 19. Register Map.
MSC1200
SBAS289E
FIGURE 20. Scratchpad Register Addressing.
www.ti.com
25
Working Registers
As part of the lower 128 bytes of RAM, there are four banks
of Working Registers, as shown in Figure 20. The Working
Registers are general-purpose RAM locations that can be
addressed in a special way. They are designated R0 through
R7. Since there are four banks, the currently selected bank will
be used by any instruction using R0-R7. This allows software
to change context by simply switching banks. This is controlled
via the Program Status Word register (PSW; 0D0
) in the SFR
H
area described below. The 16 bytes immediately above the
R0-R7 registers are bit addressable. So any of the 128 bits in
this area can be directly accessed using bit addressable
instructions.
Stack
Another use of the Scratchpad area is for the programmer’s
stack. This area is selected using the Stack Pointer (SP; 81
SFR. Whenever a call or interrupt is invoked, the return
address is placed on the Stack. It also is available to the
programmer for variables, etc., since the Stack can be
moved and there is no fixed location within the RAM designated as Stack. The Stack Pointer will default to 07
The user can then move it as needed. The SP will point to the
on reset.
H
last used value. Therefore, the next value placed on the
Stack is put at SP + 1. Each PUSH or CALL will increment
the SP by the appropriate value. Each POP or RET will
decrement as well.
Program Memory
After reset, the CPU begins execution from Program Memory
location 0000
. The standard internal Program Memory size for
H
MSC1200 family members is shown in Table V. If enabled the
Boot ROM will appear from address F800
STANDARD INTERNAL
MODEL NUMBER PROGRAM MEMORY SIZE (BYTES)
MSC1200Y38k
MSC1200Y24k
to FBFFH.
H
TABLE V. MSC1200 Maximum Internal Program Memory Sizes.
)
H
Boot ROM
There is a 1kB Boot ROM that controls operation during serial
programming. Additionally, the Boot ROM routines shown in
Table VI can be accessed during the user mode if it is enabled.
When enabled, the Boot ROM routines will be located at
memory addresses F800
-FBFFH during user mode.
H
HEX ADDRESS ROUTINEC DECLARATIONSDESCRIPTION
F802sfr_rdchar sfr_rd(void);Return SFR value pointed to by CADDR
F805sfr_wrvoid sfr_wr(char d);Write to SFR pointed to by CADDR
FBD8monitor_isrvoid monitor_isr() interrupt 6;Push registers and call cmd_parser
FBDAcmd_parservoid cmd_parser(void);See SBAA076B.pdf
FBDCput_stringvoid put_string(char code *string);Output string
FBDEpage_erasechar page_erase (int faddr, char fdata, char fdm);Erase flash page
FBE0write_flashAssembly only; DPTR = address, ACC = dataFlash write
FBE2write_flash_chkchar write_flash_chk (int faddr, char fdata, char fdm);Write flash byte, verify
FBE4write_flash_bytevoid write_flash_byte (int faddr, char fdata);Write flash byte
FBE6faddr_data_readchar faddr_data_read(char faddr);Read HW config byte from faddr
FBE8data_x_c_readchar data_x_c_read(int faddr, char fdm);Read xdata or code byte
FBEAtx_bytevoid tx_byte(char);Send byte to USART0
FBECtx_hexvoid tx_hex(char);Send hex value to USART0
FBEEputxvoid putx(char);Send “x” to USART0 on R7 = 1
FBF0rx_bytechar rx_byte(void);Read byte from USART0
FBF2rx_byte_echochar rx_byte_echo(void);Read and echo byte on USART0
FBF4rx_hex_echochar rx_hex_echo(void);Read and echo hex on USART0
FBF6rx_hex_dbl_echoint rx_hex_dbl_echo(void);Read int as hex and echo: USART0
FBF8rx_hex_word_echoint rx_hex_word_echo(void);Read int reversed as hex and echo: USART0
FBFAautobaudvoid autobaud(void);Set baud with received CR
FBFCputspace1void putspace1(void);Output 1 space to USART0
FBFEputcrvoid putcr(void);Output CR, LF to USART0
NOTES: (1) CADDR must be set using the faddr_data_read routine.
(2) MWS register (SFR 8FH) defines Data Memory or Program Memory write.
(3) SFR registers CKCON and TCON must be initialized: CKCON = 0x10 and TCON = 0x00.
(2)
(2)
(1)
(3)
TABLE VI. MSC1200 Boot ROM Routines.
(1)
26
www.ti.com
MSC1200
SBAS289E
Serial Flash Programming Mode
Two methods of programming are available: serial programming mode and user application mode. Serial programming
mode is initiated by holding the P1.0/PROG
POR, as shown in Figure 21. User Application mode also
allows for Flash programming. Code execution from Flash
Memory cannot occur in this mode while programming, but
code execution can occur from Boot ROM while programming.
pin low during
INTERRUPTS
The MSC1200 uses a three-priority interrupt system. As
shown in Table VII, each interrupt source has an independent priority bit, flag, interrupt vector, and enable (except that
nine interrupts share the Auxiliary Interrupt (AI) at the highest
priority). In addition, interrupts can be globally enabled or
disabled. The interrupt structure is compatible with the original 8051 family. All of the standard interrupts are available.
MSC1200
P3.0/RxD0
P3.1/TxD0
P1.0/PROG
Programmer
HARDWARE CONFIGURATION MEMORY
The 64 configuration bytes can only be written during the
program mode. The bytes are accessed through SFR registers CADDR (SFR 93
) and CDATA (SFR 94H). Three of the
H
configuration bytes control Flash partitioning and system
NOTE: For user application mode, avoid heavy loading on
P1.0/PROG, which may result in erroneously entering serial
programming mode on power-up.
control. If the security bit is set, these bits cannot be changed
except with a Mass Erase command that erases all of the
Flash Memory including the 64 configuration bytes.
NOTES: (1) These interrupts set the AI flag (EICON.4) and are enabled by EAI (EICON.5). (2) If edge triggered, cleared automatically by hardware when the
service routine is vectored to. If level triggered, the flag follows the state of the pin. (3) Cleared automatically by hardware when interrupt vector occurs.
(4) Globally enabled by EA (IE.7).
TABLE VII. Interrupt Summary.
MSC1200
SBAS289E
www.ti.com
27
Hardware Configuration Register 0 (HCR0)—Accessed Using SFR Registers CADDR and CDATA.
bit 7bit 6bit 5bit 4bit 3bit 2bit 1bit 0
CADDR 3F
To read this register during normal operation, refer to the register descriptions for CADDR and CDATA.
bit 70: After reset in programming modes, Flash Memory can only be accessed in UAM mode until a mass erase is done.
PMLProgram Memory Lock (PML has Priority Over RSL).
bit 60: Enable all Flash Programming Modes in Program Memory; can be written in UAM.
RSLReset Sector Lock. The reset sector can be used to provide another method of Flash Memory programming. This
bit 5will allow Program Memory updates without changing the jumpers for in-circuit code updates or program
EBREnable Boot ROM. Boot ROM is 1kB of code located in ROM, not to be confused with the 4kB Boot Sector located
bit 4in Flash Memory.
EPMAPMLRSLEBREWDR1DFSEL1DFSEL0
H
1: Fully Accessible (default)
1: Enable read only for Program Memory; cannot be written in UAM (default).
development. The code in this boot sector would then provide the monitor and programming routines with the ability
to jump into the main Flash code when programming is finished.
0: Enable Reset Sector Writing
1: Enable Read Only Mode for Reset Sector (4kB) (default)
0: Disable Internal Boot ROM
1: Enable Internal Boot ROM (default)
EWDREnable Watchdog Reset.
bit 30: Disable Watchdog Reset
1: Enable Watchdog Reset (default)
DFSEL1-0 Data Flash Memory Size (see Table II).
bits 1-000: 4kB Data Flash Memory (MSC1200Y3 Only)
01: 2kB Data Flash Memory
10: 1kB Data Flash Memory
11: No Data Flash Memory (default)
28
www.ti.com
MSC1200
SBAS289E
Hardware Configuration Register 1 (HCR1)
7654321 0
CADDR 3E
H
11111DDB1 1
To read this register during normal operation, refer to the register descriptions for CADDR and CDATA.
DDBDisable Digital Brownout Detection
bit 20: Enable Digital Brownout Detection (2.7V)
1: Disable Digital Brownout Detection (default)
Hardware Configuration Register 2 (HCR2)
7654321 0
CADDR 3D
H
To read this register during normal operation, refer to the register descriptions for CADDR and CDATA.
Certain key functions such as Brownout Reset and Watchdog Timer are controlled by the hardware configuration bits. These
bits are nonvolatile and can only be changed through serial flash programming. Other peripheral control and status functions,
such as ADC configuration timer setup, and Flash control are controlled through the SFRs.
CB
CC
CD
CE
CF
D0
D1
D2
D3
D4
D5
D6
D7
D8
D9
DA
DB
DC
DD
DE
DF
E0
E1
E2
E3
E4
E5
E6
E7
E8
E9
EA
EB
EC
ED
EE
EF
F0
F1
F2
F3
F4
F5
F6
F7
F8
F9
FA
FB
FC
FD
FE
FF
SP.7-0Stack Pointer. The stack pointer identifies the location where the stack will begin. The stack pointer is incremented before
bit s 7- 0every PUSH or CALL operation and decremented after each POP or RET/RETI. This register defaults to 07
DPL0.7-0 Data Pointer Low 0. This register is the low byte of the standard 8051 16-bit data pointer. DPL0 and DPH0
bits 7-0are used to point to non-scratchpad data RAM. The current data pointer is selected by DPS (SFR 86
DPH0.7-0 Data Pointer High 0. This register is the high byte of the standard 8051 16-bit data pointer. DPL0 and DPH0
bits 7-0are used to point to non-scratchpad data RAM. The current data pointer is selected by DPS (SFR 86
DPH1.7-0 Data Pointer High. This register is the high byte of the auxiliary 16-bit data pointer. When the SEL bit (DPS.0)
bits 7-0(SFR 86
) is set, DPL1 and DPH1 are used in place of DPL0 and DPH0 during DPTR operations.
H
Data Pointer Select (DPS)
76543210Reset Value
SFR 86
H
SELData Pointer Select. This bit selects the active data pointer.
bit 00: Instructions that use the DPTR will use DPL0 and DPH0.
0000000SEL00
1: Instructions that use the DPTR will use DPL1 and DPH1.
H
32
www.ti.com
MSC1200
SBAS289E
Power Control (PCON)
76543210Reset Value
SFR 87
H
SMOD011GF1GF0STOPIDLE30
H
SMODSerial Port 0 Baud Rate Doubler Enable. The serial baud rate doubling function for Serial Port 0.
bit 70: Serial Port 0 baud rate will be a standard baud rate.
1: Serial Port 0 baud rate will be double that defined by baud rate generation equation.
GF1General-Purpose User Flag 1. This is a general-purpose flag for software control.
bit 3
GF0General-Purpose User Flag 0. This is a general-purpose flag for software control.
bit 2
STOPStop Mode Select. Setting this bit will halt the oscillator and block external clocks. This bit will always read as a 0.
bit 1Exit with RESET. In this mode, internal peripherals are frozen and I/O pins are held in their current state. The ADC
is frozen, but IDAC and VREF remain active.
IDLEIdle Mode Select. Setting this bit will freeze the CPU, Timer 0 and 1, and the USART; other peripherals remain
bit 0active. This bit will always be read as a 0. Exit with AIE (A6
) and EWU (C6H) interrupts (refer to Figure 4 for clocks
H
affected during IDLE).
Timer/Counter Control (TCON)
76543210Reset Value
SFR 88
H
TF1TR1TF0TR0IE1IT1IE0IT000
H
TF1Timer 1 Overflow Flag. This bit indicates when Timer 1 overflows its maximum count as defined by the current
bit 7mode. 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.
TR1Timer 1 Run Control. This bit enables/disables the operation of Timer 1. Halting this timer will preserve the
current bit 6 count in TH1, TL1.
0: Timer is halted.
1: Timer is enabled.
TF0Timer 0 Overflow Flag. This bit indicates when Timer 0 overflows its maximum count as defined by the current
bit 5mode. This bit can be cleared by software and is automatically cleared when the CPU vectors to the Timer 0
interrupt service routine.
0: No Timer 0 overflow has been detected.
1: Timer 0 has overflowed its maximum count.
TR0Timer 0 Run Control. This bit enables/disables the operation of Timer 0. Halting this timer will preserve the
bit 4current count in TH0, TL0.
0: Timer is halted.
1: Timer is enabled.
IE1Interrupt 1 Edge Detect. This bit is set when an edge/level of the type defined by IT1 is detected. If IT1 = 1, this
bit 3bit will remain set until cleared in software or the start of the External Interrupt 1 service routine. If IT1 = 0, this
bit will inversely reflect the state of the
IT1Interrupt 1 Type Select. This bit selects whether the
bit 20:
INT1
is level triggered.
1:
INT1
is edge triggered.
INT1
pin.
INT1
pin will detect edge or level triggered interrupts.
IE0Interrupt 0 Edge Detect. This bit is set when an edge/level of the type defined by IT0 is detected. If IT0 = 1, this
bit 3bit will remain set until cleared in software or the start of the External Interrupt 0 service routine. If IT0 = 0, this
bit will inversely reflect the state of the
INT0
pin.
IT0Interrupt 0 Type Select. This bit selects whether the
bit 20:
INT0
is level triggered.
1:
INT0
is edge triggered.
MSC1200
SBAS289E
www.ti.com
INT0
pin will detect edge or level triggered interrupts.
33
Timer Mode Control (TMOD)
765432 10
SFR 89
GATEC/TM1M0GATEC/TM1M000
H
GATETimer 1 Gate Control. This bit enables/disables the ability of Timer 1 to increment.
bit 70: Timer 1 will clock when TR1 = 1, regardless of the state of pin
1: Timer 1 will clock only when TR1 = 1 and pin
TIMER 1TIMER 0Reset Value
INT1
.
INT1
= 1.
H
C/T
Timer 1 Counter/Timer Select.
bit 60: Timer is incremented by internal clocks.
1: Timer is incremented by pulses on T1 pin when TR1 (TCON.6, SFR 88
) is 1.
H
M1, M0Timer 1 Mode Select. These bits select the operating mode of Timer 1.
bits 5-4
M1M0MODE
00Mode 0: 8-bit counter with 5-bit prescale.
01Mode 1: 16 bits.
10Mode 2: 8-bit counter with auto reload.
11Mode 3: Two 8-bit counters.
GATETimer 0 Gate Control. This bit enables/disables the ability of Timer 0 to increment.
bit 30: Timer 0 will clock when TR0 = 1, regardless of the state of pin
C/T
1: Timer 0 will clock only when TR0 = 1 and pin
Timer 0 Counter/Timer Select.
INT0
= 1 (hardware control).
INT0
(software control).
bit 20: Timer is incremented by internal clocks.
1: Timer is incremented by pulses on pin T0 when TR0 (TCON.4, SFR 88
) is 1.
H
M1, M0Timer 0 Mode Select. These bits select the operating mode of Timer 0.
bits 1-0
M1M0MODE
00Mode 0: 8-bit counter with 5-bit prescale.
01Mode 1: 16 bits.
10Mode 2: 8-bit counter with auto reload.
11Mode 3: Two 8-bit counters.
Timer 0 LSB (TL0)
76543210Reset Value
SFR 8A
H
TL0.7TL0.6TL0.5TL0.4TL0.3TL0.2TL0.1TL0.000
TL0.7-0Timer 0 LSB. This register contains the least significant byte of Timer 0.
bits 7-0
Timer 1 LSB (TL1)
76543210Reset Value
SFR 8B
H
TL1.7TL1.6TL1.5TL1.4TL1.3TL1.2TL1.1TL1.000
TL1.7-0Timer 1 LSB. This register contains the least significant byte of Timer 1.
bits 7-0
Timer 0 MSB (TH0)
76543210Reset Value
SFR 8C
TH0.7-0Timer 0 MSB. This register contains the most significant byte of Timer 0.
bits 7-0
TH0.7TH0.6TH0.5TH0.4TH0.3TH0.2TH0.1TH0.000
H
H
H
H
34
www.ti.com
MSC1200
SBAS289E
Timer 1 MSB (TH1)
76543210Reset Value
SFR 8D
TH1.7TH1.6TH1.5TH1.4TH1.3TH1.2TH1.1TH1.000
H
H
TH1.7-0Timer 1 MSB. This register contains the most significant byte of Timer 1.
bits 7-0
Clock Control (CKCON)
76543210Reset Value
SFR 8E
H
T1MTimer 1 Clock Select. This bit controls the division of the system clock that drives Timer 1. Clearing this bit to 0
bit 4maintains 8051 compatibility. This bit has no effect on instruction cycle timing.
T0MTimer 0 Clock Select. This bit controls the division of the system clock that drives Timer 0. Clearing this bit to 0
bit 3maintains 8051 compatibility. This bit has no effect on instruction cycle timing.
000T1MT0MMD2MD1MD001
0: Timer 1 uses a divide by 12 of the crystal frequency.
1: Timer 1 uses a divide by 4 of the crystal frequency.
0: Timer 0 uses a divide by 12 of the crystal frequency.
1: Timer 0 uses a divide by 4 of the crystal frequency.
H
MD2, MD1, MD0
bit 3does not allow external memory access, these bits should be set to 000
Stretch MOVX Select. These bits select the time by which MOVX cycles are to be stretched. Since the MSC1200
to allow for the fastest flash data memory
B
access.
76543210Reset Value
SFR 8F
H
00 0 0 0 0 0MXWS 00
H
Memory Write Select (MWS)
MXWSMOVX Write Select. This allows writing to the internal Flash program memory.
bit 00: No writes are allowed to the internal Flash program memory.
1: Writing is allowed to the internal Flash program memory, unless PML (HCR0) or RSL (HCR0) are on.
Port 1 (P1)
76543210Reset Value
SFR 90
H
P1.7-0General-Purpose I/O Port 1. This register functions as a general-purpose I/O port. In addition, all the pins have
bits 7-0an alternative function listed below. Each of the functions is controlled by several other SFRs. The associated Port
INT5
bit 7
INT4External Interrupt 4. A rising edge on this pin will cause an external interrupt 4 if enabled.
bit 6
P1.7P1.6P1.5P1.4P1.3P1.2P1.1P1.0FF
INT5
INT4
INT3
INT2/
SS
DINDOUT
PROG
H
1 latch bit must contain a logic ‘1’ before the pin can be used in its alternate function capacity. To use the alternate
function, set the appropriate mode in P1DDRL (SFR AE
), P1DDRH (SFR AFH).
H
External Interrupt 5.A falling edge on this pin will cause an external interrupt 5 if enabled.
INT3
External Interrupt 3. A falling edge on this pin will cause an external interrupt 3 if enabled.
bit 5
INT2/
SS
bit 4as slave select (
External Interrupt 2. A rising edge on this pin will cause an external interrupt 2 if enabled. This pin can be used
SS
) in SPI slave mode.
DINSerial Data In. This pin receives serial data in SPI and I
bit 3as an input) or standard 8051.
DOUTSerial Data Out. This pin transmits serial data in SPI and I
bit 2as an open drain) or standard 8051.
PROG
Program Mode. When this pin is pulled low at power-up, the device enters Serial Programming mode (refer to
bi t 0Figure B).
MSC1200
SBAS289E
www.ti.com
2
C modes (in I2C mode, this pin should be configured
2
C modes (in I2C mode, this pin should be configured
35
External Interrupt Flag (EXIF)
76543210Reset Value
SFR 91
H
IE5IE4IE3IE2100008
H
IE5External Interrupt 5 Flag. This bit will be set when a falling edge is detected on
INT5
. This bit must be
bit 7cleared manually by software. Setting this bit in software will cause an interrupt if enabled.
IE4External Interrupt 4 Flag. This bit will be set when a rising edge is detected on INT4. This bit must be cleared
bit 6manually by software. Setting this bit in software will cause an interrupt if enabled.
IE3External Interrupt 3 Flag. This bit will be set when a falling edge is detected on
INT3
. This bit must be cleared
bit 5manually by software. Setting this bit in software will cause an interrupt if enabled.
IE2External Interrupt 2 Flag. This bit will be set when a rising edge is detected on INT2. This bit must be cleared
bit 4manually by software. Setting this bit in software will cause an interrupt if enabled.
CADDRConfiguration Address Register. This register supplies the address for reading bytes in the 64 bytes of Flash Configuration
bi ts 7 -0Memory. A lways use the Boot ROM CADDR access routine. This register is also used for SFR read and write
routines.
WARNING: If this register is written to while executing from Flash Memory, the CDATA register will be incorrect.
Configuration Data Register (CDATA)
76543210Reset Value
SFR 94
H
00
H
CDATAConfiguration Data Register. This register will contain the data in the 64 bytes of Flash Configuration Memory
bits 7-0that is located at the last written address in the CADDR register. This is a read-only register.
36
www.ti.com
MSC1200
SBAS289E
Serial Port 0 Control (SCON0)
76543210Reset Value
SFR 98
SM0-2Serial Port 0 Mode. These bits control the mode of serial Port 0. Modes 1, 2, and 3 have 1 start and 1 stop bit
bits 7-5in addition to the 8 or 9 data bits.
REN_0Receive Enable. This bit enables/disables the serial Port 0 received shift register.
bit 40: Serial Port 0 reception disabled.
TB8_09th Transmission Bit State. This bit defines the state of the 9th transmission bit in serial Port 0 modes 2 and 3.
bit 3
SM0_0SM1_0SM2_0REN_0TB8_0RB8_0TI_0RI_000
H
MODE SM0 SM1 SM2 FUNCTIONLENGTH PERIOD
32 p
32 p
CLK
CLK
CLK
CLK
CLK
CLK
(1)
(1)
(1)
(SMOD = 0)
(1)
(SMOD = 1)
(1)
(SMOD = 0)
(1)
(SMOD = 1)
0000Synchronous8 bits12 p
0001Synchronous8 bits4 p
2101Asynchronous with Multiprocessor Communication11 bits64 p
3110Asynchronous11 bits Timer 1 Baud Rate Equation
3111Asynchronous with Multiprocessor Communication
NOTES: (1) p
is received. (3) RI_0 will not be activated if bit 9 = 0.
will be equal to t
CLK
, except that p
CLK
will stop for IDLE. (2) RI_0 will only be activated when a valid stop
CLK
(2)
10 bits Timer 1 Baud Rate Equation
(3)
11 bits Timer 1 Baud Rate Equation
1: Serial Port 0 received enabled (modes 1, 2, and 3). Initiate synchronous reception (mode 0).
H
RB8_09th Received Bit State. This bit identifies the state of the 9th reception bit of received data in serial Port 0 modes
bit 22 and 3. In serial port mode 1, when SM2_0 = 0, RB8_0 is the state of the stop bit. RB8_0 is not used in mode 0.
TI_0Transmitter Interrupt Flag. This bit indicates that data in the serial Port 0 buffer has been completely shifted
bit 1out. In serial port mode 0, TI_0 is set at the end of the 8th data bit. In all other modes, this bit is set at the end
of the last data bit. This bit must be manually cleared by software.
RI_0Receiver Interrupt Flag. This bit indicates that a byte of data has been received in the serial Port 0 buffer. In
bit 0serial port mode 0, RI_0 is set at the end of the 8th bit. In serial port mode 1, RI_0 is set after the last sample
of the incoming stop bit subject to the state of SM2_0. In modes 2 and 3, RI_0 is set after the last sample of
RB8_0. This bit must be manually cleared by software.
Serial Data Buffer 0 (SBUF0)
76543210Reset Value
SFR 99
H
SBUF0Serial Data Buffer 0. Data for Serial Port 0 is read from or written to this location. The serial transmit and
bits 7-0receive buffers are separate registers, but both are addressed at this location.
00
H
MSC1200
SBAS289E
www.ti.com
37
SPI Control (SPICON) (SERSEL bit determines SPICON control)
76543210Reset Value
SFR 9A
SBIT3-0Serial Bit Count. Number of bits transferred (read only).
bits 7-4
ORDERSet Bit Order for Transmit and Receive.
bit 30: Most Significant Bits First
CPHASerial Clock Phase Control.
bit 20: Valid data starting from half SCK period before the first edge of SCK
ESSEnable Slave Select.
bit 10:
SBIT3SBIT2SBIT1SBIT0ORDERCPHAESSCPOL00
H
SBIT3:0COUNT
0x000
0x011
0x032
0x023
0x064
0x075
0x056
0x047
0x0C8
1: Least Significant Bits First
1: Valid data starting from the first edge of SCK
SS
(P1.4) is configured as a general-purpose I/O (default).
1:
SS
(P1.4) is configured as SS for SPI mode. DOUT (P1.2) drives when SS is low, and DOUT (P1.2) is high-
impedance when
SS
is high.
H
CPOLSerial Clock Polarity.
bit 00: SCK idle at logic LOW
1: SCK idle at logic HIGH
I2C Control (I2CCON) (SERSEL bit determines I2CCON control)
76543210Reset Value
SFR 9A
SBIT3-0Serial Bit Count. Number of bits transferred (read only).
bits 7-4
STOPStop-Bit Status.
bit 30: No Stop
STARTStart-Bit Status.
bit 20: No Stop
SBIT3SBIT2SBIT1SBIT0STOPSTARTDCSCNTSEL00
H
SBIT3:0COUNT
0x000
0x011
0x032
0x023
0x064
0x075
0x056
0x047
0x0C8
1: Stop Condition Received and I2CCNT set (cleared on write to I2CDATA)
1: Start or Repeated Start Condition Received and I2CCNT set (cleared on write to I2CDATA)
H
38
www.ti.com
MSC1200
SBAS289E
DCSDisable Serial Clock Stretch.
bit 10: Enable SCL Stretch (cleared by firmware or START condition)
1: Disable SCL Stretch
CNTSELCounter Select.
bit 00: Counter IRQ Set for Bit Counter = 8 (default)
1: Counter IRQ Set for Bit Counter = 1
SPI Data Register (SPIDATA) / I2C Data Register (I2CDATA)
76543210Reset Value
SFR 9B
H
00
H
SPIDATASPI Data Register. Data for SPI is read from or written to this location. The SPI transmit and receive buffers
bits 7-0are separate registers, but both are addressed at this location.
I2CDATAI2C Data Register. Data for I
2
C is read from or written to this location. The I2C transmit and receive buffers
bits 7-0are separate registers, but both are addressed at this location.
Auxilliary Interrupt Poll (AIPOL)
76543210Reset Value
SFR A4
SECIPSecond System Timer Interrupt Poll (before IRQ masking).
bit 70 = Seconds System Timer Interrupt Poll Inactive
MSECIPMillisecond System Timer Interrupt Poll (before IRQ masking).
bits 40 = Millisecond System Timer Interrupt Poll Inactive
1 = Millisecond System Timer Interrupt Poll Active
I2CIPI
bits 30 = I
2
C Interrupt Poll (before IRQ masking).
2
C Interrupt Poll Inactive
2
1 = I
C Interrupt Poll Active
CNTIPSerial Bit Count Interrupt Poll (before IRQ masking).
bits 20 = Serial Bit Count Interrupt Poll Inactive
1 = Serial Bit Count Interrupt Poll Active
ALVDIPAnalog Low Voltage Detect Interrupt Poll (before IRQ masking).
bits 10 = Analog Low Voltage Detect Interrupt Poll Inactive
1 = Analog Low Voltage Detect Interrupt Poll Active
MSC1200
SBAS289E
www.ti.com
39
Pending Auxiliary Interrupt (PAI)
76543210Reset Value
SFR A5
H
0000PAI3PAI2PAI1PAI000
H
PAIPending Auxiliary Interrupt Register. The results of this register can be used as an index to vector to the appropriate
bits 3-0interrupt routine. All of these interrupts vector through address 0033
PAI3PAI2PAI1PAI0AUXILIARY INTERRUPT STATUS
0000No Pending Auxiliary IRQ
0001Reserved
0010Analog Low Voltage Detect IRQ and Possible Lower Priority Pending
0011I
0100Serial Bit Count Interrupt and Possible Lower Priority Pending
0101Millisecond System Timer IRQ and Possible Lower Priority Pending
0110ADC IRQ and Possible Lower Priority Pending
0111Accumulator IRQ and Possible Lower Priority Pending
1000Second System Timer IRQ and Possible Lower Priority Pending
2
C IRQ and Possible Lower Priority Pending
.
H
Auxiliary Interrupt Enable (AIE)
76543210Reset Value
SFR A6
Interrupts are enabled by EICON.4 (SFR D8H). The other interrupts are controlled by the IE and EIE registers.
ESECESUMEADCEMSECEI2CECNTEALV000
H
H
ESECEnable Second System Timer Interrupt (lowest priority auxiliary interrupt).
bit 7Write: Set mask bit for this interrupt; 0 = masked, 1 = enabled.
Read: Second Timer Interrupt mask.
ESUMEnable Summation Interrupt.
bit 6Write: Set mask bit for this interrupt; 0 = masked, 1 = enabled.
Read: Summation Interrupt mask.
EADCEnable ADC Interrupt.
bit 5Write: Set mask bit for this interrupt; 0 = masked, 1 = enabled.
Read: ADC Interrupt mask.
EMSECEnable Millisecond System Timer Interrupt.
bit 4Write: Set mask bit for this interrupt; 0 = masked, 1 = enabled.
Read: Millisecond System Timer Interrupt mask.
EI2CEnable I
2
C Start/Stop Bit.
bit 3Write: Set mask bit for this interrupt; 0 = masked, 1 = enabled.
2
Read: I
C Start/Stop Bit mask.
ECNTEnable Serial Bit Count Interrupt.
bit 2Write: Set mask bit for this interrupt; 0 = masked, 1 = enabled.
Read: Serial Bit Count Interrupt mask.
EALVEnable Analog Low Voltage Interrupt.
bit 1Write: Set mask bit for this interrupt; 0 = masked, 1 = enabled.
Read: Analog Low Voltage Detect Interrupt mask.
40
www.ti.com
MSC1200
SBAS289E
Auxiliary Interrupt Status Register (AISTAT)
76543210Reset Value
SFR A7
H
SECSecond System Timer Interrupt Status Flag (lowest priority AI).
bit 70: SEC Interrupt cleared or masked.
SUMSummation Register Interrupt Status Flag.
bit 60: SUM Interrupt cleared or masked.
ADCADC Interrupt Status Flag.
bit 50: ADC Interrupt cleared or masked.
MSECMillisecond System Timer Interrupt Status Flag.
bit 40: MSEC Interrupt cleared or masked.
I2CI2C Start/Stop Interrupt Status Flag.
bit 30: I
CNTCNT Interrupt Status Flag.
bit 20: CNT Interrupt cleared or masked.
ALVDAnalog Low Voltage Detect Interrupt Status Flag.
bit 10: ALVD Interrupt cleared or masked.
NOTE: If an interrupt is masked, the status can be read in AIPOL, SFR A4
SECSUMADCMSECI2CCNTALVD000
1: SEC Interrupt active (it is cleared by reading SECINT, SFR F9
H
1: SUM Interrupt active (it is cleared by reading the lowest byte of SUMR0, SFR E2
1: ADC Interrupt active (it is cleared by reading the lowest byte of ADRESL, SFR D9
written to the ADC Results registers).
1: MSEC Interrupt active (it is cleared by reading MSINT, SFR FA
2
C Start/stop Interrupt cleared or masked.
2
1: I
C Start/stop Interrupt active (it is cleared by writing to I2CDATA, SFR 9BH).
1: CNT Interrupt active (it is cleared by reading from or writing to SPIDATA/I2CDATA, SFR 9B
1: ALVD Interrupt active (cleared in HW if AV
exceeds ALVD threshold).
DD
.
H
H
).
).
H
; if active, no new data will be
H
).
H
).
H
76543210Reset Value
SFR A8
H
EA00ES0ET1EX1ET0EX000
H
Interrupt Enable (IE)
EAGlobal Interrupt Enable. This bit controls the global masking of all interrupts except those in AIE (SFR A6H).
bit 70: Disable interrupt sources. This bit overrides individual interrupt mask settings for this register.
1: Enable all individual interrupt masks. Individual interrupts in this register will occur if enabled.
ES0Enable Serial port 0 interrupt. This bit controls the masking of the serial Port 0 interrupt.
bit 40: Disable all serial Port 0 interrupts.
1: Enable interrupt requests generated by the RI_0 (SCON0.0, SFR 98
ET1Enable Timer 1 Interrupt. This bit controls the masking of the Timer 1 interrupt.
bit 30: Disable Timer 1 interrupt.
1: Enable interrupt requests generated by the TF1 flag (TCON.7, SFR 88
EX1Enable External Interrupt 1. This bit controls the masking of external interrupt 1.
bit 20: Disable external interrupt 1.
1: Enable interrupt requests generated by the
INT1
pin.
ET0Enable Timer 0 Interrupt. This bit controls the masking of the Timer 0 interrupt.
bit 10: Disable all Timer 0 interrupts.
1: Enable interrupt requests generated by the TF0 flag (TCON.5, SFR 88
EX0Enable External Interrupt 0. This bit controls the masking of external interrupt 0.
bit 00: Disable external interrupt 0.
P3.7-0General-Purpose I/O Port 3. This register functions as a general-purpose I/O port. In addition, all the pins have
bits 7-0an alternative function listed below. Each of the functions is controlled by several other SFRs. The associated
P3.7P3.6P3.5P3.4P3.3P3.2P3.1P3.0FF
SCK/SCL/CLKS
T1T0
INT1
INT0
TXD0RXD0
Port 3 latch bit must contain a logic ‘1’ before the pin can be used in its alternate function capacity.
H
SCK/SCL/CLKS
Clock Source Select. Refer to PASEL (SFR F2H).
bit 6
T1Timer/Counter 1 External Input. A 1 to 0 transition on this pin will increment Timer 1.
bit 5
T0Timer/Counter 0 External Input. A 1 to 0 transition on this pin will increment Timer 0.
bit 4
INT1
External Interrupt 1. A falling edge/low level on this pin will cause an external interrupt 1 if enabled.
bit 3
INT0
External Interrupt 0. A falling edge/low level on this pin will cause an external interrupt 0 if enabled.
bit 2
TXD0Serial Port 0 Transmit. This pin transmits the serial Port 0 data in serial port modes 1, 2, 3, and emits the
bit 1synchronizing clock in serial port mode 0.
RXD0Serial Port 0 Receive. This pin receives the serial Port 0 data in serial port modes 1, 2, 3, and is a bidirectional
= IDAC • 3.8µA (~1mA full-scale). Setting (PDCON.PDIDAC) will shut down IDAC and float the IDAC pin.
OUT
Interrupt Priority (IP)
76543210Reset Value
SFR B8
H
PS0Serial Port 0 Interrupt. This bit controls the priority of the serial Port 0 interrupt.
bit 40 = Serial Port 0 priority is determined by the natural priority order.
PT1Timer 1 Interrupt. This bit controls the priority of the Timer 1 interrupt.
bit 30 = Timer 1 priority is determined by the natural priority order.
PX1External Interrupt 1. This bit controls the priority of external interrupt 1.
bit 20 = External interrupt 1 priority is determined by the natural priority order.
PT0Timer 0 Interrupt. This bit controls the priority of the Timer 0 interrupt.
bit 10 = Timer 0 priority is determined by the natural priority order.
PX0External Interrupt 0. This bit controls the priority of external interrupt 0.
bit 00 = External interrupt 0 priority is determined by the natural priority order.
100PS0PT1PX1PT0PX080
1 = Serial Port 0 is a high priority interrupt.
1 = Timer 1 priority is a high priority interrupt.
1 = External interrupt 1 is a high priority interrupt.
1 = Timer 0 priority is a high priority interrupt.
1 = External interrupt 0 is a high priority interrupt.
00
H
H
44
www.ti.com
MSC1200
SBAS289E
Enable Wake Up (EWU) Waking Up from IDLE Mode
76543210Reset Value
SFR C6
H
—— — — —EWUWDTEWUEX1EWUEX000
Auxiliary interrupts will wake up from IDLE. They are enabled with EAI (EICON.5).
EWUWDTEnable Wake Up Watchdog Timer. Wake up using watchdog timer interrupt.
bit 20 = Don’t wake up on watchdog timer interrupt.
1 = Wake up on watchdog timer interrupt.
EWUEX1Enable Wake Up External 1. Wake up using external interrupt source 1.
bit 10 = Don’t wake up on external interrupt source 1.
1 = Wake up on external interrupt source 1.
EWUEX0Enable Wake Up External 0. Wake up using external interrupt source 0.
bit 00 = Don’t wake up on external interrupt source 0.
1 = Wake up on external interrupt source 0.
System Clock Divider Register (SYSCLK)
76543210Reset Value
SFR C7
H
DIVMOD1-0 Clock Divide Mode
bits 5-4Write:
00DIVMOD1DIVMOD00DIV2DIV1DIV000
DIVMODDIVIDE MODE
00Normal mode (default, no divide)
01Immediate mode: start divide immediately, return to Normal mode on IDLE wakeup condition or Normal mode write.
10Delay mode: same as Immediate mode, except that the mode changes with the millisecond interrupt (MSINT). If MSINT is
enabled, the divide will start on the next MSINT and return to normal mode on the following MSINT. If MSINT is not
enabled, the divide will start on the next MSINT condition (even if masked) but will not leave the divide mode until the
MSINT counter overflows, which follows a wakeup condition. Can exit on Normal mode write.
11Manual mode: start divide immediately; exit mode only on write to DIVMOD.
H
H
Read:
DIVMODDIVISION MODE STATUS
00No divide
01Divider is in Immediate mode
10Divider is in Delay mode
11Reserved
DIV2-0Divide Mode
bit 2-0
DIVDIVISOR
000Divide by 2 (default)f
001Divide by 4f
010Divide by 8f
011Divide by 16f
100Divide by 32f
101Divide by 1024f
110Divide by 2048f
111Divide by 4096f
CLK
CLK
CLK
CLK
CLK
CLK
CLK
CLK
= f
= f
= f
= f
= f
= f
= f
= f
SYS
SYS
SYS
SYS
SYS
SYS
SYS
SYS
/2
/4
/8
/16
/32
/1024
/2048
/4096
MSC1200
SBAS289E
www.ti.com
45
Program Status Word (PSW)
76543210Reset Value
SFR D0
H
CYCarry Flag. This bit is set when the last arithmetic operation resulted in a carry (during addition) or a borrow
bit 7(during subtraction). Otherwise it is cleared to 0 by all arithmetic operations.
ACAuxiliary Carry Flag. This bit is set to 1 if the last arithmetic operation resulted in a carry into (during addition),
bit 6or a borrow (during substraction) from the high order nibble. Otherwise it is cleared to 0 by all arithmetic
F0User Flag 0. This is a bit-addressable, general-purpose flag for software control.
bit 5
RS1, RS0Register Bank Select 1-0. These bits select which register bank is addressed during register accesses.
bits 4-3
OVOverflow Flag. This bit is set to 1 if the last arithmetic operation resulted in a carry (addition), borrow
bit 2(subtraction), or overflow (multiply or divide). Otherwise it is cleared to 0 by all arithmetic operations.
F1User Flag 1. This is a bit-addressable, general-purpose flag for software control.
bit 1
CYACF0RS1RS0OVF1P00
operations.
RS1RS0 REGISTER BANK ADDRESS
00000
01108H-0F
10210H-17
11318H-1F
-07
H
H
H
H
H
H
PParity Flag. This bit is set to 1 if the modulo-2 sum of the 8 bits of the accumulator is 1 (odd parity); and
bit 0cleared to 0 on even parity.
ADC Offset Calibration Register Low Byte (OCL)
76543210Reset Value
SFR D1
H
LSB00
H
OCLADC Offset Calibration Register Low Byte. This is the low byte of the 24-bit word that contains the
bits 7-0ADC offset calibration. A value which is written to this location will set the ADC offset calibration value.
ADC Offset Calibration Register Middle Byte (OCM)
76543210Reset Value
SFR D2
H
00
H
OCMADC Offset Calibration Register Middle Byte. This is the middle byte of the 24-bit word that contains the ADC
bits 7-0offset calibration. A value which is written to this location will set the ADC offset calibration value.
ADC Offset Calibration Register High Byte (OCH)
76543210Reset Value
SFR D3
H
OCHADC Offset Calibration Register High Byte. This is the high byte of the 24-bit word that contains the
bits 7-0ADC offset calibration. A value which is written to this location will set the ADC offset calibration value.
MSB00
H
46
www.ti.com
MSC1200
SBAS289E
ADC Gain Calibration Register Low Byte (GCL)
76543210Reset Value
SFR D4
H
LSB5A
H
GCLADC Gain Calibration Register Low Byte. This is the low byte of the 24-bit word that contains the ADC
bits 7-0gain calibration. A value which is written to this location will set the ADC gain calibration value.
ADC Gain Calibration Register Middle Byte (GCM)
76543210Reset Value
SFR D5
H
EC
H
GCMADC Gain Calibration Register Middle Byte. This is the middle byte of the 24-bit word that contains
bits 7-0the ADC gain calibration. A value which is written to this location will set the ADC gain calibration value.
ADC Gain Calibration Register High Byte (GCH)
76543210Reset Value
SFR D6
H
MSB5F
H
GCHADC Gain Calibration Register High Byte. This is the high byte of the 24-bit word that contains the
bits 7-0ADC gain calibration. A value which is written to this location will set the ADC gain calibration value.
ADC Multiplexer Register (ADMUX)
76543210Reset Value
SFR D7
H
INP3INP2INP1INP0INN3INN2INN1INN001
H
INP3-0Input Multiplexer Positive Channel. This selects the positive signal input.
bits 7-4
EAIEnable Auxiliary Interrupt. The Auxiliary Interrupt accesses nine different interrupts which are masked and
bit 5identified by SFR registers PAI (SFR A5
AIAuxiliary Interrupt Flag. AI must be cleared by software before exiting the interrupt service routine,
bit 4after the source of the interrupt is cleared. Otherwise, the interrupt occurs again. Setting AI in software generates
an Auxiliary Interrupt, if enabled.
0 = No Auxiliary Interrupt detected (default).
1 = Auxiliary Interrupt detected.
WDTIWatchdog Timer Interrupt Flag. WDTI must be cleared by software before exiting the interrupt service routine.
bit 3Otherwise, the interrupt occurs again. Setting WDTI in software generates a watchdog time interrupt, if enabled. The
Watchdog timer can generate an interrupt or reset. The interrupt is available only if the reset action is disabledin HCR0.
0 = No Watchdog Timer Interrupt Detected (default).
1 = Watchdog Timer Interrupt Detected.
ADC Results Register Low Byte (ADRESL)
76543210Reset Value
SFR D9
H
LSB00
H
ADRESLThe ADC Results Low Byte. This is the low byte of the 24-bit word that contains the ADC
bits 7-0Results. Reading from this register clears the ADC interrupt; however, AI in EICON (SFR D8) must also be cleared.
ADC Results Register Middle Byte (ADRESM)
76543210Reset Value
SFR DA
H
00
H
ADRESMThe ADC Results Middle Byte. This is the middle byte of the 24-bit word that contains the ADC
bits 7-0Results.
ADC Results Register High Byte (ADRESH)
76543210Reset Value
SFR DB
H
ADRESHThe ADC Results High Byte. This is the high byte of the 24-bit word that contains the ADC
bits 7-0Results.
MSB00
H
48
www.ti.com
MSC1200
SBAS289E
ADC Control Register 0 (ADCON0)
76543210Reset Value
SFR DC
H
BODBurnout Detect. When enabled this connects a positive current source to the positive channel and a negative current
bit 6source to the negative channel. If the channel is open circuit then the ADC results will be full-scale (buffer must be ena bled).
EVREFEnable Internal Voltage Reference. If an external voltage reference is used, the internal voltage reference should
bit 5be disabled.
VREFHVoltage Reference High Select. The internal voltage reference can be selected to be 2.5V or 1.25V.
bit 40 = REFOUT/REFIN+ is 1.25V.
EBUFEnable Buffer. Enable the input buffer to provide higher input impedance but limits the input voltage range and
bit 3dissipates more power.
PGA2-0Programmable Gain Amplifier. Sets the gain for the PGA from 1 to 128.
bits 2-0
—BODEVREFVREFHEBUFPGA2PGA1PGA030
0 = Burnout Current Sources Off (default).
1 = Burnout Current Sources On.
0 = Internal Voltage Reference Off.
1 = Internal Voltage Reference On (default).
OF_UFOverflow/Underflow. If this bit is set, the data in the summation register is invalid. Either an overflow or an
bit 7underflow occurred. The bit is cleared by writing a 0 to it.
POLPolarity. Polarity of the ADC result and Summation register.
bit 60 = Bipolar.
1 = Unipolar.
POLANALOG INPUTDIGITAL OUTPUT
+FSR0x7FFFFF
0ZERO0x000000
1ZERO0x000000
–FSR0x800000
+FSR0xFFFFFF
–FSR0x000000
SM1-0Settling Mode. Selects the type of filter or auto select which defines the digital filter settling characteristics.
bits 5-4
SM1SM0SETTLING MODE
00Auto
01Fast Settling Filter
10Sinc
11Sinc
2
Filter
3
Filter
CAL2-0Calibration Mode Control Bits. Writing to this register initiates calibration.
bits 2-0
CAL2 CAL1 CAL0CALIBRATION MODE
000No Calibration (default)
001Self Calibration, Offset and Gain
010Self Calibration, Offset Only
011Self Calibration, Gain Only
100System Calibration, Offset Only
101System Calibration, Gain Only
110Reserved
111Reserved
Read Value—000B.
ADC Control Register 2 (ADCON2)
76543210Reset Value
SFR DE
H
DR7DR6DR5DR4DR3DR2DR1DR01B
H
DR7-0Decimation Ratio LSB (refer to ADCON3, SFR DFH).
bits 7-0
ADC Control Register 3 (ADCON3)
76543210Reset Value
SFR DF
H
DR10-8Decimation Ratio Most Significant 3 Bits. The output data rate =
bits 2-0
—— — — —DR10DR9DR806
f
MOD
DecimationRatio
where f
=
MOD
ACLK
()+•164
f
CLK
H
Accumulator (A or ACC)
76543210Reset Value
SFR E0
ACC.7ACC.6ACC.5ACC.4ACC.3ACC.2ACC.1ACC.000
H
H
ACC.7-0Accumulator. This register serves as the accumulator for arithmetic and logic operations.
bits 7-0
Summation/Shifter Control (SSCON)
76543210Reset Value
SFR E1
The Summation register is powered down when the ADC is powered down. If all zeroes are written to this register the 32-bit
SUMR3-0 registers will be cleared. The Summation registers will do sign extend if Bipolar is selected in ADCON1.
50
SSCON1SSCON0SCNT2SCNT1SCNT0SHF2SHF1SHF0 00
H
www.ti.com
H
MSC1200
SBAS289E
.
SSCON1-0 Summation/Shift Control.
bits 7-6
SCNT2-0Summation Count. When the summation is complete an interrupt will be generated unless masked. Reading the
bits 5-3SUMR0 register clears the interrupt.
SUMR0Summation Register 0. This is the least significant byte of the 32-bit summation register or bits 0 to 7.
bits 7-0Write: will cause values in SUMR3-0 to be added to or subtracted from the summation register.
Read: will clear the Summation Interrupt.
Summation Register 1 (SUMR1)
76543210Reset Value
SFR E3
H
00
H
SUMR 1Summation Register 1. This is the most significant byte of the lowest 16 bits of the summation register or bits 8-15.
bits 7-0
Summation Register 2 (SUMR2)
76543210Reset Value
SFR E4
H
00
H
SUMR 2Summation Register 2. This is the most significant byte of the lowest 24 bits of the summation register or bits 16-23.
bits 7-0
Summation Register 3 (SUMR3)
76543210Reset Value
SFR E5
H
MSB00
H
SUMR3Summation Register 3. This is the most significant byte of the 32-bit summation register or bits 24-31.
bits 7-0
MSC1200
SBAS289E
www.ti.com
51
Offset DAC Register (ODAC)
76543210Reset Value
SFR E6
H
00
H
ODACOffset DAC Register. This register will shift the input by up to half of the ADC full-scale input range. The offset
bit7-0DAC value is summed with the ADC input prior to conversion. Writing 00
or 80H to ODAC turns off the Offset DAC.
H
bit 7Offset DAC Sign bit.
0 = Positive
1 = Negative
bit 6-0Offset =
−
V
2
•
REF
PGA
•
ODAC
127
60
[:]
()
•−
bit
7
1
NOTE: ODAC cannot be used to offset the input so that the buffer can be used for AGND signals.
Low Voltage Detect Control (LVDCON)
76543210Reset Value
SFR E7
ALVDISAnalog Low Voltage Detect Disable.
bit 70 = Enable Detection of Low Analog Supply Voltage (ALVD interrupt set when AVDD < 2.8V).
ALVDIS00011118F
H
1 = Disable Detection of Low Analog Supply Voltage.
H
Extended Interrupt Enable (EIE)
76543210Reset Value
SFR E8
H
EWDIEnable Watchdog Interrupt. This bit enables/disables the watchdog interrupt. The Watchdog timer is enabled by
bit 40 = Disable the Watchdog Interrupt
EX5External Interrupt 5 Enable. This bit enables/disables external interrupt 5.
bit 30 = Disable External Interrupt 5
EX4External Interrupt 4 Enable. This bit enables/disables external interrupt 4.
bit 20 = Disable External Interrupt 4
EX3External Interrupt 3 Enable. This bit enables/disables external interrupt 3.
bit 10 = Disable External Interrupt 3
EX2External Interrupt 2 Enable. This bit enables/disables external interrupt 2.
bit 00 = Disable External Interrupt 2
111EWDIEX5EX4EX3EX2E0
the WDTCON (SFR FF
) and PDCON (SFR F1H) registers.
H
1 = Enable Interrupt Request Generated by the Watchdog Timer
PGERAPage Erase. Available in both user and program modes.
bit 60 = Disable Page Erase Mode
0PGERA0FRCM0BUSY1002
1 = Enable Page Erase Mode
MEMORY SIZEMODELFLASH MEMORY
0MSC1200Y24kB
1MSC1200Y38kB
H
H
FRCMFrequency Control Mode. The bypass is only used for slow clocks to save power.
bit 40 = Bypass (default)
1 = Use Delay Line. Saves power (Recommended).
BUSYWrite/Erase BUSY Signal.
bit 20 = Idle or Available
1 = Busy
Flash Memory Timing Control Register (FTCON)
76543210Reset Value
SFR EF
H
FER3FER2FER1FER0FWR3FWR2FWR1FWR0A5
Refer to Flash Timing Characteristics
FER3-0Set Erase. Flash Erase Time = (1 + FER) • (MSEC + 1) • t
CLK
.
bits 7-411ms industrial temperature range.
5ms commercial temperature range.
FWR3-0Set Write. Flash Write Time = (1 + FWR) • (USEC + 1) • 5 • t
CLK
.
bits 3-030µs to 40µs.
B Register (B)
76543210Reset Value
SFR F0
H
H
00
H
BB Register. This register serves as a second accumulator for certain arithmetic operations.
bits 7-0
MSC1200
SBAS289E
www.ti.com
53
Power-Down Control Register (PDCON)
76543210Reset Value
SFR F1
Turning peripheral modules off puts the MSC1200 in the lowest power mode.
PDICLKInternal Clock Control.
bit 70 = Internal Oscillator and PLL On (Internal Oscillator or PLL mode)
PDIDACIDAC Control.
bit 60 = IDAC On
PDI2CI
bit 50 = I
PDADCADC Control.
bit 30 = ADC On
PDWDTWatchdog Timer Control.
bit 20 = Watchdog Timer On
PDSTSystem Timer Control.
bit 10 = System Timer On
PDICLKPDIDACPDI2C0PDADCPDWDTPDSPIPDSPI6F
H
1 = Internal Oscillator and PLL Power Down (External Clock mode)
1 = IDAC Power Down (default)
2
C Control.
2
C On (only when PDSPI = 1)
2
1 = I
C Power Down (default)
1 = ADC, V
, and Summation registers are powered down (default).
REF
1 = Watchdog Timer Power Down (default)
1 = System Timer Power Down (default)
H
PDSPISPI Control.
bit 00 = SPI System On
1 = SPI System Power Down (default)
PSEN
/ALE Select (PASEL)
76543210Reset Value
SFR F2
PSEN4-0
PSEN4PSEN3PSEN2PSEN1PSEN000000
H
PSEN
Mode Select. Defines the output on P3.6 in User Application mode or Serial Flash Programming mode.
bits 7-300000: General-Purpose I/O (default)
00001: SYSCLK
00011: Internal
PSEN
(refer to Figure 3 for timing)
00101: Internal ALE (refer to Figure 3 for timing)
00111: f
01001: Memory
01011: T0 Out (overflow)
01101: T1 Out (overflow)
01111: f
(buffered XIN oscillator clock)
OSC
MOD
WR
(MOVX write)
(1)
(1)
(2)
10001: SYSCLK/2 (toggles on rising edge)
10011: Internal
This system clock is divided by the value of the 16-bit register MSECH:MSECL. Then that 1ms timer tick is divided by the register
HMSEC which provides the 100ms signal used by this seconds timer. Therefore, this seconds timer can generate an interrupt
which occurs from 100ms to 12.8 seconds. Reading this register will clear the Seconds Interrupt. This Interrupt can be monitored
in the AIE register.
WRTWrite Control. Determines whether to write the value immediately or wait until the current count is finished.
bit 7Read = 0.
0 = Delay Write Operation. The SEC value is loaded when the current count expires.
1 = Write Immediately. The counter is loaded once the CPU completes the write operation.
SECINT6-0 Seconds Count. Normal operation would use 100ms as the clock interval.
bits 6-0Seconds Interrupt = (1 + SEC) • (HMSEC + 1) • (MSEC + 1) • t
CLK
.
Milliseconds Interrupt (MSINT)
76543210Reset Value
SFR FA
H
The clock used for this timer is the 1ms clock which results from dividing the system clock by the values in registers MSECH:MSECL.
Reading this register will clear MSINT.
WRTWrite Control. Determines whether to write the value immediately or wait until the current count is finished. Read = 0.
bit 70 = Delay Write Operation. The MSINT value is loaded when the current count expires.
MSINT6-0Seconds Count. Normal operation would use 1ms as the clock interval.
bits 6-0MS Interrupt Interval = (1 + MSINT) • (MSEC + 1) • t
WRTMSINT6MSINT5MSINT4MSINT3MSINT2MSINT1MSINT07F
1 = Write Immediately. The MSINT counter is loaded once the CPU completes the write operation.
CLK
H
56
www.ti.com
MSC1200
SBAS289E
One Microsecond Register (USEC)
76543210Reset Value
SFR FB
H
00FREQ5FREQ4FREQ3FREQ2FREQ1FREQ003
H
FREQ5-0Clock Frequency – 1. This value + 1 divides the system clock to create a 1µs Clock.
bits 5-0USEC = CLK/(FREQ + 1). This clock is used to set Flash write time. See FTCON (SFR EF
MSECL7-0 One Millisecond Low. This value in combination with the next register is used to create a 1ms Clock.
bits 7-01ms Clock = (MSECH • 256 + MSECL + 1) • t
. This clock is used to set Flash erase time. See FTCON (SFR EFH).
MSECH7-0 One Millisecond High. This value in combination with the previous register is used to create a 1ms clock.
bits 7-01ms = (MSECH • 256 + MSECL + 1) • t
HMSEC7-0 One Hundred Millisecond. This clock divides the 1ms clock to create a 100ms clock.
bits 7-0100ms = (MSECH • 256 + MSECL + 1) • (HMSEC + 1) • t
CLK
.
Watchdog Timer Register (WDTCON)
76543210Reset Value
SFR FF
EWDTEnable Watchdog (R/W).
bit 7Write 1/Write 0 sequence sets the Watchdog Enable Counting bit.
DWDTDisable Watchdog (R/W).
bit 6Write 1/Write 0 sequence clears the Watchdog Enable Counting bit.
RWDTReset Watchdog (R/W).
bit 5Write 1/Write 0 sequence restarts the Watchdog Counter.
WDCNT4-0Watchdog Count (R/W).
bits 4-0Watchdog expires in (WDCNT + 1) • HMSEC to (WDCNT + 2) • HMSEC, if the sequence is not asserted. There
NOTE: If HCR0.3 (EWDR) is set and the watchdog timer expires, a system reset is generated. If HCR0.3 (EWDR) is cleared
and the watchdog timer expires, an interrupt is generated (see Table VII).
(1) The marketing status values are defined as follows:
ACTIVE: Product device recommended for new designs.
LIFEBUY: TI has announced that the device will be discontinued, and a lifetime-buy period is in effect.
NRND: Not recommended for new designs. Device is in production to support existing customers, but TI does not recommend using this part in
a new design.
PREVIEW: Device has been announced but is not in production. Samples may or may not be available.
OBSOLETE: TI has discontinued the production of the device.
MECHANICAL DATA
MTQF019A – JANUARY 1995 – REVISED JANUARY 1998
PFB (S-PQFP-G48) PLASTIC QUAD FLATPACK
37
48
1,05
0,95
0,50
36
0,27
0,17
25
24
13
1
5,50 TYP
7,20
SQ
6,80
9,20
SQ
8,80
12
M
0,08
0,05 MIN
Seating Plane
0,13 NOM
Gage Plane
0,25
0°–7°
0,75
0,45
1,20 MAX
NOTES: A. All linear dimensions are in millimeters.
B. This drawing is subject to change without notice.
C. Falls within JEDEC MS-026
0,08
4073176/B 10/96
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications,
enhancements, improvements, and other changes to its products and services at any time and to discontinue
any product or service without notice. Customers should obtain the latest relevant information before placing
orders and should verify that such information is current and complete. All products are sold subject to TI’s terms
and conditions of sale supplied at the time of order acknowledgment.
TI warrants performance of its hardware products to the specifications applicable at the time of sale in
accordance with TI’s standard warranty. Testing and other quality control techniques are used to the extent TI
deems necessary to support this warranty . Except where mandated by government requirements, testing of all
parameters of each product is not necessarily performed.
TI assumes no liability for applications assistance or customer product design. Customers are responsible for
their products and applications using TI components. To minimize the risks associated with customer products
and applications, customers should provide adequate design and operating safeguards.
TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right,
copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process
in which TI products or services are used. Information published by TI regarding third-party products or services
does not constitute a license from TI to use such products or services or a warranty or endorsement thereof.
Use of such information may require a license from a third party under the patents or other intellectual property
of the third party, or a license from TI under the patents or other intellectual property of TI.
Reproduction of information in TI data books or data sheets is permissible only if reproduction is without
alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction
of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for
such altered documentation.
Resale of TI products or services with statements different from or beyond the parameters stated by TI for that
product or service voids all express and any implied warranties for the associated TI product or service and
is an unfair and deceptive business practice. TI is not responsible or liable for any such statements.
Following are URLs where you can obtain information on other Texas Instruments products and application
solutions:
ProductsApplications
Amplifiersamplifier.ti.comAudiowww.ti.com/audio
Data Convertersdataconverter.ti.comAutomotivewww.ti.com/automotive
DSPdsp.ti.comBroadbandwww.ti.com/broadband
Interfaceinterface.ti.comDigital Controlwww.ti.com/digitalcontrol
Logiclogic.ti.comMilitarywww.ti.com/military
Power Mgmtpower.ti.comOptical Networkingwww.ti.com/opticalnetwork
Microcontrollersmicrocontroller.ti.comSecuritywww.ti.com/security
Telephonywww.ti.com/telephony
Video & Imagingwww.ti.com/video
Wirelesswww.ti.com/wireless
Mailing Address:Texas Instruments
Post Office Box 655303 Dallas, Texas 75265
Copyright 2004, Texas Instruments Incorporated
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.