Setting Of Single-Phase Counter - Hitachi HIDIC MICRO-EH Applications Manual

Table of Contents

Advertisement

8.2.2

Setting of Single-Phase Counter

If either one of operation modes 1, 2, or 3 is selected, the single-phase counter should be set using the special internal
output (WRF072 to WRF07E). In order to make the contents of the various settings valid, it is necessary to turn on the
special internal output R7F5. The settings can be changed using the FUN instruction during the CPU operation (some
settings cannot be changed, however.)
(1)
Setting the counter input
Bit:
15
14
WRF07E:
a
b
Initial value:
0
0
Figure 8.8 Special internal output for setting counter input
Setting
Bit
value
Counter 1
a
Counter 2
b
Counter 3
c
Counter 4
d
*1 Can also be made valid by executing FUN142.
In case of mode 1, the settings for counter 3 and 4 are ignored.
In case of mode 3, the settings for counter 1 to 3 are ignored.
(2)
Setting the on-preset value
Set the count value at which the counter output is turned on (the on-preset value) for every counter used. Any value in the
range from 0 to FFFFH (0 to 65, 535) can be set. If the on-preset value is set to the same value as the off-preset value, the
counter will not perform any counting operation (see (5)).
WRF072:
On-preset value for counter 1
WRF073:
On-preset value for counter 2
On-preset value for counter 3
WRF074:
WRF075:
On-preset value for counter 4
Figure 8.9 Special internal outputs for setting the on-preset values
In case of mode 1, WRF074 and WRF075 are used to set the frequency for the PWM/pulse outputs.
In case of mode 3, WRF073 and WRF074 are used to set the frequency for the PWM/pulse outputs.
(3)
Setting the off-preset value
Set the count value at which the counter output is turned off (the off-preset value) for every counter used. Any value in
the range from 0 to FFFFH (0 to 65, 535) can be set. If the off-preset value is set to the same value as the on-preset value,
or larger than the on-preset value, the counter will not perform any counting (see (5).).
WRF076:
Off-preset value for counter 1
WRF077:
Off-preset value for counter 2
WRF078:
Off-preset value for counter 3
WRF079:
Off-preset value for counter 4
Figure 8.10 Special internal outputs for setting off-preset values
In case of mode 1, WRF078 and WRF079 are used to set the on-duty for the PWM/pulse outputs.
In case of mode 4, WRF077 and WRF078 are used to set the on-duty for the PWM/pulse outputs.
Chapter 8 High-speed counter, PWM / Pulse train output and Analogue I/O
13
12
11
10
9
c
d
e
f
g
0
0
0
0
0
Count edge
0
Rising edge
1
Falling edge
0
Rising edge
1
Falling edge
0
Rising edge
1
Falling edge
0
Rising edge
1
Falling edge
8-8
8
7
6
5
4
h
Not used
0
0
0
0
0
Setting
Bit
value
e
0
Up count operation
1
Down count operation
f
0
Up count operation
1
Down count operation
g
0
Up count operation
1
Down count operation
h
0
Up count operation
1
Down count operation
3
2
1
0
0
0
0
0
Count operation
*1
*1
*1
*1
*1
*1
*1
*1

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents