Searching \ for '[PIC]: I2C for PIC-PIC communication?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/i2cs.htm?key=i2c
Search entire site for: 'I2C for PIC-PIC communication?'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: I2C for PIC-PIC communication?'
2000\06\21@144458 by Bennett, Matt

flavicon
face
I know I've seen plenty of messages about I2C here on the piclist, so I
tried to consult the archives, but the "web-nanny" this company uses
(Websense) blocks it under the category "Traditional Religions." !?! This
web-nanny proxy I'm forced to go through is one of the reasons I announced 2
days ago that I'm leaving this company, but I digress.

I've just started a design for a project that uses multiple PICs, (16F877s,
probably) on a single board.  I need to be able to communicate between them,
where one PIC is the main controller, and the other 4 are slaves to the main
controller.  They are all going to be in close proximity. I'm trying to
figure out how to talk between them- I've considered the PSP (parallel slave
port), SPI and I2C.

I've pretty much ruled out the PSP in an effort to cut down the number of
wires going around.  I'm now looking at the serial preipherals, and I'm a
bit confused.  I2C appears to be the simplest electrically and has the most
resources available on the web. I've seen plenty of stuff on how to
implement I2C, but little on when it is appropriate to implement it. Anyone
care to offer any opionions?  Is I2C appropriate for this project?  The vast
majority of what I have seen with I2C seems to be between a microcontroller
and some memory device, not microcontroller to microcontroller.

In an effort to get somewhere on this project, I'm going to postpone as much
coding as possible and start the schematic capture stage of the project
(using I2C) so I was wondering if there are any electrical caveats about
I2C, as in the topology of the SDA and SCL lines (point-point/star), where
to put the pull up resistors, and so on.



Matt Bennett

2000\06\21@184340 by Barry King

flavicon
face
Matt,

I guess today is I2C day.  If you have enough pins to drive the slave
select lines on the slaves then SPI is preferred because there is
hardware Master support in the PIC BSSP.

> (Websense) blocks it under the category "Traditional Religions." !?!

Cool!  Aren't intelligent machines great?

> so I was wondering if there are any electrical caveats about
> I2C, as in the topology of the SDA and SCL lines (point-point/star), where
> to put the pull up resistors, and so on.

I2C is a bus, and the total capacitance strongly affects your speed.
You can wire it either point to point, or as a star, its not
generally fast enough to create reflections.

If you are going PIC-to-PIC, the Master has to be bit-banged, so you
are not going to be very fast.

Look at the spec, search http://www.philips.com, I think.  It has
some suggestions on interleaving power and ground with SDA and SCL
when needed, but that's mostly for cabling.  The spec has bus
capacitance, speed and pull up value tradeoffs and calculations.

Regards,

Barry.
------------
Barry King, KA1NLH
NRG Systems "Measuring the Wind's Energy"
http://www.nrgsystems.com
Check out the accumulated (PIC) wisdom of the ages at:
PIC/PICList FAQ: http://www.piclist.org

2000\06\22@035346 by Alan B. Pearce

face picon face
The first step in using I2C is probably to go to the Philips web site, and get
the specification document. It is available as a PDF file. I found it without
much difficulty. It goes into the waveform timings, the different speed ranges,
and interfacing between different voltage families. This would be an essential
document to have if you want to try and bit bang the interface.

2000\06\22@085242 by ckchan

flavicon
face
Greetings,


does anybody know what is the maximum length for SDA and SCL ?? i mean, rs485 can
go to 1 or 1.5 KM, what about I2C lines ?


regards,
ckchan



"Alan B. Pearce" wrote:

> The first step in using I2C is probably to go to the Philips web site, and get
> the specification document. It is available as a PDF file. I found it without
> much difficulty. It goes into the waveform timings, the different speed ranges,
> and interfacing between different voltage families. This would be an essential
> document to have if you want to try and bit bang the interface.

2000\06\22@113423 by Jilles Oldenbeuving

flavicon
face
There are no spec's for the distance... it's dependant on the capacity of
the SDA/SCL lines.
I do know that philips makes a I2C bus extender....


Regards,

Jilles Oldenbeuving
spam_OUTjillesTakeThisOuTspamrendo.dekooi.nl
-----Oorspronkelijk bericht-----
Van: ckchan <.....ckchan4KILLspamspam@spam@PC.JARING.MY>
Aan: PICLISTspamKILLspamMITVMA.MIT.EDU <.....PICLISTKILLspamspam.....MITVMA.MIT.EDU>
Datum: donderdag 22 juni 2000 15:01
Onderwerp: Re: [PIC]: I2C for PIC-PIC communication?


>Greetings,
>
>
>does anybody know what is the maximum length for SDA and SCL ?? i mean,
rs485 can
{Quote hidden}

and get
>> the specification document. It is available as a PDF file. I found it
without
>> much difficulty. It goes into the waveform timings, the different speed
ranges,
>> and interfacing between different voltage families. This would be an
essential
>> document to have if you want to try and bit bang the interface.
>

2000\06\22@121015 by Bennett, Matt
flavicon
face
From: Barry King

> I guess today is I2C day.  If you have enough pins to drive the slave
> select lines on the slaves then SPI is preferred because there is
> hardware Master support in the PIC BSSP.

Is there a definitive resource for SPI like Philips has for I2C?

> If you are going PIC-to-PIC, the Master has to be bit-banged, so you
> are not going to be very fast.

Ok, I'm confused- is this the case for the 16F877?  The data sheet leads me
to believe that the '877 has hardware support for both master and slave I2C,
unlike the 16C77, which has hardware support for only slave.  I don't really
know enough about I2C at this point to be sure.

Sorry if I sent a similar message earlier, Microsoft lookOUT crashed on me
when I was trying to send this message earlier.

Matt

2000\06\22@133102 by w. v. ooijen / f. hanneman

picon face
> Is there a definitive resource for SPI like Philips has for I2C?

I searched hard, but I could not find any. Chapter 6 of the 6811 manual
seems to be the most cited reference. Let me known when you find something
better!
Wouter


'[PIC]: I2C for PIC-PIC communication?'
2000\07\25@085924 by Larry Pfeffer
picon face
We are planning to build a system with one I2C bus and multiple PIC-s (one
PIC87 and arbitrary number - maybe tens - PIC12-s) and serial EEPROM
(perhaps shared by all PIC-s -- if technically problematic than maybe on
separate I2C bus to Master). Not clear to us how to set up each PIC's and
EEPROM's I2C addressing - i.e. do we set some software "station address"
register on PIC-s (of course this wouldn't work for EEPROM) or do we have
build some hardware address resolver per PIC. I assume we can string large
number of devices (say PIC-s) on one bus.

Programming will be in PicBasic PRO.

If someone knows how this works, especially with PicBasic PRO, I'd
appreciate pointers to URL-s, etc.


Larry Pfeffer

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]: PIC only [EE]: engineering [OT]: off topic [AD]: advertisements

2000\07\25@171608 by Barry King

flavicon
face
Larry,

Can't help you on PICBASIC, but as far as I2C itself...

> do we set some software "station address"
> register on PIC-s

Yes, exactly.  You pre-arrange, (and probably burn into program ROM)
a slave address for each slave.  The address for the EE is pre-
arranged by the manufacturer.

> I assume we can string large
> number of devices (say PIC-s) on one bus.

Yes, that's exactly the reason for the I2C bus.  LARGE numbers can be
problematic, the bus has to run slower and slower the more load you
add.

It might be helpful to look at the I2C spec, its easy to find on the
Philips web site at http://www.philips.com

Also, the EEPROM manufacturers spec sheets re-iterate the I2C spec
for their specific device, so that's a good starting point.

------------
Barry King, KA1NLH
NRG Systems "Measuring the Wind's Energy"
http://www.nrgsystems.com
Check out the accumulated (PIC) wisdom of the ages at:
PIC/PICList FAQ: http://www.piclist.org

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]: PIC only [EE]: engineering [OT]: off topic [AD]: advertisements

2000\07\25@200138 by Larry Pfeffer

picon face
Barry,
Thanks!
Do you know if I2C can be used to connect separetely boxed SYSTEMS (not
CHIPS on a PCB) linked via short cables (abt. 1 meter) and plugs?

Regards,
Larry

At 05:01 PM 7/25/00 -0500, you wrote:
{Quote hidden}

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]: PIC only [EE]: engineering [OT]: off topic [AD]: advertisements

2000\07\25@213054 by Russell McMahon

picon face
Yes, you can use IIC between adjacent systems as long as you observe the
loading/speed rules.

BUT

I'll be so bold to venture that IIC isn't the best PIC-PIC system to use.
Apart from the difficulty of multi master, multi-slave implementations the
overheads seem unnecessarily high.

I would think that an RS422 arrangement with a custom multi-station protocol
would suffice or even plain unbalanced async at 5 volts (aka RS232 without
the high voltage bipolar drive). The latter can be made multi-sender by a
simple wired OR'ing with eg diodes and a pull up or open collector drivers
with a pullup  (which starts to look very like IIC). If IIC hardware can get
the range required then this can too and 422 can go MUCH further.

AFAICS the only clear advantage of IIC is that it allows variable speed data
flow but this is not too useful if the receivers are hardware driven.
RS232/async is trivial once interupt driven. Speed will be down on hardware
IIC.

IIC has inbuilt addressing  resolution but it's not too hard to develop
async token or flag-character based multi-station systems.

How many stations?
What data rate needed?
What range needed?

Some cpu's such as Philips LPCs (any PICs?) make this sort of task easy by
having a 9 bit UART with hardware recognition of addresses. Only addresses
assert the 9th bit and software need not be involved whatsoever until a
valid address arrives.

Up from here is eg CAN bus which lives on top of 422/485 but that's probably
far too complex for what you probably want.



     Russell McMahon
_____________________________

What can one man* do?   Help the hungry at no cost to yourself!
at  http://www.thehungersite.com/
(* - or woman, child or internet enabled intelligent entity :-))
From other worlds:
http://www.changingourworld.com    http://www.easttimor.com   http://www.sudan.com


{Original Message removed}

2000\07\26@101432 by Barry King

flavicon
face
I have to agree with Russell, using I2C is possible but inadvisable
when the distances get long and or you're going box-to-box.
Reasonable pull-ups just can't swing that much bus capacitance around
very fast.  Also- think about ESD protection.

I'd go to RS422/485, UARTS are everywhere.  Complexity of the
protocol depends on whether you need full duplex, multi master, etc.

------------
Barry King, KA1NLH
NRG Systems "Measuring the Wind's Energy"
http://www.nrgsystems.com
Check out the accumulated (PIC) wisdom of the ages at:
PIC/PICList FAQ: http://www.piclist.org

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2000\07\26@102435 by R. Monsees

flavicon
face
If you have to use I2C over long(ish) distances, you can always use
the P82B715 I²C-Extender which allows to extend to distance to 30 ft.
or more.

regards,
    Reelf Monsees
--
        BAMBERG & MONSEES GbR
Systeme für Wissenschaft und Technik
   Steindamm 22 * D-28719 Bremen
Fon +49-421-646775 * Fax +49-421-646785
http://www.ewetel.net/~bamberg.monsees/

Barry King schrieb:
{Quote hidden}

--
        BAMBERG & MONSEES GbR
Systeme für Wissenschaft und Technik
   Steindamm 22 * D-28719 Bremen
Fon +49-421-646775 * Fax +49-421-646785
http://www.ewetel.net/~bamberg.monsees/

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2000\07\26@112111 by Larry Pfeffer

picon face
Dear Barry and Russell,
Thanks a lot!!! Based on your input I'll look into RS422/485.
Larry Pfeffer
Jerusalem, Israel

At 09:50 AM 7/26/00 -0500, you wrote:
{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2000\07\27@081130 by Mike Mullen

picon face
I currently have a product which uses 120 feet (40 meters) of twisted pair to
communicate between 2 PICs using I2C.  Use the low speed, and drop the
pullups to 510 ohms.  I had included an RS232 option ( holes in the boards
for Maxim buffer chips), but never found it necessary.  Since the cable
provides power and ground, there seems not to be a problem with RFI, etc.
Mike Mullen

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2000\07\27@100822 by Larry Pfeffer

picon face
Mike,
At 08:11 AM 7/27/00 -0400, you wrote:
>I currently have a product which uses 120 feet (40 meters) of twisted pair to
>communicate between 2 PICs using I2C.  Use the low speed, and drop the
>pullups to 510 ohms.  I had included an RS232 option ( holes in the boards
>for Maxim buffer chips), but never found it necessary.  Since the cable
>provides power and ground, there seems not to be a problem with RFI, etc.
>Mike Mullen

Which PIC-s communicate via the above arrangement?
Do you think it would work for a PC87 and PIC12-s -- the latter don't have
hardware I2C support

Larry Pfeffer
Jerusalem

>
>--
>http://www.piclist.com hint: The PICList is archived three different
>ways.  See http://www.piclist.com/#archives for details.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2000\07\28@013508 by Mike Mullen

picon face
I used a 16C62 and 16C63 pair.  The PIC I2C output is an open-collector
transistor, which pulls the wire to ground.  The pullup resistors pull the
wire back up when you turn off the transistor.  The spec is 2.2K, but the
capacitance of the cable doesn't let it bring  the voltage in time for cables
longer than 10 meters or so (depends on your cable).  Drop the resistor
down, and it charges the cable faster.  The low voltage doesn't seem to be
effected by this, so I assume the transistor on resistance is considerably
less than 100 ohms.  The spec sheets will have this (or equivalent) info, but
I don't have it here.

I know some of the other chips have OC outputs, and I assume that they would
work similarly, even with a software I2C implementation.  I use CCS C
compiler, but have to do a SW emulation on (I think) the master, and HW on
the slave.

Mike Mullen

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestspam_OUTspamTakeThisOuTmitvma.mit.edu>

2000\07\28@115344 by Dan Michaels

flavicon
face
Mike Mullen wrote:
>I currently have a product which uses 120 feet (40 meters) of twisted pair to
>communicate between 2 PICs using I2C.  Use the low speed, and drop the
>pullups to 510 ohms.  I had included an RS232 option ( holes in the boards
>for Maxim buffer chips), but never found it necessary.  Since the cable
>provides power and ground, there seems not to be a problem with RFI, etc.


How low-speed means "low speed" here? I suspect this will be extremely
dependent upon the cable used. BW for a 1 nF cable would be about
1/(2*pi*510*1nF) = 300 Khz.

What kind of signal risetimes do you measure 40 meters out?

- danM

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamspam_OUTmitvma.mit.edu>

2000\07\30@231246 by Mike Mullen

picon face
Dunno what "low speed" means -- that is, there is a high speed and a low
speed I2C option in the CCS C compiler, and I chose "low speed".  If this is
echoed as a hardware setting, I was using a 20 MHz clock, BTW.  I never
measured the waveforms, just observed that the risetime was about 20% of the
clock width,  buttoned it up and shipped it out.  Something about "looking
gift horses in the mouth" comes to mind.  (I didn't need perfect
transmission, I put error checking and correcting in the link).   Damn, I was
glad I didn't have to put the RS232 in.
If we have one apart for repair or mod, I will try to check.

Mike Mullen
@spam@memullenKILLspamspamaol.com
TLA Systems
 "Yes, we can do that.  How much money do you have?"


 Dan Michaels <KILLspamoricomKILLspamspamLYNX.SNI.NET> wrote

<snip>
>How low-speed means "low speed" here? I suspect this will be extremely
>dependent upon the cable used. BW for a 1 nF cable would be about
>1/(2*pi*510*1nF) = 300 Khz.

>What kind of signal risetimes do you measure 40 meters out?

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

More... (looser matching)
- Last day of these posts
- In 2000 , 2001 only
- Today
- New search...