« Close

Datasheets and User Guides

App Notes

Software & Driver

 

2.9.1.7 - Frequency Output (Mode 7)

Outputs a square wave at a frequency determined by TimerClockBase/TimerClockDivisor divided by 2*Timer#Value. The Value passed should be between 0-255, where 0 is a divisor of 256. By changing the clock configuration and timer value, a wide range of frequencies can be output, as shown in the following table:

Table 2.9.1.7-1. Mode 7 Frequency Ranges

    Mode 7 Frequency Ranges 
    Divisor=1 Divisor=1
TimerClockBase   Value =1 Value = 256
0 4 MHz 2000000 7812.5
1 12 MHz 6000000 23437.5
2 48 MHz (Default) 24000000 93750
       
    Divisor=1 Divisor=256
    Value =1 Value = 256
3 1 MHz /Divisor 500000 7.629
4 4 MHz /Divisor 2000000 30.518
5 12 MHz /Divisor 6000000 91.553
6 48 MHz /Divisor 24000000 366.211

The frequency output has a -3 dB frequency of about 10 MHz on the FIO lines. Accordingly, at high frequencies the output waveform will get less square and the amplitude will decrease.

The output does not necessarily start instantly, but rather has to wait for the internal clock to roll. For the Frequency Output mode, the start delay varies from 0.0 to TimerClockDivisor*256/TimerClockBase. For example, if TimerClockBase = 48 MHz and TimerClockDivisor = 256, the start delay will vary from 0 to 1.4 ms.