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.

TM4C123GH6PM: How to send data of 8 ADC PINS to another Tiva C Series MCU via UART

Part Number: TM4C123GH6PM


Hello All,

I'am using TM4C123 LAUNCHPAD and another TIVA C SERIES MCU TM4C129. I want to send the ADC data of 8 analog inputs from launchpad to TM4C129 MCU via UART.

Now ADC data is 12 bits and via UART we can send maximum 8 bits at a time. So I'am first converting the 12 bit data into 16 Bits and sending it in two packets of 8 bits .

On the receiving end I convert it back to 16 bits and use the data so that i do not have data loss.

However , BY this way I'am only able to send the data of maximum 4 ADC pins . How can I Send the remaining 4  ADC Pins Data.

My limitation is that I cannot use another UART Port.

  • Why can't you send more than 4 values?
  • Sumit Mourya said:
    However , BY this way  I'm only able to send the data of maximum 4 ADC pins

    Your key request here - unfortunately - presents the most needed & critical data as only,  "By this way!"       Is this not highly akin to the (always helpful),  "Does NOT Work?"

    Far more detail - which describes what is meant by,  "By this way" is required.       Minus this level of clarity - your helpers are,  "Left to guess."

    Guesses follow - along w/corrective action:

    • it may be that your UART pins "overlap/share" your chosen ADC pins.     Much UART data is exchanged w/"just 2 pins."    (UART_RX & TX)     Modem accommodation may extend this "pin burden."     A "messy" workaround would see you employ a "data selector or multiplexer" IC - such that you could  selectively "isolate" the analog signal from the (shared) ADC/UART pin.    In addition - you'd have to add software which would "switch those pins between "ADC & UART" modes.    Such would reduce signal "throughput" - but could be done - although "messy."
    • TM4C123 provides multiple pins w/ADC capability.     It is unclear if you've fully/properly analyzed the MCU's pin mix - so that you can "free" additional ADC pins.     There is NO requirement that ALL pins directed into their "alternate" ADC mode - stem from the same MCU Port!
    • Much of the strategy (above) over-flows to your "UART Port" selection.     Most always - upon a 2nd (or even 3rd pin review) a "better implementation" - may be devised.
    • If - even after an intense "MCU pin survey/review" - better pin selection does not reveal - you may employ the earlier noted, "Data Selector or Multiplexer" - to expand your UART capability - from "One channel into multiple."     (software & GPIO are required to properly "inform/direct" the Selector & Mux chips.)
    • There exist "Port Extender/Expander chips - both I2C & SPI - which may add 8 or 16 GPIO - at the cost of (just) 3-4 MCU GPIO.    Selecting a port - otherwise devoted to GPIO - AND which includes a UART - appears to meet your objective.
    • And - should "All else Fail" - use of an external ADC chip may be employed.     (usually transfers data via I2C/SPI.)

    Usually - it proves best to "Harvest" (& lock down)  the most complex MCU functions FIRST (such as ADC)  - followed by your other - "high priority" signal needs - in priority order.

    By, one or more - of  "THESE (DESCRIBED) WAYS" - you may be able to achieve your objective...