DSPRelated.com
Forums

ADC synchronization

Started by alberto_reit July 14, 2004
Hello everyone
Does anyone know how can i synchronize on chip ADC with external
events in a MC56F8346? which pin do i have to use for the input
signal?

Thank you!



Section 2.4 of the 56F8300 User's Manual states:

"The conversion process is either initiated by a SYNC signal, rising
edge, from one of the on-chip timer channels (see device data sheet,
Figure "Peripheral Subsystem", for the specific timer channel
associated with the ADC) or by a write to the ADC Control Register
(ADCR1) START bit."

This means that you need to setup timer to count external input and
trigger ADC. You need to refer to 56F8346 Data Sheet to see which
Timer you need to use. For example, Figure 1-2 (in Section 1.2)
provides internal peripheral interconnect, and shows that only Timer
C3 can trigger ADC B, and only Timer C1 can trigger ADC A.

I have developed the following code to run timer and trigger ADC.
You just need to modify this code to tell timer to count external
input, as oppose to count clock input as it is written below:

/*Setup Timer C1 to trigger ADCA */

/*Setup timer to trigger and reload every 1msec */
PESL( TMRC1, QT_WRITE_LOAD_REG, 0xEA60 );
PESL( TMRC1, QT_WRITE_COUNTER_REG, 0xEA60 );

/* Count rising edges; reload on compare; toggle output; count down
*/
PESL( TMRC1, QT_WRITE_CONTROL_REG, 0x3033 );

/*Enable OFLAG output */
PESL( TMRC1, QT_OUTPUT_ON_EXT_PIN, QT_ENABLE );

Leonard

--- In , "alberto_reit"
<alberto_reit@y...> wrote:
> Hello everyone
> Does anyone know how can i synchronize on chip ADC with external
> events in a MC56F8346? which pin do i have to use for the input
> signal?
>
> Thank you!