EasyManua.ls Logo

Microchip Technology dsPIC30F - Page 400

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
DS70064C-page 17-24 © 2004 Microchip Technology Inc.
17.12.3 Event Trigger Conversion Start
It is often desirable to synchronize the end of sampling and the start of conversion with some
other time event. The A/D module may use one of three sources as a conversion trigger.
17.12.3.1 External INT Pin Trigger
When SSRC<2:0> = 001, the A/D conversion is triggered by an active transition on the INT0 pin.
The INT0 pin may be programmed for either a rising edge input or a falling edge input.
17.12.3.2 GP Timer Compare Trigger
The A/D is configured in this Trigger mode by setting SSRC<2:0> = 010. When a match occurs
between the 32-bit timer TMR3/TMR2 and the 32-bit Combined Period register PR3/PR2, a
special ADC trigger event signal is generated by Timer3. This feature does not exist for the
TMR5/TMR4 timer pair. Refer to Section 12. “Timers” for more details.
17.12.3.3 Motor Control PWM Trigger
The PWM module has an event trigger that allows A/D conversions to be synchronized to the
PWM time base. When SSRC<2:0> = 011, the A/D sampling and conversion times occur at any
user programmable point within the PWM period. The special event trigger allows the user to
minimize the delay between the time when A/D conversion results are acquired and the time
when the duty cycle value is updated. Refer to Section 15. “Motor Control PWM” for more
details.
17.12.3.4 Synchronizing A/D Operations to Internal or External Events
Using the modes where an external event trigger pulse ends sampling and starts conversion
(SSRC = 001, 10, 011) may be used in combination with auto-sampling (ASAM = 1) to cause
the A/D to synchronize the sample conversion events to the trigger pulse source. For example,
in Figure 17-11 where SSRC = 010 and ASAM = 1, the A/D will always end sampling and start
conversions synchronously with the timer compare trigger event. The A/D will have a sample
conversion rate that corresponds to the timer comparison event rate. See Example 17-6 for code
example.
Figure 17-10: Converting 1 Channel, Manual Sample Start, Conversion Trigger Based Conversion Start
Conversion
ADCLK
SAMP
ADCBUF0
TSAMP
TCONV
BSF ADCON1,SAMP
Instruction Execution
Trigger

Table of Contents

Other manuals for Microchip Technology dsPIC30F