5 frequency generator – ADLINK ACL-8454/12 User Manual
Page 39
Signal Connections & Applications
• 31
4.5 Frequency
Generator
Example 1 : To generate a 250 KHz Square Wave.
step 1: To use fixed clock source because the output is a fixed
frequency.
step 2: Internal 2 MHz clock source is suitable to generate a 250 KHz
square wave. Use Counter #4 for this application.
50 KHz = 2 MHz / 8
step 3: Set jumper ‘CK4’. The clock source is coming from internal
‘CLOCK1’. Note that the CLOCK1 must be set as 2 MHz.
However, the CLOCK1 is shared with other counters. You must
consider the clock source of other counters which using
CLOCK1 in the same time.
step 4 ~ 6 : Skip these steps.
step 7: The gate source is always enabled. Note the jumper ‘G4’
should be removed and no external gate is used.
step 8: Connect the counter output to external device. The following
block diagram illustrates the application.
step 9: Write the control program. Please refer the ‘DEMO1.C’ source
code.
2 M Hz
COUT4
Counter #4
8254 Chip #2
C
G
O
'H'
Jumper
CK4
Jumper
CLOCK1
Figure 4.2 Example of frequency generator (1)
Example 2 : To generate a very low frequency of 1 pulse / 1 hour
step 1: To use fixed clock source because the output is a fixed
frequency.
step 2: Because the desired frequency (1/3600sec=0.000278Hz) is too
slow to use one counter to generate. Even if using cascaded
counter architecture, the clock frequency of the first stage
counter must be as low as possible. At first, try to use internal
clock. Assume the clock of the first stage is 100 K Hz. then the
frequency divider value of the two cascaded counters is:
100 K Hz / 0.000278 Hz = 360,000,000
It is really a large number. Share the divider value to the two
counters, for example, the divider of the first stage can be
60000 and the divider of the second stage is 6000.