How to read data from external ADC MAX144 using STM32 microcontroller

353 Views Asked by At

I am facing a problem for last week in reading data from external ADC MAX144 using SPI and STM32L452. The confusion is how to receive data in buffer as there is no memory address or control register address is mentioned in the datasheet of ADC. The datasheet ADC is given below.

https://datasheets.maximintegrated.com/en/ds/MAX144-MAX145.pdf

What I tried is:

  1. I made a buffer of 2 bytes. (static unit_8 readBuffer[2])

  2. Then used receive command of HAL SPI ( HAL_SPI_Receive(&hspi3, readBuffer, 2, 5000)

  3. And transmit through USART to PC

The confusion is I am not giving any memory address or control register address for reading data as nothing about registers is mentioned in the datasheet of ADC and it is continuously sending data.

Please guide me someone has any idea about it. I stuck in this problem but don't understand it. Any leads will be highly appreciated.

Regards,

1

There are 1 best solutions below

0
On

I think the ADC stream the ADC output directly on the SPI data line, so there is no register to store data on the ADC