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

24c256

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



Joined: 29 Sep 2004
Posts: 3

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

24c256
PostPosted: Mon Nov 01, 2004 12:35 am     Reply with quote

how to connect pin for 16f877
Trampas



Joined: 04 Sep 2004
Posts: 89
Location: NC

View user's profile Send private message MSN Messenger

PostPosted: Mon Nov 01, 2004 6:27 am     Reply with quote

I would recommend using copper wire, it is cheap and carries electrons well.

Of course I assume this is not your question, so why don't you try again...

Trampas
treitmey



Joined: 23 Jan 2004
Posts: 1094
Location: Appleton,WI USA

View user's profile Send private message Visit poster's website

PostPosted: Mon Nov 01, 2004 9:29 am     Reply with quote

I whould start with +5 to Vcc, Ground to Vss, SDA wired to PIC pin SDA with a pull-up resistor,SCL wired to PIC pin SCL with a pull-up.
A0 and A1 and A... tied to ground. Then test if you can talk to it.

Pull-up= a 4.7 K ohm resistor from a pin to Vcc.

This pulls the pin high. If you would read the level of the pin it would be +5V.
rnielsen



Joined: 23 Sep 2003
Posts: 852
Location: Utah

View user's profile Send private message

PostPosted: Mon Nov 01, 2004 10:02 am     Reply with quote

First, download the data sheets for both parts and study them a lot. Then, once you are familiar with each one, connect them with the pin that the data sheets say are for each signal. Then, write a simple little program to have them talk to each other.

Once you have done this and have tried and tried to get things to work, and half of your hair is gone from pulling it out, then place a post here for help.

Ronald
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Mon Nov 01, 2004 10:31 am     Reply with quote

Quote:

and half of your hair is gone from pulling it out, then place a post here for help.


correction

and half of your hair is gone from pulling it out, and other half is white, then place a post here for help



Humberto
Guest








PostPosted: Mon Nov 01, 2004 12:36 pm     Reply with quote

i've been programming with PICs and CCS C for ages.

what is this "hair" thing you people are talking about?

Wink

jds-pic
Haplo



Joined: 06 Sep 2003
Posts: 659
Location: Sydney, Australia

View user's profile Send private message

PostPosted: Mon Nov 01, 2004 4:03 pm     Reply with quote

You can use the driver CCS provides for 24C256. It is called 24256.C and is located in the \Drivers directory. The default connections for this driver are EEPROM_SDA <-> RB1 and EEPROM_SCL <-> RB0.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Nov 02, 2004 1:42 pm     Reply with quote

Here is one schematic. On the left side of page 2, look at U3.
It shows the connections for an EEPROM such as the 24LC256.
You will need the two resistors, R9 and R10, as well.
http://microengineeringlabs.com/downloads/labx1sch.pdf
The schematic shows that SCL on the EEPROM goes to pin C3 on the PIC,
and SDA goes to pin C4. Those are probably the best pins to use on
a 16F877. Then you have the option of using either hardware or
software i2c. If you use pins B0 and B1 as shown in the CCS example,
then you can only use software i2c. There's nothing wrong with that,
it just reduces your options.
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