View previous topic :: View next topic |
Author |
Message |
jmaudley
Joined: 01 Feb 2011 Posts: 32 Location: 53
|
I2C chip address AD7150 |
Posted: Mon Jul 03, 2017 6:06 am |
|
|
Just about to start a project using an AD7150 Capacitance to Digital chip.
My circuit is using a PIC18f26k80 master connected i2c to a single AD7150 slave.
This is the first time of used i2c so I'm reading the AD7150 datasheet to try and work it out.
First of probably many questions:
How do I identify my AD7150?
Do I need to read the slave address to identify it before I can talk to it?
The chip has a CHIP ID register (8bit) and a serial number register (32bit).
Is the chip ID the slave address?
Do I have to Ping it with an address to detect it? |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19506
|
|
Posted: Mon Jul 03, 2017 6:36 am |
|
|
You are being too complex....
The I2C address is described on page 21 of the data sheet:
Quote: |
The start byte address for the AD7150 is 0x90 for a write and
0x91 for a read.
|
Start by using the I2C scanner program (in the code library). Run this. It should find the chip on this address pair. If it doesn't, you have a hardware problem and need to find this before proceeding....
Hopefully you are running everything off a 3.3v (or close to this) supply?. |
|
|
jmaudley
Joined: 01 Feb 2011 Posts: 32 Location: 53
|
|
Posted: Mon Jul 03, 2017 6:55 am |
|
|
Thought I'd read the data sheet cover to cover (clearly I missed this).
Thanks. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19506
|
|
Posted: Mon Jul 03, 2017 7:01 am |
|
|
It's when you are on the tenth time through, and another person finds it in 2 seconds that you know you are getting 'double glazed'.... |
|
|
jmaudley
Joined: 01 Feb 2011 Posts: 32 Location: 53
|
|
Posted: Mon Jul 03, 2017 7:04 am |
|
|
Very true.
I was on number nine. |
|
|
drh
Joined: 12 Jul 2004 Posts: 192 Location: Hemet, California USA
|
|
|
jmaudley
Joined: 01 Feb 2011 Posts: 32 Location: 53
|
|
Posted: Mon Jul 03, 2017 7:54 am |
|
|
Thanks |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9225 Location: Greensville,Ontario
|
|
Posted: Mon Jul 03, 2017 8:28 am |
|
|
Be sure to have the correct I2C bus pullup resistors ! While you mention a device, if it's on a PCB ( aka 'module' ) perhaps they HAVE resistors already installed.
As noted, 1st stop is to download and run the I2C scanner program.
I used it the other day as I had a 'seniors moment' and forgot about how some decide on addresses. I'm always thinking 8 bit mode, 'them'... 7 bit.
sigh...
30 seconds after I2C was run, the light bulb came on....
double sigh... ...
Jay |
|
|
|