Syntax:
InitTimer7 source, prescaler
Command Availability:
Available on Microchip microcontrollers with a Timer 7 module.
Explanation:
InitTimer7
will set up timer 7.
Parameters are required as detailed in the table below:
Parameter | Description |
---|---|
|
The clock source for this specific timer. Can be either
Enhanced Microchip PIC microcontrollers with a dedicated TMRxCLK register support additional clock sources. This includes, but limited to, the following devices: 16F153xx, 16F16xx, 16F188xx and 18FxxK40 Microchip PIC microcontroller series. On these devices the clock source can be one of the following:
|
|
The value of the prescaler for this specific timer. See the tables below for permitted vales for Microchip PIC or the Atmel AVR microcontrollers. |
When the timer overflows an interrupt event will be generated.
This interrupt event can be used in conjunction with On Interrupt
to run a section of code when the interrupt event occurs.
Microchip PIC microcontrollers:
On Microchip PIC microcontrollers prescaler
must be one of the following constants:
Prescaler Value | Primary GCB Constant | Constant Equates to value |
---|---|---|
1:1 |
|
0 |
1:2 |
|
16 |
1:4 |
|
32 |
1:8 |
|
48 |
These correspond to a prescaler of between 1:2 and 1:8 of the oscillator (FOSC/4)
speed. The prescaler will apply to either the oscillator or the external
clock input.
Supported in <TIMER.H>