HARDWARE
7534 Group
Rev.3.00 Oct 23, 2006 page 42 of 55
REJ09B0178-0300
NOTES ON PROGRAMMING
Processor Status Register
The contents of the processor status register (PS) after reset are
undefined except for the interrupt disable flag I which is “1”. After
reset, initialize flags which affect program execution. In particular, it
is essential to initialize the T flag and the D flag because of their
effect on calculations.
Interrupts
The contents of the interrupt request bit do not change even if the
BBC or BBS instruction is executed immediately after they are
changed by program because this instruction is executed for the pre-
vious contents. For executing the instruction for the changed con-
tents, execute one instruction before executing the BBC or BBS in-
struction.
Decimal Calculations
• For calculations in decimal notation, set the decimal mode flag D to
“1”, then execute the ADC instruction or SBC instruction. In this
case, execute SEC instruction, CLC instruction or CLD instruction
after executing one instruction before the ADC instruction or SBC
instruction.
• In the decimal mode, the values of the N (negative), V (overflow)
and Z (zero) flags are invalid.
Timers
• When n (0 to 255) is written to a timer latch, the frequency division
ratio is 1/(n+1).
• When a count source of timer X is switched, stop a count of timer X.
Ports
• The values of the port direction registers cannot be read.
That is, it is impossible to use the LDA instruction, memory opera-
tion instruction when the T flag is “1”, addressing mode using di-
rection register values as qualifiers, and bit test instructions such
as BBC and BBS.
It is also impossible to use bit operation instructions such as CLB
and SEB and read/modify/write instructions of direction registers
for calculations such as ROR.
For setting direction registers, use the LDM instruction, STA in-
struction, etc.
• As for the 36-pin version, set "1" to each bit 6 of the port P3 direc-
tion register and the port P3 register.
• As for the 32-pin version, set “1” to respective bits 5, 6, 7 of the port
P3 direction register and port P3 register.
A/D Converter
The comparator uses internal capacitors whose charge will be lost if
the clock frequency is too low.
Make sure that f(XIN) is 500kHz or more during A/D conversion.
Do not execute the STP instruction during A/D conversion.
Watchdog Timer
The internal reset may not be generated correctly in the middle-speed
mode, depending on the underflow timing of the watchdog timer.
When using the watchdog timer, operate the MCU in any mode other
than the middle-speed mode (i.e., high-speed, low-speed or double-
speed mode).
Instruction Execution Timing
The instruction execution time can be obtained by multiplying the
frequency of the internal clock φ by the number of cycles mentioned
in the machine-language instruction table.
The frequency of the internal clock φ is the same as that of the
XIN in double-speed mode, twice the XIN cycle in high-speed
mode and 8 times the XIN cycle in middle-speed mode.
Note on stack page
When 1 page is used as stack area by the stack page selection bit,
the area which can be used as stack depends on RAM size. Espe-
cially, be careful that the RAM area varies in Mask ROM version,
One Time PROM version and Emulator MCU.
NOTES ON USE
Handling of Power Source Pin
In order to avoid a latch-up occurrence, connect a capacitor suitable
for high frequencies as bypass capacitor between power source pin
(Vcc pin) and GND pin (Vss pin). Besides, connect the capacitor to
as close as possible. For bypass capacitor which should not be lo-
cated too far from the pins to be connected, a ceramic or electrolytic
capacitor of 1.0 µF is recommended.
Handling of USBVREFOUT Pin
In order to prevent the instability of the USBVREFOUT output due to
external noise, connect a capacitor as bypass capacitor between
USBVREFOUT pin and GND pin (VSS pin). Besides, connect the ca-
pacitor to as close as possible. For bypass capacitor, a ceramic or
electrolytic capacitor of 0.22 µF is recommended.
USB Communication
• In applications requiring high-reliability, we recommend providing
the system with protective measures such as USB function initial-
ization by software or USB reset by the host to prevent USB com-
munication from being terminated unexpectedly, for example due
to external causes such as noise.
• When USB suspend mode with TTL level on P10, P12, P13 input
level selection bit (bit 3 of address 1716) set to “1”, suspend current
as ICC might be greater than 300 µA as a spec.
[Countermeasure]
There are two countermeasures by software to avoid it as follows.
(1) Change from TTL input level to CMOS input level for P10, P12,
P13 port input.
(2) Change from TTL input level to CMOS input level before STP
instruction in suspend routine;
then after RESUME or Remote wake up interrupt, return to TTL
input level from CMOS input level. That is shown in Figure 49.
NOTES ON PROGRAMMING/NOTES ON USE