
μ
PD17016, 17017
213
17.3 Output Select Blocks
17.3.1 Configuration of output select blocks
Figure 17-2 shows the configuration of the output select blocks.
Figure 17-2. Configuration of Output Select Blocks
17.3.2 Function of output select blocks
The output select blocks select whether the P1B
2
/PWM
1
and P1B
1
/PWM
0
are used as general-purpose output
port pins or D/A converter pins.
This selection can be made by the PWM pin setting software macro supplied with the device file. Each pin
can be set in the port mode or D/A converter mode independently.
The P1B
2
/PWM
1
and P1B
1
/PWM
0
pins are N-ch open-drain output pins and must be connected with an
external pull-up resistor.
Table 17-1 lists the PWM pin setting software macros.
Table 17-1. PWM Pin Setting Software Macros
Function
Macro Format
Uses P1B
1
/PWM
0
pin as PWM pin
SET1_PWM0ON
Uses P1B
2
/PWM
1
pin as PWM pin
SET1_PWM1ON
Uses P1B
1
/PWM
0
and P1B
2
/PWM
1
pins as PWM pins
SET2_PWM1ON_PWM0ON
Uses P1B
1
/PWM
0
pin as general-purpose output port pin
CLR1_PWM0ON
Uses P1B
2
/PWM
1
pin as general-purpose output port pin
CLR1_PWM1ON
Uses P1B
1
/PWM
0
and P1B
2
/PWM
1
pins general-purpose output port pins
CLR2_PWM1ON_PWM0ON
Uses P1B
1
/PWM
0
pin as PWM pin and P1B
2
/PWM
1
pin as general-purpose output port pin
INIT_NOT_PWM1ON_PWM0ON
Uses P1B
1
/PWM
0
pin as general-purpose output port pin and P1B
2
/PWM
1
pin as PWM pin
INIT_PWM1ON_NOT_PWM0ON
Caution
If the above macros are used, the contents of the register window are destroyed.
If the above macro instructions immediately follow an embedded macro instruction, an “object
error” occurs when the source file is assembled and loaded to the in-circuit emulator. If an
embedded macro exists immediately before the above macro instructions, insert a comment
statement in between.
Output latch
P1B
2
/PWM
1
1
0
Duty setting block
PWM pin setting software macro
P1B
1
/PWM
0
1
0
Duty setting block
Output latch