beautypg.com

2 to generate a 1 pulse/1 hour signal – ADLINK PCI-8554 User Manual

Page 43

background image

Signal Connection and Applications • 33

4.4.2 To generate a 1 pulse/1 hour signal

Step 1:

Use a fixed clock source because the output is a fixed
frequency.

Step 2:

As the desired frequency is too slow, one counter will
be unable to produce the desired frequency
(1/3600sec=0.000278Hz. Therefore to reach this low
frequency, cascade the independent counters 1, 2
and 3. Set the clock source of counter 1 to the
internal 8MHz. Connect COUT1 to clock source of
counter 2, and connect COUT2 to clock source of
counter 3.

Step 3:

Using the counter divider function, set counter 1 to
4000, counter 2 to 2000, and counter 3 to 3600.

8MHz/4000/2000/3600 = 1/3600,

Hence COUT3 will generate a pulse every hour.

Step 4:

The gate sources to enable always, hence GATE1,
GATE2, and GATE3 are open.

Step 5:

Write and verify the control program. Refer to
‘DEMO2.C’ source code.

COUT1

Counter #1

8254 Chip #1

'H'

ECK1

GND
CK1

COUT10

8MHz

COUT11

set by function "8554_SET_cntCLK"

set by function

"_8554_SET_CK1"

COUT2

Counter #2

8254 Chip #1

'H'

set by function "8554_SET_cntCLK"

ECK2

COUT1
CK1

COUT10

COUT3

Counter #3

8254 Chip #1

'H'

ECK3

COUT2
CK1

COUT10

set by function "8554_SET_cntCLK"

Figure 21: Example of frequency generator (2)