Hello Sam, Scott & PIC.ers, mmmm... I've been well helped by your SPI code, Sam. Thanks for that, & I've now got `up-and-running' bit-bashed asm code for driving an AD7715 16bit bridge transducer front end for my instruments. It works really well, and I don't mind sharing it with anyone else who wants to do this kind of thing. Why didn't I use the MSSP in the 16f877? Let's not go there... it's a long story. I'm sure what Scott was getting at was your code's non-use of read-modify-write instructions. This was one of the mods. I made for the 7715 routines & learnt long ago < ie the hard way :( > that any bit-twiddling instructions otta be wrapped in mirror registers. best regards, John >Date: Mon, 6 Aug 2001 11:22:47 -0700 >From: Sam Linder >Subject: Re: [PIC]: Need SPI code for 16F877 > >Instead of just criticiz...... .. .. > >> bsf SCLK // set SCLK high >> bcf SCLK // set SCLK low > > > >Are you sure that's the way you want to toggle an I/O? It probably >works fine, most of the time.... butt... > > >Scott 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: jsand@pixie.co.za Manufacturer & purveyor of laboratory force testing apparatus, and related products and services. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.