Forums

how much is long a time to convert with the ADC?

Started by carmelo76 May 13, 2009
Hello everyone,
I'm working with MSP430f1611 and I want to read with the ADC12 and I
noticed that time between the call of the Read and the sleep of uC is about
40 ms. In particular the time between the call of the Read and the call of
ReadDone is long (like 16 ms). Why? I look the manual of MSP430f1611 and the
ADC is a SAR 12 bit and the clock is 5 MHz and so I expect a much lower
time!! What am I ignoring? What should I consider?

--


Beginning Microcontrollers with the MSP430

The hardware does not know how to to Read and how to do ReadDone. It executes instructions generated by the compiler/assembler according to the source code.

The hardware imposes the lower limit of how fast you can do it. The source code and the compiler/assembler determines the actual time required.

--- In m..., carmelo76 wrote:
> Hello everyone,
> I'm working with MSP430f1611 and I want to read with the ADC12 and I
> noticed that time between the call of the Read and the sleep of uC is about
> 40 ms. In particular the time between the call of the Read and the call of
> ReadDone is long (like 16 ms). Why? I look the manual of MSP430f1611 and the
> ADC is a SAR 12 bit and the clock is 5 MHz and so I expect a much lower
> time!! What am I ignoring? What should I consider?
>
> --
>
>

Hi,
How are we supposed to help you if you don't give us any information about your code?
What is Read? I guess it is a function, but what does it do?
What is ReadDone? Again, I guess it is a function, but what does it do?
How is the ADC12 configured?

> (...) time between the call of the Read and the sleep of uC is about
> 40 ms.
The ADC12 hardware has nothing to do with the uC entering sleep mode, if that is what you meant.

> I look the manual of MSP430f1611 and the ADC is a SAR 12 bit and
> the clock is 5 MHz and so I expect a much lower time!!
Your ADC result is 12 bit and your ADC clock is 5MHz. So what?. That is not nearly enought (nor the right) information to expect any conversion time.

It looks like you just copy/pasted a code that has an execution time that takes too long for you.

Please read the entire ADC12 chapter to understand how the ADC12 works and what steps (and times) are taken during an entire conversion cycle. Then analyze your MSP code and understand how it is configuring the ADC12. If there is still a time discrepancy, come back and tell us in which part of the code you're getting a different time than what you're expecting.

Michael K.

--- In m..., carmelo76 wrote:
> Hello everyone,
> I'm working with MSP430f1611 and I want to read with the ADC12 and I
> noticed that time between the call of the Read and the sleep of uC is about
> 40 ms. In particular the time between the call of the Read and the call of
> ReadDone is long (like 16 ms). Why? I look the manual of MSP430f1611 and the
> ADC is a SAR 12 bit and the clock is 5 MHz and so I expect a much lower
> time!! What am I ignoring? What should I consider?
>
> --
>
>

I use TinyOs and the language is NesC.
There are some library in TinyOs that give interface and module for hardware
operation indeed there are many hardware/software interface layer for the
same object for example Timer(generic timer)-> MSP430Timer->precision
timer..etc..; Read (generic sensor)-> MSP430ADC12... so I use the generic
interface given by TinyOs, furthermore I use a Low Power Management and I
found that the voltage reference (of ADC12) requires a 17ms warmup time,
before it can be used. Is it possible?
I look more information about ADC12 of MSP430f1611 on SLAS368E − OCTOBER
2002 − REVISED AUGUST 2006 on pag 41 (t_convert,t_ADC12on,t_sample..)
I think that you know more information about MSP430 hardware, and I ask an
hardware question! Simply!
Thanks
CA

hola Michael!
tintronic-2 wrote:
>
> Hi,
> How are we supposed to help you if you don't give us any information about
> your code?
> What is Read? I guess it is a function, but what does it do?
> What is ReadDone? Again, I guess it is a function, but what does it do?
> How is the ADC12 configured?
>
>> (...) time between the call of the Read and the sleep of uC is about
>> 40 ms.
> The ADC12 hardware has nothing to do with the uC entering sleep mode, if
> that is what you meant.
>
>> I look the manual of MSP430f1611 and the ADC is a SAR 12 bit and
>> the clock is 5 MHz and so I expect a much lower time!!
> Your ADC result is 12 bit and your ADC clock is 5MHz. So what?. That is
> not nearly enought (nor the right) information to expect any conversion
> time.
>
> It looks like you just copy/pasted a code that has an execution time that
> takes too long for you.
>
> Please read the entire ADC12 chapter to understand how the ADC12 works and
> what steps (and times) are taken during an entire conversion cycle. Then
> analyze your MSP code and understand how it is configuring the ADC12. If
> there is still a time discrepancy, come back and tell us in which part of
> the code you're getting a different time than what you're expecting.
>
> Michael K.
>
> --- In m..., carmelo76 wrote:
>>
>>
>> Hello everyone,
>> I'm working with MSP430f1611 and I want to read with the ADC12 and I
>> noticed that time between the call of the Read and the sleep of uC is
>> about
>> 40 ms. In particular the time between the call of the Read and the call
>> of
>> ReadDone is long (like 16 ms). Why? I look the manual of MSP430f1611 and
>> the
>> ADC is a SAR 12 bit and the clock is 5 MHz and so I expect a much lower
>> time!! What am I ignoring? What should I consider?
>>
>> --
>>
>>
>
>
>
>

--


Yes, for F1xx, you need 17ms to charge up the 10uF external cap to within 0.1% of Vref. (F2xx only needs 0.04ms to do the same.)

But if you turn on Vref and let it stay on, this does not add to ADC12 conversion time at all.

--- In m..., carmelo76 wrote:
>
>
> I use TinyOs and the language is NesC.
> There are some library in TinyOs that give interface and module for hardware
> operation indeed there are many hardware/software interface layer for the
> same object for example Timer(generic timer)-> MSP430Timer->precision
> timer..etc..; Read (generic sensor)-> MSP430ADC12... so I use the generic
> interface given by TinyOs, furthermore I use a Low Power Management and I
> found that the voltage reference (of ADC12) requires a 17ms warmup time,
> before it can be used. Is it possible?
> I look more information about ADC12 of MSP430f1611 on SLAS368E OCTOBER
> 2002 REVISED AUGUST 2006 on pag 41 (t_convert,t_ADC12on,t_sample..)
> I think that you know more information about MSP430 hardware, and I ask an
> hardware question! Simply!
> Thanks
> CA
>
> hola Michael!
>
>
> tintronic-2 wrote:
> >
> > Hi,
> > How are we supposed to help you if you don't give us any information about
> > your code?
> > What is Read? I guess it is a function, but what does it do?
> > What is ReadDone? Again, I guess it is a function, but what does it do?
> > How is the ADC12 configured?
> >
> >> (...) time between the call of the Read and the sleep of uC is about
> >> 40 ms.
> > The ADC12 hardware has nothing to do with the uC entering sleep mode, if
> > that is what you meant.
> >
> >> I look the manual of MSP430f1611 and the ADC is a SAR 12 bit and
> >> the clock is 5 MHz and so I expect a much lower time!!
> > Your ADC result is 12 bit and your ADC clock is 5MHz. So what?. That is
> > not nearly enought (nor the right) information to expect any conversion
> > time.
> >
> > It looks like you just copy/pasted a code that has an execution time that
> > takes too long for you.
> >
> > Please read the entire ADC12 chapter to understand how the ADC12 works and
> > what steps (and times) are taken during an entire conversion cycle. Then
> > analyze your MSP code and understand how it is configuring the ADC12. If
> > there is still a time discrepancy, come back and tell us in which part of
> > the code you're getting a different time than what you're expecting.
> >
> > Michael K.
> >
> > --- In m..., carmelo76 wrote:
> >>
> >>
> >> Hello everyone,
> >> I'm working with MSP430f1611 and I want to read with the ADC12 and I
> >> noticed that time between the call of the Read and the sleep of uC is
> >> about
> >> 40 ms. In particular the time between the call of the Read and the call
> >> of
> >> ReadDone is long (like 16 ms). Why? I look the manual of MSP430f1611 and
> >> the
> >> ADC is a SAR 12 bit and the clock is 5 MHz and so I expect a much lower
> >> time!! What am I ignoring? What should I consider?
> >>
> >> --
> >>
> >>
> >
> >
> >
> >
>
> --
>
>