Hi,
I am trying to read the internal temperature sensor value of ADS1118. It is interfaced with ATmega128 microcontroller using spi interface. The pin connection is ,
ADS1118 Atmega128
CS ----> SS
DIN ----> MOSI
DOUT -----> MISO
SCK ------> SCK
I am using the following coding,
PORTB &=(~(1<<SS));
SPI_WRITE(0xBD);
SPI_WRITE(0x92);
SPI_WRITE(0x00);
SPI_WRITE(0x00);
PORTB |=(1<<SS);
delay_ms(10);
PORTB &=(~(1<<SS));
data_MSB = SPI_READ(0x00);
data_LSB = SPI_READ(0x00);
config_MSB =SPI_READ(0x00);
config_LSB =SPI_READ(0x00);
PORTB |=(1<<SS);
The problem is my DOUT pin is always in high state. DIN pin shows the correct value which is send. But i am not gettting any valid output from the IC. Please kindly help me.