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 Hardware problem

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







I2c Hardware problem
PostPosted: Fri Dec 26, 2003 2:36 pm     Reply with quote

Hi, everyone.
I 've doing some tests about the i2c hardware built-ins on a 16f876, but they didn't work.
Does anybody know about a bug on the compiler or something else ?
My circuit is ok, because software routines programmed on my own, work fine.
Thanks a lot !
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Dec 26, 2003 3:32 pm     Reply with quote

Quote:
My circuit is ok, because software routines programmed on my own, work fine.

So this means you did not use the CCS software i2c libraries ?
You wrote your own driver ?

Quote:
I 've doing some tests about the i2c hardware built-ins on a 16f876, but they didn't work.

Are you using the CCS i2c library for this ?

Questions:
1. Do you have a pull-up resistor on both SDA and SCL ?

2. What version of the CCS compiler do you have ?
burnsy



Joined: 18 Oct 2003
Posts: 35
Location: Brisbane, Australia

View user's profile Send private message Send e-mail Visit poster's website

i2c problems
PostPosted: Fri Dec 26, 2003 9:23 pm     Reply with quote

I had problems immediately with the 16F876, using the CCS routines. I was using FAST. The moment I used SLOW all the problems went away.
As speed hasn't been an issue, I didn't bother to figure out why. Give that a try.

Watch the restart_wdt too.

Here's a snipit of my i2c code..compiled with V3.055.
#use I2C(MASTER, SDA=PIN_C4, SCL=PIN_C3, NOFORCE_SW, SLOW, RESTART_WDT)

NOFORCE_SW is what I used previously. My new compiler manual may have replaced it with FORCE_HW??

Good Luck..
_________________
This is the last code change until its ready....
Duke



Joined: 26 Dec 2003
Posts: 2
Location: Buenos Aires - Argentina

View user's profile Send private message MSN Messenger

PostPosted: Mon Dec 29, 2003 7:45 am     Reply with quote

[quote="PCM programmer"]
Quote:
My circuit is ok, because software routines programmed on my own, work fine.
So this means you did not use the CCS software i2c libraries ?
You wrote your own driver ?


Exactly. In fact I couldn't use them. Because they didn't work fine.

Quote:
I 've doing some tests about the i2c hardware built-ins on a 16f876, but they didn't work.

Are you using the CCS i2c library for this ?


I was trying. Because when I tried to use them they had failed and I had to program my own i2c software built-ins.

Quote:

Questions:
1. Do you have a pull-up resistor on both SDA and SCL ?

Yes. I do. Remember that my software routines work fine, so it isn't a circuit problem.

Quote:

2. What version of the CCS compiler do you have ?


How could I know that ?
_________________
FC
Duke



Joined: 26 Dec 2003
Posts: 2
Location: Buenos Aires - Argentina

View user's profile Send private message MSN Messenger

Re: i2c problems
PostPosted: Mon Dec 29, 2003 7:48 am     Reply with quote

burnsy wrote:
Quote:
I had problems immediately with the 16F876, using the CCS routines. I was using FAST. The moment I used SLOW all the problems went away.
As speed hasn't been an issue, I didn't bother to figure out why. Give that a try.

Watch the restart_wdt too.

Here's a snipit of my i2c code..compiled with V3.055.
#use I2C(MASTER, SDA=PIN_C4, SCL=PIN_C3, NOFORCE_SW, SLOW, RESTART_WDT)

NOFORCE_SW is what I used previously. My new compiler manual may have replaced it with FORCE_HW??

Good Luck..


Ok, thanks. I will try and tell you how it worked.

_________________
FC
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