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 support@ccsinfo.com

I2C with 16F648/628A

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







I2C with 16F648/628A
PostPosted: Fri Nov 05, 2004 4:34 am     Reply with quote

hii

Someone know if the pic16F628A or the pic16F648 are working with the

build in commands of the I2C or that I need to build my own routine for

every command?

thank u.
rwyoung



Joined: 12 Nov 2003
Posts: 563
Location: Lawrence, KS USA

View user's profile Send private message Send e-mail

PostPosted: Fri Nov 05, 2004 8:54 am     Reply with quote

Look at the data sheets for the chips. It doesn't look like either one has I2C hardware in the chip.

Next, read the #use i2c entry in the compiler help file.

In general, the compiler tries to use built-in hardware if you specify the hardware connected pins. There are parameters for the #use i2c that let you override the hardware and force the compiler to include the bit-banging versions. If you were using the 16F877A (for example) then you have the choice of implementing your i2c routines using on-chip hardware or soley through software.

If the chip you have selected does not have hardware to support the function, then the compiler will insert the bit-banging versions.

As far as I know, there are 5 library routines, I2C_POLL, I2C_READ, I2C_START, I2C_STOP and I2C_WRITE supported by the compiler. Use the help file to read about each one.

Find some of the i2c example code and also look at some of the i2c eeprom driver code included with the compiler. You can compile the code and look at the LST file to see if the compiler is using the chip's hardware or bit-banging.

Rob Young
_________________
Rob Young
The Screw-Up Fairy may just visit you but he has crashed on my couch for the last month!
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