This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I am using the MSP430F5529 processor, I have two questions about the ADC_12 timer. I would like to understand how the SHI signal is generated and how to control its duration. For example SHI signal in the "Extended Sample" mode is wider than SHI signal in the "Pulse Sample" mode. I could not find this information in the family user's guide.
Thanks
Mahmoud
SHI comes from SHS, which (on the F5529) is either ADCSC (=0) or a timer (>0). [Ref data sheet (SLAS590N) Tables 6-11 and 6-14].
The rising edge of SHI is used to start the sample/hold period.
1) With SHP=1, SHT is used to time the sample/hold period -- some number of ADC clocks.
2) With SHP=0, the sample/hold period is as long as the high period after the rising edge. For a timer, you generate a PWM-ish output signal with OUTMOD. (You don't need to assign this signal to a pin, just set SHS appropriately.) I think it's the case that with SHS=0 you can set ADCSC high and low to generate this pulse, but I haven't tried that since it doesn't seem very useful (hard to calibrate).
Hello Bruce
Thanks for your reply, I could not find the datasheet you referred to, I am using the family user’s guide document, Please see table 28-5 in page 752 and figure 28-4 the extended sample mode (SHP=0). In this figure the SHI signal stays high for the entire sample and hold period and actually it decides this period. My question is what controls the duration of the SHI signal in this mode?
Thanks
Mahmoud
The F5529 datasheet is here. [Usually TI Search finds these documents by name; I don't know what's with this one]:
https://www.ti.com/lit/ds/symlink/msp430f5529.pdf
You (the program) provide SHI, in one way or another. With SHP=0:
and SHS=0 (ADCSC) you set ADCSC=1 (rising edge) to start the S/H and set ADCSC=0 (falling edge) to end it. You have to do this for every conversion (even with CONSEQ>0).
and SHS>0 (timer), you use OUTMOD to generate a pulse which provides the rising and falling edges, very much like PWM. The pulse width provides the S/H duration and the timer (PWM) frequency provides the sampling frequency.
With SHP=1, it's much the same except that the ADC cares only about the rising edge -- it provides the function of the falling edge (based on SHT). For the particular case of SHS=0 (ADCSC) it also turns off ADCSC for you, and toggles it for subsequent conversions (for CONSEQ>0).
Hi Bruce,
In the datasheet, it says that ADCSC set to zero automatically. Is this the case only when SHP=1? I mean do you mean when SHP=0 and ADCSC controls the width of the SHI signal, then the programmer need to set ADCSC =0 after the sample and hold has been finished?
Thanks
Mahmoud
Yes. (I didn't trust my memory, so I tried it before my explanation above.)
Also, I think most of User Guide (SLAU208Q) Sec 28.2.7.5 about MSC doesn't really apply with SHP=0 either. One consequence is that using CONSEQ=1 (batch conversions) with SHP=0 you need to generate N pulses rather than 1 (with SHP=1). You might as well use CONSEQ=3. It's perhaps surprising, but in context it's the only way it could work.
I expect if you did a survey you'd find almost nobody uses SHP=0. Someone was here a few years ago using SHP=0 to synchronize the S/H with sensor excitation. And I suppose it's useful if you don't like any of the SHT choices. But usually the S/H time isn't critical (as long as it's long enough).
Do you have a particular application in mind, or are you just curious?
Thank you Bruce for your response, I am using the MSP430F5529 as the evaluation board for my class.
Best
Mahmoud
**Attention** This is a public forum