beautypg.com

4 frequency generator, 1 to generate a 250 khz square wave – ADLINK PCI-8554 User Manual

Page 42

background image

32 • Signal Connection and Applications

4.4 Frequency

Generator

4.4.1 To generate a 250 KHz Square Wave.

Step 1:

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

Step 2:

The internal 8MHz clock is capable of generating the
250KHz frequency. Use Counter 1 for this application.

∴ 250 kHz = 8MHz/32

Step 3:

The gate source should be set to “enable” always and
therefore GATE1 is let open (pin 99 of CN1).

Step 4:

Connect the counter output to an external device and
write the control program. Refer to ‘DEMO1.C’
source code.

COUT1

Counter #1

8254 Chip #1

C

G

O

'H'

ECK1

GND
CK1

COUT10

8MHz

COUT11

set by function "8554_SET_cntCLK"

set by function

"_8554_SET_CK1"

Figure 20: Example of a frequency generator (1)