On Tue, 20 Apr 1999 10:50:19 +0100, you wrote: >I call upon the mighty piclist once more.... > >I've just been asked if I can help with a project involving a dual 12 bit >DAC (MAX144) and a dual 12 bit ADC (MAX5156) which are to be part of a >closed loop control system. The system has to have very fast response time >and the sampling speed will need to be in the region of 50k samples/sec. >This means I will need a part with a built in SPI interface. No problem as >we have an emulator for the 16C63 etc. > >However, this system is to be controlled via a 68HC12 over an SPI bus. >Hmmm. Now do any parts have 2 SPI interfaces? Because I think that's what >I'm going to need unfortunately. The PIC will (I suspect) be running pretty >well flat out performing it's control functions so a software implementation >is going to be tricky. > >Any suggestions? > You can configure the SCI to synchronous mode, and maybe get something useable that way. Note that the UART and SSP have the opposite bit-order, but you could compensate for this at the other end if using SCI for the comms. Remember that the SCI has double-buffering on TX and RX, which can help if the CPU is very busy.. I'd look at running the adc/dacs off a timer int to guarantee the sample rate, and polling the 68HC11 interface. If you can make the HC11 send slowy enough you could do it all in software. You might also look at using the SCI for the ADC/DAC, as it has independent TX/RX, and the double-buffering could leave more CPU time for other tasks, but watch out for th bit-order issue.