参数资料
型号: M38D24G6-XXXFP
元件分类: 微控制器/微处理器
英文描述: 8-BIT, FLASH, 6.25 MHz, MICROCONTROLLER, PQFP64
封装: 14 X 14 MM, 0.80 MM PITCH, PLASTIC, LQFP-64
文件页数: 22/136页
文件大小: 2856K
代理商: M38D24G6-XXXFP
Rev.3.02
Apr 10, 2008
Page 118 of 131
REJ03B0177-0302
38D2 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. 98 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. 99 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. 100 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描述
MC68HC705MC4MS 8-BIT, UVPROM, 3 MHz, MICROCONTROLLER, CDIP28
MPC8270VRMHBX 32-BIT, 266 MHz, RISC PROCESSOR, PBGA516
MC9S12HZ64VFU 16-BIT, FLASH, 25 MHz, MICROCONTROLLER, PQFP80
MC6805P6P 8-BIT, MROM, 1 MHz, MICROCONTROLLER, PDIP28
MC6805S2P 8-BIT, MROM, MICROCONTROLLER, PDIP28
相关代理商/技术参数
参数描述
M38D24G6XXXHP 制造商:RENESAS 制造商全称:Renesas Technology Corp 功能描述:SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
M38D24G7XXXFP 制造商:RENESAS 制造商全称:Renesas Technology Corp 功能描述:SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
M38D24G7XXXHP 制造商:RENESAS 制造商全称:Renesas Technology Corp 功能描述:SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
M38D24G8XXXFP 制造商:RENESAS 制造商全称:Renesas Technology Corp 功能描述:SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
M38D24G8XXXHP 制造商:RENESAS 制造商全称:Renesas Technology Corp 功能描述:SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER