Jump to content

Connect Infinium faders over SPI ?


bozak
 Share

Recommended Posts

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_control

The 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.

350px-SPI_three_slaves_daisy_chained.svg.png

The data sheet for the PIC18F452 tells me I should use these pins for SPI

RC4 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/download

sorry for the long post.

Thanks

Rob

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...