Texas Instruments MSP50C6xx Calculator User Manual


 
Initializing the MSP50C6xx
6-4
In any MSP50C614 application, it is important for certain components to be
located as close as possible to the MSP50C614 die or package. These include
any of the decoupling capacitors at V
DD
(0.1 µF). It also includes all of the
components in the crystal-reference network between OSC
IN
and OSC
OUT
(22 pF, 10 M, 32 kHz).
6.2 Initializing the MSP50C6xx
The initialization code for the MSP50C6xx is in the file INIT.ASM, in the
MODULES\GENERAL directory of the TI-TALKS code (see the following
information).
The initialization routine does the following:
Clears the status registers
Clears all 32 accumulators
Clears all 640 words of RAM
Clears all system registers
Sets the clock to run at 8.192 MHz. If CRO_FLAG is 1, the crystal oscillator
is used. Otherwise, If CRO_FLAG is 0, the resistor-trimmed oscillator is
used.
Enables port F pullups
Sets the DAC to 10 bits and turns it on
Jumps to the label_main in MAIN.ASM
Note:
Care must be taken when branching to the init code to perform a software
reset on parts using resistor trim. The resistor trim is set based on the value
of fuses blown by the tester when the parts are manufactured. The P part
does not have these fuses so initially the value at that location is zero. If the
init routine encounters a zero it knows that it is running on a P part and sets
the resistor trim to a constant value, RESISTORTRIM. This will always work
properly after a hardware reset because all IO port locations are set to zero.
If the programmer branches to the init code to perform a software reset, the
value at 0x2F may not necessarily be zero. The IO addresses are not fully
decoded on the P part, so writing to 0x2C ( port G) also writes to 0x2D, 0x2E,
and 0x2F. This means that the value may not be zero during a software reset.
If this occurs, the init code will misidentify the P part as a C part and will use
the value at 0x2C as the trim. This may cause the P part to run at the wrong
speed. It is important to consider this if the init code is used as a software
reset. The C part has fuses at location 0x2C and fully decoded IO port ad-
dresses so this problem will not occur on masked parts.