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 on pic16f628

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



Joined: 20 Feb 2012
Posts: 4

View user's profile Send private message

i2c on pic16f628
PostPosted: Mon Feb 20, 2012 1:02 pm     Reply with quote

As I can realize program I2C on pic16f628 as I understand hardware i2c at it wasn't present. I badly know English, excuse me!!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Feb 20, 2012 1:26 pm     Reply with quote

If your PIC doesn't have an MSSP module, the CCS compiler will
generate code for a software i2c Master on the pins that you specify
in the #use i2c() statement.

But, you can't do an i2c slave. The #use i2c() statement requires a
hardware SSP or MSSP module to do a i2c slave.

So for a 16F628 you can make:
1. Software i2c master
2. But no i2c slave.
reno777



Joined: 20 Feb 2012
Posts: 4

View user's profile Send private message

PostPosted: Mon Feb 20, 2012 1:31 pm     Reply with quote

PCM programmer wrote:
If your PIC doesn't have an MSSP module, the CCS compiler will
generate code for a software i2c Master on the pins that you specify
in the #use i2c() statement.

But, you can't do an i2c slave. The #use i2c() statement requires a
hardware SSP or MSSP module to do a i2c slave.

So for a 16F628 you can make:
1. Software i2c master
2. But no i2c slave.

I want Software i2c master.
The block diagram of my device looks here so
I realized UART, but I can not realize I2C.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Feb 20, 2012 1:52 pm     Reply with quote

Have you tried to do it ? Have you tried to write the code and test it ?
What is the manufacturer and part number of the sensor ?

Here is an example of a software i2c master for an external A/D converter chip:
http://www.ccsinfo.com/forum/viewtopic.php?t=32570&start=13
reno777



Joined: 20 Feb 2012
Posts: 4

View user's profile Send private message

PostPosted: Mon Feb 20, 2012 2:10 pm     Reply with quote

PCM programmer wrote:
Have you tried to do it ? Have you tried to write the code and test it ?
What is the manufacturer and part number of the sensor ?

Here is an example of a software i2c master for an external A/D converter chip:
http://www.ccsinfo.com/forum/viewtopic.php?t=32570&start=13

There is no I didn't try to make it, to begin with I have studied the documentation on PIC16f628, and have seen that there isn't present hardware I2C, now I try to learn as to realize it software I2C, sensor LSM303DLH
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Feb 20, 2012 2:24 pm     Reply with quote

Do you have an LSM303DLH board from some company (Sparkfun, or Polulu) etc. ? If so, tell us.
reno777



Joined: 20 Feb 2012
Posts: 4

View user's profile Send private message

PostPosted: Mon Feb 20, 2012 2:37 pm     Reply with quote

PCM programmer wrote:
Do you have an LSM303DLH board from some company (Sparkfun, or Polulu) etc. ? If so, tell us.

I have bought sensor Sparkfun LSM303 Breakout Board - Tilt Compensated Compass.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Feb 20, 2012 3:48 pm     Reply with quote

I have one of those boards here, but we never used it. I don't have time
to work on it now. There is LSM303DLH code in the forum archives.
It may or may not work. You can look for it.
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