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.

ADS112U04: How to read conversion result from adc to stm32f777 micro controller?

Part Number: ADS112U04
Other Parts Discussed in Thread: ADS122U04

Hi,

This question is related to stm32 and not ADS112U04 but any help or hint for a start  will be appericiated.

I want to use ADS112U04 to read temperature (by enabling temperature sensor mode) and send this result to STM32F777VI via UART interface. How can I achieve this? I'm new to this ADC as well as STM32. I have seen an example which does same with MSP430 microcontrollers, but I don't see such example with STM32. How to initialize this adc, how to put or get any data to/from UART.

  • Hi Heli,

    Welcome to the E2E forum!  Unfortunately I can't help you with setup of your micro or which pins to use for UART communication. But once you have that figured out it should not be difficult to communicate from any micro UART to the ADS122U04.  However there are a couple of key points.  The first is the ADS122U04 operates half-duplex which means you cannot send and receive to the device at the same time.  The second consideration is you must start the communication from the micro by first sending the synchronization word (0x55). 

    Make sure that TX from the micro goes to RX of the ADS122U04 and RX from the micro goes to the TX of the U04.  The grounds between the devices should also connect together.  I would start out reading and writing registers first.  Make sure you follow the protocol as shown in the datasheet in section 8.5.1.4 of the datasheet.

    To read from the internal temperature sensor, you will need to enable the TS bit in the configuration register 1.  You will then need to send the START/SYNC command to start the conversion.  Once the conversion has completed you can issue the RDATA command for the device to send you the data.

    Best regards,

    Bob B

  • Hi Bob,

    Thanks for the quick response. I have gone through data sheet and got an idea on how to read/write registers,measure the thermocouple voltage and temperature of the cold junction etc., but still not sure how to start sending RESET,RREG,WREG commands from micro uart program. However I have finalized setup for micro and adc. I hope Pseudo Code Example given in datasheet would help.

  • Hi Heli,

    Ultimately you will need a UART example from your micro vendor or from an example project found on the web.  In most cases you would write to a buffer after the UART is properly configured.  Every time you send communication to the ADS122U04 you need to start with the synchronization word.  So to issue the RESET command you would send two bytes (0x55, 0x06) to the ADS122U04.

    The write register command is 3 bytes.  The commands are structured where the first 4 bits are the actual command (true for both read and write) and the last 4 bits are the register you wish to read/write.  The write sequence is shown in Figure 61 and the read sequence is shown in Figure 60.  The only tricky thing about this is the register address which is actually the value left-shift 1.  A write command to register 0 is 0x40, and a write to register 1 is 0x42 (1<<1).

    When data are returned your code needs to read from the receive UART buffer on your micro.

    Best regards,

    Bob B