Forums

ADC public interface

Started by Roger Flor October 16, 2002
I have been trying to use the SDK. I am trying to run the ADC

Section 5.4.3 (ADC API Definition) of the SDK Documentation (DSP56F80x
Platform) contains this:

"Public Data Structure(s)

typedef struct
{ adc_eAnalogChannel AnalogChannel;
adc_tSampleMask openSampleMask;
Frac16
OffsetRegister;
Frac16
LowLimitRegister;
Frac16
HighLimitRegister;
adc_eZeroCrossing ZeroCrossing;
} adc_sState;" What I could not understand is the second element in the structure. The
second element is explained in the same documentation as: "openSampleMask adc_tSampleMask The mask
of samples per scan. Each channel can allocate any number of samples1.
For scaleability reason each sample are configured statically by include
sample like statement (see Table 5-25 )

1.Some ADC hardware algorithms depend on index sample number. So sample 1
(0x01 openSampleMask) is more preferable to used than sample 8 (0x80
openSampleMask) due to performance reasons. " I get the impression that a channel can convert more than one sample in one
scan. Please help. Motorola documentation is sometimes very confusing Roger
_________________________________________________________________
Get a speedy connection with MSN Broadband. Join now!
http://resourcecenter.msn.com/access/plans/freeactivation.asp



Our FAQ DSP-7992 answers your question:

Question:
What is the purpose of the OpenSampleMask in the structure adc_sState,
which is used to manage the ADC convertor using the SDK driver?

Answer:
In the SDK's support of the ADC each input channel has a separate open
statement, which returns a file descriptor that is used in reading
samples captured. The order this input channel is assigned in the ADC's
scan of all active input channels is defined in the OpenSampleMask,
which is a part of the adc_sState structure that is passed as an
argument in the open call.
Rather than give a detailed discussion of examples, it is far easier to
use a simple Excel spreadsheet tool that automatically provides
OpenSampleMask values for all active inputs. This tool also gives you
the #define tokens necessary for your appconfig.h file. You can download
the tool:
http://e-www.motorola.com/support/technial/faq/DSP/faq7992/Pin_To_Sample
_Map_Tool.xls We also have other ADC related FAQs that may help you to understand this
peripheral better. Go to the following location and search for ADC:
http://e-www.motorola.com/cgi-bin/faq.cgi?kbase=dsp&prod_defaultV800

Sincerely,

Leonard N. Elevich
Motorola DSPO -----Original Message-----
From: Roger Flor [mailto:]
Sent: Wednesday, October 16, 2002 12:52 PM
To:
Subject: [motoroladsp] ADC public interface

I have been trying to use the SDK. I am trying to run the ADC

Section 5.4.3 (ADC API Definition) of the SDK Documentation (DSP56F80x
Platform) contains this:

"Public Data Structure(s)

typedef struct
{ adc_eAnalogChannel AnalogChannel;
adc_tSampleMask openSampleMask;
Frac16
OffsetRegister;
Frac16
LowLimitRegister;
Frac16
HighLimitRegister;
adc_eZeroCrossing ZeroCrossing;
} adc_sState;" What I could not understand is the second element in the structure. The
second element is explained in the same documentation as: "openSampleMask adc_tSampleMask The
mask
of samples per scan. Each channel can allocate any number of
samples1.
* For scaleability reason each sample are configured statically by
"include
sample" like statement (see Table 5-25 )

1.Some ADC hardware algorithms depend on index sample number. So sample
1
(0x01 openSampleMask) is more preferable to used than sample 8 (0x80
openSampleMask) due to performance reasons. " I get the impression that a channel can convert more than one sample in
one
scan. Please help. Motorola documentation is sometimes very confusing Roger
_________________________________________________________________
Get a speedy connection with MSN Broadband. Join now!
http://resourcecenter.msn.com/access/plans/freeactivation.asp

_____________________________________
Note: If you do a simple "reply" with your email client, only the author
of this message will receive your answer. You need to do a "reply all"
if you want your answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join:

To Post:

To Leave:

Archives: http://www.yahoogroups.com/group/motoroladsp

More Groups: http://www.dsprelated.com/groups.php3 ">http://docs.yahoo.com/info/terms/