View previous topic :: View next topic |
Author |
Message |
murataltas
Joined: 29 Sep 2004 Posts: 3
|
24c256 |
Posted: Mon Nov 01, 2004 12:35 am |
|
|
how to connect pin for 16f877 |
|
|
Trampas
Joined: 04 Sep 2004 Posts: 89 Location: NC
|
|
Posted: Mon Nov 01, 2004 6:27 am |
|
|
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
|
|
Posted: Mon Nov 01, 2004 9:29 am |
|
|
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
|
|
Posted: Mon Nov 01, 2004 10:02 am |
|
|
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
|
|
Posted: Mon Nov 01, 2004 10:31 am |
|
|
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
|
|
Posted: Mon Nov 01, 2004 12:36 pm |
|
|
i've been programming with PICs and CCS C for ages.
what is this "hair" thing you people are talking about?
jds-pic |
|
|
Haplo
Joined: 06 Sep 2003 Posts: 659 Location: Sydney, Australia
|
|
Posted: Mon Nov 01, 2004 4:03 pm |
|
|
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
|
|
Posted: Tue Nov 02, 2004 1:42 pm |
|
|
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. |
|
|
|