Interfacing AD5933 with teensy3.2, I2C issue

Status
Not open for further replies.

Abbasi

Member
hello every one,
I am using teensy3.2 i want to interface teensy3.2 with AD5933, but when i used basic scanner example of i2c_t3-master.h library, the AD5933 is not responding, i am using 5V, 4.7kohm pullup resistor and 18 SDA0 ,19SCL0 pins, AD5933 is working because when i interfaced this IC with arduino using wire.h library its responding, do you have any idea why its not working, please share your valuable experience, i will be grateful to you.
 
First, the Teensy is a 3.3V system, so power the chip with 3.3V, too. Second, connect 3k3 resistors as pullups to 3.3v.
 
now i am using 3.3k ohm resistor with 3.3v but its still not responding.



Code:
#include "i2c_t3.h"


void setup()
{
  Wire.begin();

  Serial.begin(115200);
Wire.begin(I2C_MASTER,0x00,I2C_PINS_18_19, I2C_PULLUP_EXT, 400000);
  while (!Serial);            
  Serial.println("\nI2C Scanner");
}


void loop()
{
  byte error, address;
  int nDevices;

  Serial.println("Scanning...");

  nDevices = 0;
  for(address = 1; address < 127; address++ ) 
  {
    // The i2c_scanner uses the return value of
    // the Write.endTransmisstion to see if
    // a device did acknowledge to the address.
    Wire.beginTransmission(address);
    error = Wire.endTransmission();

    if (error == 0)
    {
      Serial.print("I2C device found at address 0x");
      if (address<16) 
        Serial.print("0");
      Serial.print(address,HEX);
      Serial.println("  !");

      nDevices++;
    }
    else if (error==4) 
    {
      Serial.print("Unknown error at address 0x");
      if (address<16) 
        Serial.print("0");
      Serial.println(address,HEX);
    }    
  }
  if (nDevices == 0)
    Serial.println("No I2C devices found\n");
  else
    Serial.println("done\n");

  delay(5000);           // wait 5 seconds for next scan
}
 
Is this the unmodified Scanner code? If yes there is still a a hardware problem. Or try 100KHz first.
 
this code is modified but i am using i2c_t3.h library for teensy3.2 i have already try 100kHZ but its not working...
Is this code is correct for teensy3.2??
 
Try using File > Examples > Wire > Scanner. That one definitely does work. I used it just yesterday!

If the scanner doesn't find your chip, maybe you have some sort of hardware problem? We might be able to help see if, if you show photos.

Some rare chips, like SGTL5000, do not respond until they receive a clock or reset pulse or some other way to turn them on.
 
Now i am using wire library but its still not working ,i have connected this IC with arduino using wire library its works, but when i connect teensy3.2 it does not responding, and on SCL pin i saw only 3.3v DC signal. I am unable to upload picture because whenever i try to upload the photo, after uploading i get this message every time "forum.pjrc.com says upload of file failed" and my picture type is "JPEG" or "PNG".
 
image.jpg it's circuit photo.
 
This photo creates more questions than it solves..
-Where is 3v3 connected?
-What's the red wire near USB?
-Are there pins soldered in the row where VBAT is?
-On the blue board with the chip I can see 3x 3.3V 3x GND, and I2C - Where is the output of the chip ?
- Is it correct that GND is connected to the red marked line on the breadboard, and 3.3V to blue?
- Have you checked if SDA and SCL are swapped?
- Can you post a link to the blue board, or post a schematic?
 
I don't see capacitors on the blue board - are there any?
Why are Pin 18 and 19 not soldered? From the photo, it looks like they are not.
I can't see this exactly on the photo... are you sure you use 18/19 and not 17/18?
 
Want to help figure out what's wrong, but indeed this photo is not good. Can't really see how the wires plug into the breadboard. Those paper labels were probably meant to help, but they block the view.
 
Maybe answer some of the questions above. The schematic is not helpful, it's just standard. The datasheet says you need some capacitors - it may work without, but not reliable so I'd add them. For I2C more likely there is something wrong with the physical connections (questions above). Can you post a better photo - a close up of the teensy on the breadboard with all connections and Tell us what this blue board is.
 
Thank you Gays, It Worked. You were right Frank, the problem was with physical connections. I refresh the teensy headers and it worked... I used wire library.....
Thank you Frank B, PaulStoffregen...Thanks a lot for your response and time...
 
Status
Not open for further replies.
Back
Top