0
\$\begingroup\$

I'm doing test work in Proteus ISIS. Where in circuit used External ADC, but there is no modeling module in the proteus. And i can't test it.

This ADC using TWI(I2C) interface. ADC connection circuit:

ADC connection circuit

I use AVRGCC. Starting code:

I2C_StartCondition(); //Start 
I2C_SendByte(0b10010010); //AD7417 addr & Write
I2C_SendByte(0x01);//Configuration register addr
I2C_SendByte(0b00100000);//Select 1st MUX channel 
I2C_StopCondition();//Стоп

This code should switch MUX to 1 channel - 001

  • OTI is not used - 0
  • Fault queue (what is this?) - 00
  • Cmp / Int (what is this?) - 0
  • Shutdown, always on - 0

Am I doing right? How start conversion and get result? How to set external reference voltage?

For reading byte i useing I2C_ReadByte()

Excuse me for my bad English.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.