There are 11 input pins for ADC on TM4C123G Launchpad. How many can I use simultaneously? There are 4 priorities, so is it 4?
Thank you in advance,
Amey
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.
There are 11 input pins for ADC on TM4C123G Launchpad. How many can I use simultaneously? There are 4 priorities, so is it 4?
Thank you in advance,
Amey
Might the answer depend upon your definition of, "simultaneously?" To my mind (perhaps few others) only one ADC channel at a given time may be measured/converted. The next channel in a sequence (called sequence step by this vendor) may follow quite quickly (w/in 1µS or even 500nS) but that does not qualify as (truly) "simultaneously."
One of those 4 ADC sequences may contain up to 8 channels - which may target a single, or 8 different, or any mix of ADC channels.
Note that your LPad may limit the number of ADC channels - "brought out" to the board's header - for ease of connection.
cb1- said:To my mind (perhaps few others) only one ADC channel at a given time may be measured/converted
Two? There are two actual independent A/D converters on at least some of these devices (I thought all). Then they are sequenced.
Robert
While you're correct in noting that 2 independent ADCs exist - I'm uncertain as to their ability to be precisely "sync'ed" - thus perform the poster's requested, "simultaneous" conversion. As we both thought - that word was incorrectly/improperly chosen...
8 samples within 1ms is 125ksps, well within a single A/D and you have two.
Amey Chaware said:how many pins out of 11 available can I use without having to initialise the adc again is another question.
All of them, in fact you do not ever need to init again, just re-trigger the sampling.
Amey Chaware said:So, will it be better to pass them through a comparator
That depends on other factors, including whether/how much the threshold changes.
Robert
Robert Adsett said:8 samples within 1ms is 125ksps
Apparently I cannot do arithmetic. That's 8ksps (125ns max between samples).
Sheesh!
Robert
Might the use of the (lowly) "LM339" (or similar) QUAD analog comparator both improve & vastly speed/simplify this effort? (Ans: mais certainement)
Improve - these IC comparators are not "held hostage" by the MCU's need to continuously perform (thus update) conversions. They are always there - always on - awaiting a signals' "deviation" from the norm. And you can dial in the precise, "hysteresis level" to optimize performance - via simple resistor change. Proves far more complex @ MCU level.
Speed/simplify - why burden all of those MCU pins - and write dedicated SW - to perform a task "far more suited" for HW? And - as stated - the external comparators are never/ever "totally dependent" upon the MCU - not to mention the potential for failed conversions - and by the MCU's (slowed) conversion - when compared to the HW comparator's, "always there - always ready" capability.
MCU as, "kitchen sink" may not always make "most sense!" Especially when the implementation cost: eats pins, time, effort - and is better achieved via HW!
cb1- said:why burden all of those MCU pins - and write dedicated SW - to perform a task "far more suited" for HW?
That would depend on requirements and expertise. I'd be tempted to consider a couple of 2901s hooked up to an SPI shift register IFF I had other potential issues for the A/Ds and the threshold levels were constant. Also at very large volumes there may be cost reasons.
For some here the answer likely comes down to software expertise is easier to come by and software is far more malleable so it's worth doing it in SW to future-proof the design. Everyone and his uncle knows SW is easy so why fool around with that pesky analog HW? That assumes, of course, that performance isn't an issue.
Robert
This is one time/place where I do not find your argument convincing.
You've no response to:
a) MCU holding the comparison "hostage" until the present ADC's conversion fully completes - or even "if" it completes. ADCs have been known to "hang" then what?
b) Poster/staff must master the ADC, and the digital comparator & then the transfer of data between the two. That's a bit much.
c) Due to the slowed measurements and resulting delay in comparator response time - the MCU method may "miss" a significant (yet transient) event.
d) As you surely know - quad comparators - w/even one "free section" may be massaged into: oscillators, logic gates, even flip-flops. And - with some design consideration - "selective fill" of the pcb may allow any/all of those functions to be easily implemented.
Kitchen sinks serve a needed role - yet rarely are they featured in, "Home & Gardens..."
cb1- said:a) MCU holding the comparison "hostage" until the present ADC's conversion fully completes - or even "if" it completes. ADCs have been known to "hang" then what?
If the conversion itself halts then surely your watchdog should catch it. If the conversion value is stuck, that's not different than the sensor failing at a fixed value (or a comparator latching), presumably you detect and deal with it in the same fashion as those cases.
cb1- said:b) Poster/staff must master the ADC, and the digital comparator & then the transfer of data between the two. That's a bit much.
No reason to use the digital comparator at his speed (I don't think there is data transfer between them in any case). A simple if is just as effective, far clearer and less complex to set up. As far as mastery, we've moved to a digital world1, I expect there will be less trepidation about learning how to control an A/D than about learning analog circuitry. I'm not sure this is an advance.
cb1- said:c) Due to the slowed measurements and resulting delay in comparator response time - the MCU method may "miss" a significant (yet transient) event.
User was specifying a 1mS scan time. Inputs should be filtered to slower than that. If there are transients faster than that both techniques will miss them because they are likely to happen between scans and should be filtered out in any case. If they are significant, then the specification needs a complete re-work.
cb1- said:d) As you surely know - quad comparators - w/even one "free section" may be massaged into: oscillators, logic gates, even flip-flops. And - with some design consideration - "selective fill" of the pcb may allow any/all of those functions to be easily implemented.
You can do a lot with analog and discrete digital, what you cannot do is easily field update, programmable analog is a pretty small niche at best. You can vary setpoints with trimpots but at this point I tend to view trimpots as items to be eliminated.
Robert
1 - To the extent that even simple stove hood fans apparently have a micro in control and need to be rebooted! See http://www.ganssle.com/watchdogs.htm That's a recommended rant to read BTW for anyone that does embedded SW. As are the various reports on the Therac incident and the risks list.