bozak Posted June 11, 2008 Report Share Posted June 11, 2008 Hi,First I'd like to say that this is a great website and Thorsten (and everyone else), thanks for sharing your knowledge & designs.I have read lots & learned a little, but need help to know if what I am planning is possible.I hope I am posting in the relavent section of the forum.I am planning to build a DJ type midi mixer using MIDIbox, mostly for scratching & mixing using a digital vinyl system.For a description of what the hell a digital vinyl system is have a look here.http://www.mixxx.org/wiki/doku.php/vinyl_controlThe software I use is xwax http://www.xwax.co.uk/The problem with these systems is (for my setup) is the audio is routed out to a mixer, if i want to record my mix I have to route the audio back into the computer.This could be much more flexible if this mixing can be done in software with a midi mixer.I posted before about which faders would be a good choice for heavy duty scratching and have decided to use Infinium optical faders.I want to use three of these, one for a cross fader, and two for channel faders to control volume changes in software on the computer.I also want to use standard pots, buttons, maybe LEDs for controlling other functions such as EQ & effects. So MIDIbox64 seems a good choice.I have basic electronic skills but cannot design circuits, but have reasonable computer knowledge including programming in perl (and BBC basic).Digital electronics makes more sense to me as it works the same as a computer (obviously). I digress.I have a few questions on how to implement the Infinium faders into my design.They can interface using SPI, which the PIC18F452 can do out of the box, but only has one slave select pin. Am I correct so far?So, I plan to daisy chain three (maybe more later on) faders like so.The data sheet for the PIC18F452 tells me I should use these pins for SPIRC4 and RC5 for SPI data in & data out.RC3 for the clock.RA5 for slave select.But it seems the MIDIbox Core Module uses the RC3 & RA5 pins for other things, so how do I hook up the faders via SPI ?Am I being stupid here?Next questions:Now, assuming i have managed to connect everything as above I need to get coding.The data sheet for the fader tells me the fader sends two bytes to the SPI master. the first is the position of the fader, the second is reserved for for error checking. I assume I can ignore the second byte.So, when daisy chained I send 6 dummy bytes to receive six bytes in return, three of which are discarded, the other three values are processed & sent out as midi data.Is this the right way to do it?I'm also assuming i need to code this in ASM or can I do this in C ?here is a link to the data sheet of the Infinium fader. http://www.infiniumtechnologies.com/downloads/20060804_14/downloadsorry for the long post.ThanksRob Quote Link to comment Share on other sites More sharing options...
stryd_one Posted June 11, 2008 Report Share Posted June 11, 2008 If you want to use SPI you should bitbang it, rather than using the inbuilt peripheral, however I'd say you'd be better off using the analog output of the fader and the AIN features on the core. The core will support up to 8 faders without an AINx* module, or up to 64 with the modules. Quote Link to comment Share on other sites More sharing options...
fluke Posted June 12, 2008 Report Share Posted June 12, 2008 The slave select pin is for when the PIC is being an SPI slave. For master mode, just use any I/O pin to select the slaves, one per slave. Quote Link to comment Share on other sites More sharing options...
bozak Posted June 15, 2008 Author Report Share Posted June 15, 2008 Hi, thanks for the replies.stryd_one: you mentioned in another thread that you should use the SPI mode of these faders, as the voltage of the faders output in analogue mode is only 3.3 volts. I thought it would be easier using digital than adding extra electronics to adjust the voltage.fluke: can I use the digital inputs and outputs from the DIN & DOUT modules to connect to a slave?cheers Quote Link to comment Share on other sites More sharing options...
stryd_one Posted June 16, 2008 Report Share Posted June 16, 2008 stryd_one: you mentioned in another thread that you should use the SPI mode of these faders, as the voltage of the faders output in analogue mode is only 3.3 volts. I thought it would be easier using digital than adding extra electronics to adjust the voltage.You're absolutely right. I mean, I am. I mean, I was. I mean, we are. We was. Something. Just use SPI ;D(PS - Props for using the search engine, which you clearly have!!)But yeh, not the built in peripheral - bitbang it. It might pay to keep an eye on the SD card project. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.