On Thu, Mar 11, 2010 at 8:31 PM, mattschinkel <[email protected]>wrote:

> I was thinking about doing this a few months ago to save pins. I did
> not bother to test this because on my pic 18f452, they will have to
> share the pin RC3/SCK/SCL and RC4/SDI/SDA. Sharing the clock line (SCK/
> SCL) should be ok since the direction is always an output.
>
> I worry about the SDI/SDA line. With SPI, this pin must always be
> input. Does the I2C lib change the direction of this pin?
>
> The SPI lib does not set the pin direction within the init procedure,
> the user must do it.
>

   I'm using a particular SPI device (SD card) which has a CS pin. Disabling
the SPI device will force an open impedance on all SPI lines. As long the
SPI and I2C are not used in the same time, remains the issues you have
pointed at, which seems software maintainable.
I hope I don't mistake here because I'm already working to the PCB.


>
> There is also the SSPSTAT register to worry about, so maybe a call to
> the init procedures before switching would solve these problems. I
> would like to find a proper solution for this as well. Any Idea's?
>
> Matt
>
> On Mar 9, 3:16 am, vasile surducan <[email protected]> wrote:
> > Hi all,
> >
> > It's been a long time since I used both SPI and I2C from MSSP. As far I
> > remember there is no issue using alternately SPI and I2C as long the
> unused
> > device on the bus is highZ.
> > Does anyone tested this recently on PIC18 ?
> >
> > thx,
> > Vasile
>
> --
> You received this message because you are subscribed to the Google Groups
> "jallib" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<jallib%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/jallib?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.

Reply via email to