参数资料
型号: M38039G4H-XXXKP
元件分类: 微控制器/微处理器
英文描述: 8-BIT, MROM, 8.4 MHz, MICROCONTROLLER, PQFP64
封装: 14 X 14 MM, 0.80 MM PITCH, PLASTIC, LQFP-64
文件页数: 85/105页
文件大小: 1416K
代理商: M38039G4H-XXXKP
REJ03B0166-0113 Rev.1.13
Aug 21, 2009
Page 78 of 100
3803 Group (Spec.H QzROM version)
NOTES
NOTES ON PROGRAMMING
1. Processor Status Register
(1) Initializing of processor status register
Flags which affect program execution must be initialized after a reset.
In particular, it is essential to initialize the T and D flags because
they have an important effect on calculations. Initialize these
flags at beginning of the program.
<Reason>
After a reset, the contents of the processor status register (PS) are
undefined except for the I flag which is “1”.
Fig 73. Initialization of processor status register
(2) How to reference the processor status register
To reference the contents of the processor status register (PS),
execute the PHP instruction once then read the contents of (S+1).
If necessary, execute the PLP instruction to return the PS to its
original status.
Fig 74. Stack memory contents after PHP instruction
execution
2. Decimal calculations
(1) Execution of decimal calculations
The ADC and SBC are the only instructions which will yield
proper decimal notation, set the decimal mode flag (D) to “1”
with the SED instruction. After executing the ADC or SBC
instruction, execute another instruction before executing the
SEC, CLC, or CLD instruction.
Fig 75. Execution of decimal calculations
(2) Notes on status flag in decimal mode
When decimal mode is selected, the values of three of the flags in
the status register (the N, V, and Z flags) are invalid after a ADC
or SBC instruction is executed.
The carry flag (C) is set to “1” if a carry is generated as a result of the
calculation, or is cleared to “0” if a borrow is generated. To
determine whether a calculation has generated a carry, the C flag
must be initialized to “0” before each calculation. To check for a
borrow, the C flag must be initialized to “1” before each calculation.
3. JMP instruction
When using the JMP instruction in indirect addressing mode, do
not specify the last address on a page as an indirect address.
4. Multiplication and Division Instructions
The index X mode (T) and the decimal mode (D) flags do not
affect the MUL and DIV instruction.
The execution of these instructions does not change the
contents of the processor status register.
5. Read-Modify-Write Instruction
Do not execute any read-modify-write instruction to the read
invalid (address) SFR.
The read-modify-write instruction reads 1-byte of data from
memory, modifies the data, and writes 1-byte the data to the
original memory.
In the 740 Family, the read-modify-write instructions are the
following:
(1) Bit handling instructions:
CLB, SEB
(2) Shift and rotate instructions:
ASL, LSR, ROL, ROR, RRF
(3) Add and subtract instructions:
DEC, INC
(4) Logical operation instructions (1’s complement):
COM
Although not the read-modify-write instructions, add and
subtract/logical operation instructions (ADC, SBC, AND, EOR,
and ORA) when T flag = “1” operate in the way as the read-
modify-write instruction. Do not execute them to the read invalid
SFR.
<Reason>
When the read-modify-write instruction is executed to the read
invalid SFR, the following may result:
As reading is invalid, the read value is undefined. The instruction
modifies this undefined value and writes it back, so the written
value will be indeterminate.
Reset
Initializing of flags
Main program
Stored PS
(S)
(S) + 1
Set D flag to “1”
ADC or SBC instruction
NOP instruction
SEC, CLC, or CLD instruction
相关PDF资料
PDF描述
M38044M4-XXXFP 8-BIT, MROM, 8.4 MHz, MICROCONTROLLER, PQFP64
M38517F8SP 8-BIT, FLASH, 4 MHz, MICROCONTROLLER, PDIP42
M38D24G6-XXXFP 8-BIT, FLASH, 6.25 MHz, MICROCONTROLLER, PQFP64
M102E1000.0000DK 1000 MHz, OTHER CLOCK GENERATOR, MDIP24
M38022M4-XXXSP 8-BIT, MROM, 8 MHz, MICROCONTROLLER, PDIP64
相关代理商/技术参数
参数描述
M38039G6HHP#U0 功能描述:IC 740/3803 MCU QZROM 64LQFP RoHS:是 类别:集成电路 (IC) >> 嵌入式 - 微控制器, 系列:740/38000 标准包装:250 系列:80C 核心处理器:8051 芯体尺寸:8-位 速度:16MHz 连通性:EBI/EMI,I²C,UART/USART 外围设备:POR,PWM,WDT 输入/输出数:40 程序存储器容量:- 程序存储器类型:ROMless EEPROM 大小:- RAM 容量:256 x 8 电压 - 电源 (Vcc/Vdd):4.5 V ~ 5.5 V 数据转换器:A/D 8x10b 振荡器型:内部 工作温度:-40°C ~ 85°C 封装/外壳:68-LCC(J 形引线) 包装:带卷 (TR)
M38039G6HKP#U0 功能描述:IC 740/3803 MCU QZROM 64LQFP RoHS:是 类别:集成电路 (IC) >> 嵌入式 - 微控制器, 系列:740/38000 标准包装:250 系列:80C 核心处理器:8051 芯体尺寸:8-位 速度:16MHz 连通性:EBI/EMI,I²C,UART/USART 外围设备:POR,PWM,WDT 输入/输出数:40 程序存储器容量:- 程序存储器类型:ROMless EEPROM 大小:- RAM 容量:256 x 8 电压 - 电源 (Vcc/Vdd):4.5 V ~ 5.5 V 数据转换器:A/D 8x10b 振荡器型:内部 工作温度:-40°C ~ 85°C 封装/外壳:68-LCC(J 形引线) 包装:带卷 (TR)
M38039G6HSP#U0 功能描述:IC 740/3803 MCU QZROM 64DIP RoHS:是 类别:集成电路 (IC) >> 嵌入式 - 微控制器, 系列:740/38000 标准包装:250 系列:80C 核心处理器:8051 芯体尺寸:8-位 速度:16MHz 连通性:EBI/EMI,I²C,UART/USART 外围设备:POR,PWM,WDT 输入/输出数:40 程序存储器容量:- 程序存储器类型:ROMless EEPROM 大小:- RAM 容量:256 x 8 电压 - 电源 (Vcc/Vdd):4.5 V ~ 5.5 V 数据转换器:A/D 8x10b 振荡器型:内部 工作温度:-40°C ~ 85°C 封装/外壳:68-LCC(J 形引线) 包装:带卷 (TR)
M38039G8HHP#U0 功能描述:IC 740/3803 MCU QZROM 64LQFP RoHS:是 类别:集成电路 (IC) >> 嵌入式 - 微控制器, 系列:740/38000 标准包装:250 系列:80C 核心处理器:8051 芯体尺寸:8-位 速度:16MHz 连通性:EBI/EMI,I²C,UART/USART 外围设备:POR,PWM,WDT 输入/输出数:40 程序存储器容量:- 程序存储器类型:ROMless EEPROM 大小:- RAM 容量:256 x 8 电压 - 电源 (Vcc/Vdd):4.5 V ~ 5.5 V 数据转换器:A/D 8x10b 振荡器型:内部 工作温度:-40°C ~ 85°C 封装/外壳:68-LCC(J 形引线) 包装:带卷 (TR)
M38039G8HKP#U0 功能描述:IC 740/3803 MCU QZROM 64LQFP RoHS:是 类别:集成电路 (IC) >> 嵌入式 - 微控制器, 系列:740/38000 标准包装:250 系列:80C 核心处理器:8051 芯体尺寸:8-位 速度:16MHz 连通性:EBI/EMI,I²C,UART/USART 外围设备:POR,PWM,WDT 输入/输出数:40 程序存储器容量:- 程序存储器类型:ROMless EEPROM 大小:- RAM 容量:256 x 8 电压 - 电源 (Vcc/Vdd):4.5 V ~ 5.5 V 数据转换器:A/D 8x10b 振荡器型:内部 工作温度:-40°C ~ 85°C 封装/外壳:68-LCC(J 形引线) 包装:带卷 (TR)