Advantech PCL-833 handleiding

28 pagina's
PDF beschikbaar

Handleiding

Je bekijkt pagina 26 van 28
PCL-833 User Manual 18
3.7 Timer Functions
The PCL-833's on-board timer lets you monitor counter readings with extreme accu-
racy. The programmable timer generates pulses at regular intervals. The card can
latch the readings in its counters and generate an interrupt to the PC.
You can set timer cycle periods from 1msec. to 255 seconds. The cycle time is the
product of the timer base period and a multiplier. Timer base periods are 1,10,100 or
1000 msec. The multiplier ranges from 1 to 255. The divider can range from 1 to 255.
For example, to set a timer period of 20 msec, you would set the timer base to1 msec
and the multiplier to 20. That is:
Time period = Base period * multiplier
20msec = 1msed * 20
Set the timer period by programming registers BASE+9 and BASE+10.
You can use the timer to latch the counter values and/or to generate an interrupt to
the PC. To use the timer latching set registers BASE+3, 4and 5. To generate an
interrupt with the timer set bit 3 of BASE+9 and program the card's 8259A interrupt
controller. See the following sections for more information.
3.8 Interrupt Functions
The PCL-833 can generate an interrupt to the PC for any of the following conditions:
1. Counter I overflow
2. Counter 2 overflow
3. Counter 3 overflow
4. Counter I index in
5. Counter 2 index in
6. Counter 3 index in
7. DI0 input
8. Dl1 input
9. Timer pulse
The card's 8259A interrupt controller chip combines these interrupts into a single PC
interrupt, set by jumper JPI. Since the 8259A only has eight input channels, the Dl1
and timer interrupts share a single interrupt line. Bit 3 of write register BASE+9
selects Dl1 or timer.
Note that you can use only one of the card's interrupt sources at a given time, unless
you specially program your interrupt service routine to handle multiple interrupt
sources.
You enable the PCL-833 interrupt functions by programming the card's 8259 chip,
accessed through the registers at BASE+12 and BASE+13. You will need to set the
chip's interrupt mask register to exclude all but one of the interrupt lines.
Program the 8259 in 8086/8088 mode, single mode, edge-triggered mode. In 8086/
8088 mode two INTA signals are needed. The PCL-833 generates the first INTA
automatically. Your program generates the second INTA by reading BASE+15. This
read returns the interrupt vector number which caused the request.
The hold time must be at least 1 micro sec after a low-to-high transition of the inter-
rupt source to ensure that the interrupt occurs.

Bekijk gratis de handleiding van Advantech PCL-833, 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

MerkAdvantech
ModelPCL-833
CategorieNiet gecategoriseerd
TaalNederlands
Grootte1770 MB