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