English
Language : 

TLC156 Datasheet, PDF (23/50 Pages) List of Unclassifed Manufacturers – EPROM/ROM-Based 8-Bit Microcontroller Series
TLC
TLC156
2.7 Hexadecimal Convert to Decimal (HCD)
Decimal format is another number format for TLC156. When the content of the data memory has been assigned as
decimal format, it is necessary to convert the results to decimal format after the execution of ALU instructions. When
the decimal converting operation is processing, all of the operand data (including the contents of the data memory
(RAM), accumulator (ACC), immediate data, and look-up table) should be in the decimal format, or the results of
conversion will be incorrect.
Instruction DAA can convert the ACC data from hexadecimal to decimal format after any addition operation and
restored to ACC.
The conversion operation is illustrated in example 2.2.
EXAMPLE 2.2: DAA CONVERSION
MOVIA 90h
;Set immediate data = decimal format number “90” (ACC ß 90h)
MOVAR 30h
MOVIA 10h
;Load immediate data “90” to data memory address 30H
;Set immediate data = decimal format number “10” (ACC ß 10h)
ADDAR 30h, 0
;Contents of the data memory address 30H and ACC are binary-added
;the result loads to the ACC (ACC ß A0h, C ß 0)
DAA
;Convert the content of ACC to decimal format, and restored to ACC
;The result in the ACC is “00” and the carry bit C is “1”. This represents the
;decimal number “100”
Instruction DAS can convert the ACC data from hexadecimal to decimal format after any subtraction
operation and restored to ACC.
The conversion operation is illustrated in example 2.3.
EXAMPLE 2.3: DAS CONVERSION
MOVIA 10h
;Set immediate data = decimal format number “10” (ACC ß 10h)
MOVAR 30h
MOVIA 20h
;Load immediate data “10” to data memory address 30H
;Set immediate data = decimal format number “20” (ACC ß 20h)
SUBAR 30h, 0
;Contents of the data memory address 30H and ACC are binary-subtracted
;the result loads to the ACC (ACC ß F0h, C ß 0)
DAS
;Convert the content of ACC to decimal format, and restored to ACC
;The result in the ACC is “90” and the carry bit C is “0”. This represents the
;decimal number “ -10”
2.8 Oscillator Configurations
TLC156 can be operated in four different oscillator modes. Users can program two configuration bits (Fosc<1:0>)
to select the appropriate modes:
• LF: Low Frequency Crystal Oscillator
• XT: Crystal/Resonator Oscillator
• HF: High Frequency Crystal/Resonator Oscillator
• RC: Resistor/Capacitor Oscillator
In LF, XT, or HF modes, a crystal or ceramic resonator in connected to the OSCI and OSCO pins to establish
oscillation. When in LF, XT, or HF modes, the devices can have an external clock source drive the OSCI pin.
The RC device option offers additional cost savings for timing insensitive applications. The RC oscillator frequency
is a function of the supply voltage, the resistor (Rext) and capacitor (Cext), the operating temperature, and the
process parameter.
Rev0.95 Nov 20, 2003
P.2/TLC156