Thank you Michael: Very good information - I will give that a try when my sample Maxim 3100s= come in. I was actually wondering if anyone had used this chip - usuall= y one does not find all of the "features" of these things until you actua= lly hook them up in a circuit and try to use them. I will let you (everyone) know, Roy J. Gromlich Michael Rigby-Jones wrote : >=20 > Firstly you will need to configure the MSSP peripheral as an SPI Master= , > this is described in detail in the PIC datasheets. Essentialy you conf= igure > the PIC to set the master SPI mode, the clock rate, and the clock edge = on > which the data is sampled and sent. This is all information that shoul= d be > available in the SPI timing diagrams of the MAX3100. You will need to > define another PIC pin as a chip select signal for the MAX3100. >=20 > To send data via the MSSP, you simply write a byte to SSPBUF, and the d= ata > is automaticaly clocked out. As the data is clocked out, incomming dat= a is > simultaneously being read into an internal buffer. When the full 8 bit= s > have been sent, the SSPIF flag will be set and the incomming data will = be > transferred to SSPBUF. The Maxim device appears to require data in 16b= it > frames, so you will need to send two bytes. The order of operations wo= uld > therefore be: >=20 > Set chip select pin low > Write MSB of data to SSPBUF > Wait for SSPIF to be set (at this stage 8 bits have been sent, and 8 > received) > Clear SSPIF > Copy SSPBUF to MSB of incomming data variable > Write LSB of data to SSPBUF > Wait for SSPIF to be set > Clear SSPIF > Copy SSPBUF to LSB of incomming data variable > Set chip select (CS) pin high >=20 > At this stage you have sent the 16bits in data_out to the MAX3100, and = have > received 16 bits in data_in. >=20 > Regards >=20 > Mike >=20 ___________________________________ NOCC, http://nocc.sourceforge.net -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads