Searching \ for '[PIC] SPI question' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/microchip/ios.htm?key=spi
Search entire site for: 'SPI question'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] SPI question'
2006\01\25@020912 by Sandeepa.D.Khale

picon face
I am using the SPI module on the 16f877a to interface to a ADC;therefore the
SDO pin is of no use in this interface as the PIC will only be receiving
data from the ADC.
The datasheet states
"If the SPI is only going to receive, the SDO output could be disabled
(programmed as an input)."

Does this mean that in the above case,SDO can be used as only a general
purpose INPUT and not as a general purpose OUTPUT?
Is there any way it can be made to function as a general purpose output even
while using the SPI module?

Thanks

2006\01\25@022738 by Jinx

face picon face
> The datasheet states
>  "If the SPI is only going to receive, the SDO output could be
> disabled (programmed as an input)."

Hi Sandeepa. On the previous page, the manual also states

"SDO must have TRISC<5> cleared" (ie it's an output if used
in its SPI context)

and

"Any serial port function that is not desired may be over-ridden
by programming the corresponding data direction (TRIS) register
to the opposite value"

This appears to me to say that if you aren't using SDO, it has to
be set to the opposite of its SPI function, which is as an input

2006\01\25@030503 by Michael Rigby-Jones

picon face


>-----Original Message-----
>From: spam_OUTpiclist-bouncesTakeThisOuTspammit.edu [.....piclist-bouncesKILLspamspam@spam@mit.edu]
>Sent: 25 January 2006 07:09
>To: piclistspamKILLspammit.edu
>Subject: [PIC] SPI question
>
>
>I am using the SPI module on the 16f877a to interface to a
>ADC;therefore the SDO pin is of no use in this interface as
>the PIC will only be receiving data from the ADC. The
>datasheet states  "If the SPI is only going to receive, the
>SDO output could be disabled (programmed as an input)."
>
>Does this mean that in the above case,SDO can be used as only
>a general purpose INPUT and not as a general purpose OUTPUT?
>Is there any way it can be made to function as a general
>purpose output even while using the SPI module?

The answer is no because the MSSP peripheral overrides the port data latch.  You can use it as a digital input or as SDO with the MSSP configured for SPI.

Regards

Mike

=======================================================================
This e-mail is intended for the person it is addressed to only. The
information contained in it may be confidential and/or protected by
law. If you are not the intended recipient of this message, you must
not make any use of this information, or copy or show it to any
person. Please contact us immediately to tell us that you have
received this e-mail, and return the original to us. Any use,
forwarding, printing or copying of this message is strictly prohibited.
No part of this message can be considered a request for goods or
services.
=======================================================================

2006\01\25@032237 by Robert Rolf

picon face
Yes.
The pin multiplexer prevents use as an output if SPI is enabled,
but you can still read the pin directly with PORTC if it's an input.

Why didn't you just read the PORTC description in the manual or
write some code to test it?

Robert

Sandeepa.D.Khale wrote:

{Quote hidden}

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