Download Print this page

Konica Minolta PCI-1712 Quick Start Manual page 61

1 ms/s, 12-bit, 16-ch highspeed multifunction card

Advertisement

The following C program serves as an example to explain how to
implement the frequency measurement by software.
outport(addr2_1712+0x26,0x03);
while(!kbhit())
{
//Initialize CNT1 and CNT2
outport(addr2_1712+0x24,0x00);
outport(addr2_1712+0x22,0x00);
//Setup CNT1 to output 1 sec. pulse in One-Shot mode
outport(addr2_1712+0x1e,0x72);
outport(addr2_1712+0x1a,0x10);
outport(addr2_1712+0x1a,0x27);
/*CNT1 generate the pulse with 1 sec. period (10KHz/ 10,000 pulse =1
Hz) */
/*Setup CNT2 to count the event of external measured clock signal
during one-shot //pulse from CNT1*/
outport(addr2_1712+0x1e,0xb0);
outport(addr2_1712+0x1c,0xff);
outport(addr2_1712+0x1c,0xff);
Advantech Co., Ltd.
www.advantech.com
Get other manuals https://www.bkmanuals.com
Figure 5-6: Frequency measurement
– 49 –
// Set internal clock as 10 KHz
//CNT1 82C54 mode 1
//Set CNT1 low byte
//Set CNT1 high byte
//CNT2 82C54 mode 0
//Set CNT2 low byte
//Set CNT2 high byte
PCI-1712/1712L User's Manual
Chapter 5

Advertisement

loading

This manual is also suitable for:

Pci-1712l