I've been using the ADC12 on the f149 quite happily for months now.
However, I've just started working with the ADC10 on the f1232 and this is
quite different.
I'm using 3 analogue inputs A0, A1 & A5. I'm planning to use a
sequence of
channel conversion but am unsure exactly how much result memory I'll need.
To define the sequence you load the ADC10CTL1 register with the starting
channel number and it automatically counts down to A0. In my case I'm
starting at A5.
Q1. As I'm only using 3 inputs what value do I put in the ADC10DTC1
register? Should it actually be 3 (I've only set 3 bits in the ADC10AE
enable register). Or will the ADC10 convert the 6 inputs from A5 to A0?
Q2. Depending upon the answer to Q1 I guess my address for data transfer
will need to be 6 words deep.
I've searched for examples/application notes but have failed in my quest so
far.
TIA
Stephen
--- In msp430@msp4..., "Stephen Bashford" <sbashford@m...>
wrote:
> However, I've just started working with the ADC10 on the f1232 and
this is
> quite different.
I very much like the F1232's ADC10, although I haven't used the
F149's so I can't really compare. The ADC10 does an awful lot for
you that's missing on many other microcontrollers with built-in ADCs.
> I'm using 3 analogue inputs A0, A1 & A5.
I'm planning to use a
sequence of
> channel conversion but am unsure exactly how much
result memory
I'll need.
You will need a word for each result. The ADC10 was designed with
the idea that, if you have 3 analog inputs, you'd use A0, A1, and A2 -
- at least for the most 'efficient' implementation.
> Q1. As I'm only using 3 inputs what value do
I put in the ADC10DTC1
> register? Should it actually be 3 (I've only set 3 bits in the
ADC10AE
> enable register). Or will the ADC10 convert the 6
inputs from A5 to
A0?
The later. The ADC10AE bits are only used to disconnect the digital
logic input buffers since applying analog signals to such gates will
(inbetween well-defined logic levels) cause cross conduction and
hence more power dissipation in the chip.
> Q2. Depending upon the answer to Q1 I guess my
address for data
transfer
> will need to be 6 words deep.
Yep! ...or you could move the 3rd input to A2. Perhaps more
importantly than the wasted storage space would be the fact that your
A/D will be spending time converting three channels you'll never use,
so the overall sampling rate you can achieve will be halved? This
may not matter for your application, of course.
> I've searched for examples/application notes
but have failed in my
quest so
> far.
There isn't any automated-in-hardware method to 'skip' channels
in a
sequence. You certainly could write an interrupt routine that
provided such functionality if it does matter to you -- it would use
relatively few CPU cycles.
---Joel Kolstad
P.S. -- My biggest wish for the ADC10 is that they would have used a
separate analog ground pin on the chip, as they do for the F149!
Reply by Stephen Bashford●January 24, 20042004-01-24
> You will need a word for each result. The ADC10 was designed with
> the idea that, if you have 3 analog inputs,
you'd use A0, A1, and A2 -
> - at least for the most 'efficient' implementation.
>
Thanks, I expected as much. I'm afraid that due to other issues
I'm stuck
with A5, A1 & A0.
Time of the conversions is not an issue so I don't mind the wasted time
with
A4-A2. Memory wastage is more of an issue but I'll have to live with that.
Thanks for the help, I'll start testing on Monday when back at work.
Cheers,
Stephen
Signal Processing Engineer Seeking a DSP Engineer to tackle complex technical challenges. Requires expertise in DSP algorithms, EW, anti-jam, and datalink vulnerability. Qualifications: Bachelor's degree, Secret Clearance, and proficiency in waveform modulation, LPD waveforms, signal detection, MATLAB, algorithm development, RF, data links, and EW systems. The position is on-site in Huntsville, AL and can support candidates at 3+ or 10+ years of experience.