M38039G6HSP#U0 Renesas Electronics America, M38039G6HSP#U0 Datasheet - Page 80

IC 740/3803 MCU QZROM 64DIP

M38039G6HSP#U0

Manufacturer Part Number
M38039G6HSP#U0
Description
IC 740/3803 MCU QZROM 64DIP
Manufacturer
Renesas Electronics America
Series
740/38000r
Datasheet

Specifications of M38039G6HSP#U0

Core Processor
740
Core Size
8-Bit
Speed
16.8MHz
Connectivity
SIO, UART/USART
Peripherals
LED, PWM, WDT
Number Of I /o
56
Program Memory Size
24KB (24K x 8)
Program Memory Type
QzROM
Ram Size
2K x 8
Voltage - Supply (vcc/vdd)
1.8 V ~ 5.5 V
Data Converters
A/D 16x10b; D/A 2x8b
Oscillator Type
Internal
Operating Temperature
-20°C ~ 85°C
Package / Case
64-SDIP (0.750", 19.05mm)
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Eeprom Size
-
3803 Group (Spec.H QzROM version)
REJ03B0166-0113 Rev.1.13
Page 78 of 100
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
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
execution
(S) + 1
SEC, CLC, or CLD instruction
(S)
ADC or SBC instruction
Initializing of flags
Set D flag to “1”
NOP instruction
Main program
Reset
Stored PS
Aug 21, 2009
(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
• The execution of these instructions does not change the
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:
(2) Shift and rotate instructions:
(3) Add and subtract instructions:
(4) Logical operation instructions (1’s complement):
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.
affect the MUL and DIV instruction.
contents of the processor status register.
CLB, SEB
ASL, LSR, ROL, ROR, RRF
DEC, INC
COM

Related parts for M38039G6HSP#U0