Advantech PCM-3718H handleiding
Handleiding
Je bekijkt pagina 66 van 80

PCM-3718 Series User Manual 58
7.4  Counter Operations
Read/Write Operation
Before you write the initial count to each counter, you must first specify 
the read/write operation type, operating mode and counter type in the 
control byte and write the control byte to the control register (BASE+15).
Since the control byte register and all three counter read/write registers 
have separate addresses, and each control byte specifies the counter it 
applies to (set by SC1 and SC0), no instructions on the operating 
sequence are required.  Any programming sequence following the 8254 
convention is acceptable.
There are three types of counter operations: read/load LSB, read/load 
MSB and read/load LSB followed by MSB.  It is important that you make 
your read/write operations in pairs and keep track of the byte order.
Counter Read-back Command
The 8254 counter read-back command lets you check the count value, 
programmed mode and current states of the OUT pin and Null Count flag 
of the selected counter(s).  You write this command to the control word 
register.  Format is as shown at the beginning of the chapter.
The read-back command can latch multiple counter output latches. Sim-
ply set the CNT bit to 0 and select the desired counter(s). This single 
command is functionally equivalent to multiple counter latch commands, 
one for each counter latched.
The read-back command can also latch status information for selected 
counter(s) by setting the STA bit to 0.  The status must be latched to be 
read; the status of a counter is accessed by a read from that counter.  For 
the counter status format please see the beginning of the chapter.
Counter Latch Operation
The 8254 supports the counter latch operation in two ways.  The first way 
is to set bits RW1 and RW0 to 0.  This setting latches the count of the 
selected counter in a 16-bit hold register.  The second way is to perform a 
latch operation under the read-back command.  Set bits SC1 and SC0 to 1 
and CNT to 0.  The latter method has the advantage of operating several 
counters at the same time. A subsequent read operation on the selected 
counter will retrieve the latched value.
Bekijk gratis de handleiding van Advantech PCM-3718H, stel vragen en lees de antwoorden op veelvoorkomende problemen, of gebruik onze assistent om sneller informatie in de handleiding te vinden of uitleg te krijgen over specifieke functies.
Productinformatie
| Merk | Advantech | 
| Model | PCM-3718H | 
| Categorie | Niet gecategoriseerd | 
| Taal | Nederlands | 
| Grootte | 5483 MB | 







