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 Communication Problem

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



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Jul 22, 2013 10:27 am     Reply with quote

I don't know how to make it work in Proteus. Proteus has weird things
like digital and analog pull-ups. It also may not work without the i2c
debugger turned on. I don't want to solve these problems. I only
use hardware to test i2c. The following method works with two hardware
boards (or two PICs on one board):

Use the CCS example file code, Ex_Slave.c, for the Slave PIC.
It's in this directory:
Quote:

c:\Program Files\picc\Examples\Ex_Slave.c


Use the code in this post for the Master PIC:
http://www.ccsinfo.com/forum/viewtopic.php?t=32368&start=3

Use these connections:
Code:


                +5v
                 |
                 <
                 > 4.7K       
To               <         
Master PIC       |           To Slave PIC
SDA pin   ------------------ SDA pin 
(pin C4)                     (pin C4)   

                +5v
                 |
                 <
                 > 4.7K       
To               <         
Master PIC       |           To Slave PIC
SCL pin   ------------------ SCL pin 
(pin C3)                     (pin C3)   


To
Master PIC                  To slave PIC
ground    ----------------- ground (Vss pins) 
(Vss pins)       |
               -----
                ---  Ground
                 - 
blacknyellow



Joined: 22 Jul 2013
Posts: 2

View user's profile Send private message

PostPosted: Tue Jul 23, 2013 4:04 am     Reply with quote

Thank you sir. Maybe i should test my code on the board
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