Searching \ for '[PIC]: 16F877 > MSSP >SPI >AD7715' 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/microchip/ios.htm?key=spi
Search entire site for: '16F877 > MSSP >SPI >AD7715'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: 16F877 > MSSP >SPI >AD7715'
2001\07\10@051311 by John

flavicon
face
Hello PIC.ers,

Is there anyone out there in PICland who has -successfully- used the
MSSP in SPI mode to communicate with an Analog Devices AD7715 adc?

Tony Kubek has a note in the PIC archives about talking MSSP>SPI to the
related AD7730. His source code looks nice & well encapsulated but
unfortunately he does not elaborate on the AD_SEND_BYTE routine he
invokes to do both a byte write & read together.
(Tony, if you're listening...?)

The 7730 is a part I played with a while back but dropped it in favour
of the 7715 -it's cheaper & more available here.  IIRC the 7730 registers
are all byte-wide & this lends itself to MSSP SPI comms. where the port
wants to deal in 8bit words only.
The 7715 transmits its 16bit adc data as a complete word, with no choice
in the matter. It doesn't look like the SSPSTAT,BF flag can be setup to trip
on incoming 16bit words, only 8bit.

Given the above, *and*  :
(a)     I'm already communicating I2C on the *same* bus lines
       of the MSSP. (no problems there)
(b)    I Must watch my TMR0  ISR  Ps&Qs while I'm about all this.

erm...  would it be a collective opinion out there that I give up using
the MSSP SPI and rather go to bit-banging the SPI on some other
I/O pins?   It feels that way right now.


   best regards,   John


e-mail from the desk of John Sanderson, JS Controls.
Snailmail:          PO Box 1887, Boksburg 1460, Rep. of South Africa.
Tel/fax:            Johannesburg  893 4154
Cellphone no:   082 741 6275
email:                spam_OUTjsandTakeThisOuTspampixie.co.za
Manufacturer & purveyor of laboratory force testing apparatus, and related
products and services.

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspamspam@spam@mitvma.mit.edu


2001\07\10@094029 by Andy Jancura

picon face
Hi John,

the SPI module sends the SCLK clock to AD7714 and synchronizes this way the
transfer of 16-bit data. So you can use

unsigned char SPI(unsigned char TX_Data)
(
  SSPBUF = TX_Data; // start clock and send data
  while(BF == 0)    // wait until new data ready
        ;
  return(SSPBUF);   // return new 8-bit data
)

main()
{
  Data_1 = SPI(0xFF);
  Data_2 = SPI(0xFF);
}


Andrej


_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

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


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