EasyManua.ls Logo

Microchip Technology dsPIC30F - Peripherals Using Timer Modules

Microchip Technology dsPIC30F
738 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
dsPIC30F Family Reference Manual
DS70059C-page 12-22 © 2004 Microchip Technology Inc.
12.13 Peripherals Using Timer Modules
12.13.1 Time Base for Input Capture/Output Compare
The Input Capture and Output Compare peripherals can select one of two timer modules as their
time base. Refer to Section 13. “Input Capture”, Section 14. “Output Compare”, and the
device data sheet for further details.
12.13.2 A/D Special Event Trigger
On each device variant, one Type C time base has the capability to generate a special A/D
conversion trigger signal on a period match, in both 16 and 32-bit modes. The timer module
provides a conversion start signal to the A/D sampling logic.
If T32 = 0, when a match occurs between the 16-bit timer register (TMRx) and the
respective 16-bit period register (PRx), the A/D special event trigger signal is generated.
If T32 = 1, when a match occurs between the 32-bit timer (TMRx:TMRy) and the 32-bit
respective combined period register (PRx:PRy), the A/D special event trigger signal is
generated.
The special event trigger signal is always generated by the timer. The trigger source must be
selected in the A/D converter control registers. Refer to Section 17. “10-bit A/D Converter”,
Section 18. “12-bit A/D Converter”, and the device data sheet for additional information.
12.13.3 Timer as an External Interrupt Pin
The external clock input pin for each timer can be used as an additional interrupt pin. To provide
the interrupt, the timer period register, PRx, is written with a non-zero value and the TMRx
register is initialized to a value of 1 less than the value written to the period register. The timer
must be configured for a 1:1 clock prescaler. An interrupt will be generated when the next rising
edge of the external clock signal is detected.
12.13.4 I/O Pin Control
When a timer module is enabled and configured for external clock or gate operation, the user
must ensure the I/O pin direction is configured for an input. Enabling the timer module does not
configure the pin direction.

Table of Contents

Other manuals for Microchip Technology dsPIC30F