参数资料
型号: M38D59GF-XXXFP
元件分类: 微控制器/微处理器
英文描述: 8-BIT, MROM, 6.25 MHz, MICROCONTROLLER, PQFP80
封装: 14 X 20 MM, 0.80 MM PITCH, PLASTIC, QFP-80
文件页数: 27/142页
文件大小: 2004K
代理商: M38D59GF-XXXFP
Rev.3.04
May 20, 2008
Page 122 of 134
REJ03B0158-0304
38D5 Group
APPENDIX
Note on Programming
1. Processor Status Register
(1) Initialization of the processor status register
It is required to initialize the processor status register (PS) flags
which affect program execution. It is particularly essential to
initialize the T and D flags because of their effect on
calculations. Initialize these flags at the beginning of the
program.
<Reason>
At a reset, the contents of the processor status register (PS) are
undefined except for the I flag which is “1”.
Fig. 99 Initialization of processor status register flags
(2) How to refer the processor status register
To refer the contents of the processor status register (PS), execute
the PHP instruction once and then read the contents of (S+1). If
necessary, execute the PLP instruction to return the stored PS to
its original status.
Fig. 100 Stack memory contents after PHP instruction
execution
2. Decimal Calculations
(1) Instructions for decimal calculations
To perform decimal calculations, set the decimal mode (D) flag
to “1” with the SED instruction and execute the ADC or SBC
instruction. In that case, after the ADC or SBC instruction,
execute another instruction before the SEC, CLC, or CLD
instruction.
Fig. 101 Instructions for decimal calculations
(2) Status flag at decimal calculations
When the ADC or SBC instruction is executed in decimal mode
(D flag = “1”), three of the status flags (N, V, and Z) are disabled.
The carry (C) flag is set to “1” if a carry is generated and is
cleared to “0” if a borrow is generated as a result of a calculation,
so it can be used to determine whether the calculation has
generated a carry or borrow.
Initialize the C flag before each calculation.
Reset
Initialize the flags
Main program
Stored PS
(S)
(S) + 1
Set the decimal mode (D) flag to “1”
Execute the ADC or SBC instruction
NOP
Execute the SEC, CLC, or CLD instruction
相关PDF资料
PDF描述
MC6805S3P 8-BIT, MROM, MICROCONTROLLER, PDIP28
MC908QT1AVDWE 8-BIT, FLASH, 8 MHz, MICROCONTROLLER, PDSO8
MC908QY4AVDT 8-BIT, FLASH, 8 MHz, MICROCONTROLLER, PDSO16
MC9S08AW16CFUE 8-BIT, FLASH, 40 MHz, MICROCONTROLLER, PQFP64
M902-01-156.2500LF 156.25 MHz, OTHER CLOCK GENERATOR, CQCC36
相关代理商/技术参数
参数描述
M38D59T-RLFS 功能描述:BOARD EMULATOR FOR 38D5 GROUP RoHS:否 类别:编程器,开发系统 >> 内电路编程器、仿真器以及调试器 系列:- 产品变化通告:Development Systems Discontinuation 19/Jul/2010 标准包装:1 系列:* 类型:* 适用于相关产品:* 所含物品:*
M38DC-15 制造商:M/A-COM Technology Solutions 功能描述:MIXER(SPEC UX1015) - Bulk
M38K00F1-16FP 制造商:MITSUBISHI 制造商全称:Mitsubishi Electric Semiconductor 功能描述:SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
M38K00F1-16HP 制造商:MITSUBISHI 制造商全称:Mitsubishi Electric Semiconductor 功能描述:SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
M38K00F1-32FP 制造商:MITSUBISHI 制造商全称:Mitsubishi Electric Semiconductor 功能描述:SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER