Hello,
The usecase is the measurment of 2 voltagea of max -+10. I use Arduino
UNO (Atmega328) and two ADC components (AD7893ANZ-10), datasheet
available on
https://www.analog.com/media/en/technical-documentation/data-sheets/AD7893.pdf
, trying to make this run I faced two challenges which was not
solvable by my resaerches on it, why I hope for help here.
The issues are following:
1. The TWI adress of the ADC component is not avialable in Datasheet. I
tried three I2C device scanners, which I foundnon forumnof Arduino, but
no I2C device couldnt be found. One of scanners is posted below and the
scheme of the circuit(with pull up resistors etc.) is attached. on the
circuit scheme the pin "convst" is not connetcted but I also tried it
with convst pin being pulsed with T=12µs and D=50% according to
datasheet.
1 | #include <Wire.h>
|
2 |
|
3 | void setup()
|
4 | {
|
5 | int count = 0;
|
6 |
|
7 | Serial.begin (9600);
|
8 | Wire.begin();
|
9 | Serial.println ("I2C-Bus-Scanner");
|
10 |
|
11 | Wire.setClock(100000L);
|
12 | Serial.println("Scan mit 100 kHz");
|
13 | scan();
|
14 | Wire.setClock(400000L);
|
15 | Serial.println("Scan mit 400 kHz");
|
16 | scan();
|
17 | }
|
18 |
|
19 | void scan(void)
|
20 | {
|
21 | int count = 0;
|
22 |
|
23 | for (int i = 0; i < 128; i++)
|
24 | {
|
25 | Wire.beginTransmission(i);
|
26 |
|
27 | if (Wire.endTransmission () == 0)
|
28 | { /* gefunden */
|
29 | Serial.print ("ID = ");
|
30 | Serial.print (" 0x");
|
31 | Serial.println(i, HEX);
|
32 | count++;
|
33 | }
|
34 | delay (20);
|
35 | }
|
36 | Serial.print (count);
|
37 | Serial.println (" Devices gefunden\n");
|
38 | }
|
39 |
|
40 | void loop()
|
41 | {
|
42 |
|
43 | }
|
2. I considered also to use the SPI interface. But there are no CS and
no pin to connect MOSI on the ADC (see datasheet page9). The alternative
solution for CS pin is explained in data sheet as following: " To chip
select the AD7893 in systems where more than one device is connected to
the 68HC11's serial port, a port bit, configured as an output from one
of the 68HC11's parallel ports, can be used to gate on or off the serial
clock to the AD7893. A simple AND function on this port bit and the
serial clock from the 68HC11 will provide this function. The port bit
should be high to select the AD7893 and low when it is not selected. ";
I tried to figure out how to realize the AND function but its not even
clear for me if this is related to HW or SW yet.
I hope the problem is formulated detailed enough, if its not the case
pls let me know. every hint is appreciated :)