CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

I2C chip address AD7150

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
jmaudley



Joined: 01 Feb 2011
Posts: 32
Location: 53

View user's profile Send private message AIM Address

I2C chip address AD7150
PostPosted: Mon Jul 03, 2017 6:06 am     Reply with quote

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: 19538

View user's profile Send private message

PostPosted: Mon Jul 03, 2017 6:36 am     Reply with quote

You are being too complex.... Very Happy

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

View user's profile Send private message AIM Address

PostPosted: Mon Jul 03, 2017 6:55 am     Reply with quote

Thought I'd read the data sheet cover to cover (clearly I missed this).

Thanks.
Ttelmah



Joined: 11 Mar 2010
Posts: 19538

View user's profile Send private message

PostPosted: Mon Jul 03, 2017 7:01 am     Reply with quote

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'.... Laughing
jmaudley



Joined: 01 Feb 2011
Posts: 32
Location: 53

View user's profile Send private message AIM Address

PostPosted: Mon Jul 03, 2017 7:04 am     Reply with quote

Very true.

I was on number nine.
drh



Joined: 12 Jul 2004
Posts: 192
Location: Hemet, California USA

View user's profile Send private message

PostPosted: Mon Jul 03, 2017 7:37 am     Reply with quote

This document may come in handy.
http://www.nxp.com/docs/en/user-guide/UM10204.pdf?fsrch=1&sr=1&pageNum=1
_________________
David
jmaudley



Joined: 01 Feb 2011
Posts: 32
Location: 53

View user's profile Send private message AIM Address

PostPosted: Mon Jul 03, 2017 7:54 am     Reply with quote

Thanks
temtronic



Joined: 01 Jul 2010
Posts: 9243
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Mon Jul 03, 2017 8:28 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group