Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[PIC]: 16f84 as i2c slave ?

85 views
Skip to first unread message

Olin Lathrop

unread,
Sep 19, 2001, 12:29:26 PM9/19/01
to PIC...@mitvma.cut.mit.edu
> Is there any existing routines for running a 16f84 as an i2c slave ?

Probably.

> If not, does it mean it's impossible to do ?

It's definitely possible, although doing a software slave is harder than
doing a software master because the master owns the clock.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, ol...@embedinc.RemovE.com, http://www.embedinc.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


TH

unread,
Sep 19, 2001, 9:52:31 PM9/19/01
to PIC...@mitvma.counterspam.mit.edu
Hi Jean,

I'm currently trying to do just what you are talking of using a 16F628
(very similar to a 16F84). I've found a Microchip Appnote that explains how
to do it with the 16C5x series .

http://www.microchip.com/Download/appnote/category/16c5x/00541e.pdf

regards,

Tobie Horswill
thorswilATexmachina.qc.ca

----- Original Message -----
From: "Jean Schwoerer" <jean.sc...@ENS.RemoveThis.INSA-RENNES.FR>
To: <PIC...@MITVMA.Fight.Spam.MIT.EDU>
Sent: Wednesday, September 19, 2001 10:07 AM
Subject: [PIC]: 16f84 as i2c slave ?


> Hello all
>
> I've just joined the piclist, and i'm now starting with my first (stupid
?)
> question.


>
> Is there any existing routines for running a 16f84 as an i2c slave ?

> If not, does it mean it's impossible to do ?
>

> Thank for your help.
>
>
> --
> Jean Schwoerer

Jean Schwoerer

unread,
Sep 20, 2001, 8:21:09 AM9/20/01
to PIC...@mitvma.cut.mit.edu
At 10:55 PM 9/19/01 -0400, you wrote:
>Hi Jean,
>
> I'm currently trying to do just what you are talking of using a 16F628
>(very similar to a 16F84). I've found a Microchip Appnote that explains how
>to do it with the 16C5x series .
>
>http://www.microchip.com/Download/appnote/category/16c5x/00541e.pdf

Ok Tobie thanks for this infornation which will be very usefull !

Just another question : someone on the list (I can't remember who) advise
me to use new pic with on-board i2c (called SSI module i think) interface.
I can say it's my backup solutions, but I'm thinking about it. Is this
on-board interface easy to use or is it a good headache provider ?

Thanks.


--
Jean

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


Alan B. Pearce

unread,
Sep 20, 2001, 9:01:54 AM9/20/01
to PIC...@mitvma.spammers.are.scum.mit.edu
>Just another question : someone on the list (I can't remember who) advise
>me to use new pic with on-board i2c (called SSI module i think) interface.
>I can say it's my backup solutions, but I'm thinking about it. Is this
>on-board interface easy to use or is it a good headache provider ?

The 16F628 is available in a package which is pinout compatible with the
16F84, so my recommendation would be to use the same pins if you insist on
doing a software implementation in the 16F84. As for ease of doing it, I am
about to find out, using the F876 parts.

Tobie Horswill

unread,
Sep 20, 2001, 9:23:43 AM9/20/01
to PIC...@mitvma.fight.spam.mit.edu
Hum? IIRC the F628 doesn't have an MSSP peripheral so no hardware i2c or
SPI. It does have a USART though, so Asynchronous/Synchronous serial can be
done in hardware. I think the smallest Flash uC available with hardware i2c
is the F873 but I may be wrong.

I'm currently doing hardware i2c Master stuff with an F877 and I'd say it is
fairly straight forward if you are familiar with the usual PIC gotchas
(peripheral initialization, TRIS and such). Much simpler than doing it the
bit-banged way that's for sure. Especially for a slave part.

Jean, I'd like to hear what you come up with if you decide to stick to the
bit-banged slave on 16F84. It would make a nice addition to the PICFAQ
Input/Output section.

regards,

Tobie Horswill
thorswilATexmachina.qc.ca

Byron A Jeff

unread,
Sep 20, 2001, 3:13:37 PM9/20/01
to PIC...@mitvma.nothis.mit.edu
On Thu, Sep 20, 2001 at 02:15:51PM +0200, Jean Schwoerer wrote:
> At 10:55 PM 9/19/01 -0400, you wrote:
> >Hi Jean,
> >
> > I'm currently trying to do just what you are talking of using a 16F628
> >(very similar to a 16F84). I've found a Microchip Appnote that explains how
> >to do it with the 16C5x series .
> >
> >http://www.microchip.com/Download/appnote/category/16c5x/00541e.pdf
>
> Ok Tobie thanks for this infornation which will be very usefull !
>
> Just another question : someone on the list (I can't remember who)

That would be be me. The 16F87X family among others implements this interface.

> advise
> me to use new pic with on-board i2c (called SSI module i think) interface.


> I can say it's my backup solutions, but I'm thinking about it. Is this
> on-board interface easy to use or is it a good headache provider ?

I will admit that I haven't tested the i2c on the parts yet. So I cannot
provide any personal experience. However to quote the PIC midrange manual,
which is a must for PIC develoment:

"The SSP module in I2C mode fully implements all slave functions, except
general call support, and provides interrupts on start and stop bits in
hardware to facilitate software implementations of the master functions. The
SSP module implements the standard mode specifications as well as 7-bit and
10-bit addressing..."

It's simply a matter of configuring the port.

BAJ

0 new messages