24 channels USB to I2S interface (with Source codes, ASIO/VHDL/Schematic) - diyAudio
Go Back   Home > Forums > Source & Line > Digital Line Level

Digital Line Level DACs, Digital Crossovers, Equalizers, etc.

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 14th November 2011, 04:04 AM   #1
diyAudio Member
 
Join Date: Nov 2006
Default 24 channels USB to I2S interface (with Source codes, ASIO/VHDL/Schematic)

Hi Now I'm making my USB-I2S interface.
I made stereo and 8channel USB-I2S project 2007 and 2008,
https://sites.google.com/site/koonau...-to-stereo-i2s
now expanding to 24bit 24 channels.

attached
(1) Board photo, UM232H module / IDT72V FIFO / DLP-HS-FPGA2 / Clock, Power, Buffer
(2) Schematic.
(3) VHDL source, single, about 800 lines. 1300 FFs.
(4) ASIO Host Driver source, about 600 lines. (ver 0.1! I want to tune)
(you need ASIO SDK and free VisualStudio to build)

Hardware
FIFO can be changed to Cypress or faster one, if you want synchronous speed.
FPGA module can be changed. maybe GameDuino, Lattice Brevia, etc will work.
Clock, more can be added to switch 44.1/48/88.2/96.
Isolation, you can add IL711 isoLoop.
Power supply, is your free choice.

Software
by looking into source code, you can find only some lines are specific for FTDI. and 90% of codes are for ASIO. the core is to make data format for the device, then write them to the device. about 40 lines.

VHDL
I only uses very simple VHDL, to understand / to modify. If you can read state-machine, you can read.

Now you have all materials to start your own, don't ask me - please DIY and enjoy
Attached Images
File Type: jpg Board_Photo.jpg (112.4 KB, 1622 views)
File Type: png SCH02.png (176.8 KB, 1605 views)
Attached Files
File Type: txt main.vhd.txt (36.0 KB, 194 views)
File Type: txt koonasio01.cpp.txt (17.1 KB, 122 views)

Last edited by KOON3876; 14th November 2011 at 04:11 AM. Reason: "about" hardware/software/VHDL
  Reply With Quote
Old 14th November 2011, 08:35 PM   #2
deandob is offline deandob  Australia
diyAudio Member
 
Join Date: Oct 2002
Location: Brisbane, Australia
Koon, great post, thank you, you have me thinking about an alternative method of implementing multi-channel bit perfect i2S. I have source code for a virtual sound card driver (MSVAD sample) that could be easily hooked up to the UM232H module, and through implementation of a simple serial protocol the hi-speed of the USB serial interface can easily cater for multi-channel. The virtual soundcard driver would be a nicer way to implement it as any application can use it, and not have to rely on tricks like ASIO4ALL inbetween to connect.

Even though the interface will not be standards based (eg. UAC2) that does not really matter. I also have dug deep into the FTDI modules in a previous project and 40Mbytes/sec is ample for hirez multichannel. Having a quick look at your code, I can't see how you are using the FTDI chip in hi-speed mode as you set the output baud at 115200? Or is this your signalling channel back to the PC (I haven't taken a good look at your code yet).

I'm thinking would it be easier to use a microcontroller like the Pic DSP series instead of the FPGA (use the SPI ports as I2S)?
  Reply With Quote
Old 14th November 2011, 09:41 PM   #3
Zoran is offline Zoran  Serbia
diyAudio Member
 
Join Date: Jan 2004
Location: Belgrade
Great work, I was @ Your site...wow
cheers + thanks
__________________
###
  Reply With Quote
Old 14th November 2011, 09:57 PM   #4
diyAudio Member
 
Join Date: Nov 2006
Hi dean,
Speed: UM232H is EEPROM programmed as 245 style FIFO, by MPROG utility. maybe "115200" has no meaning for FIFO mode, please forget.
IDT FIFO and UM232H both runs in 4 cycles / 60MHz, achieved up to 15MB/sec PC-FTDI-FIFO-FPGA, when tested.

MCU: I think dsPIC can output single I2S only ??
  Reply With Quote
Old 15th November 2011, 01:55 AM   #5
deandob is offline deandob  Australia
diyAudio Member
 
Join Date: Oct 2002
Location: Brisbane, Australia
Yes, dsPIC doesn't have the I2S ability although I think you can use either the SPI ports or even bit banging on GPIO pins

I'm not familiar with FPGA, but couldn't you implement the FIFO in the FPGA? ALso it looks like there is a FTDI development card (Maestro) which has both the FTDI hi-speed USB chip and a FPGA on the same card, and it can use an external clock.

ALso, why are you using a separate FIFO? The UM232 has an onboard FIFO as well as 1K buffer. Are you using 512 bytes bulk transfer mode?
  Reply With Quote
Old 15th November 2011, 02:40 AM   #6
diyAudio Member
 
Join Date: Nov 2006
implementing FIFO in FPGA is possible, but it makes VHDL more long / confusing, and specific for Xilinx.
current design is very 'generic' and as I wanted, easy to understand. complex problem is broken down to ASIO host / FIFO / FPGA.
everything on the generic prototyping board, so anyone can change power / clocks / isolation.

on chip FIFO is too small. 1KB can contain only 13 samples, this is 68usec for 44.1kHz. No program can put next samples in this cycle.
  Reply With Quote
Old 15th November 2011, 08:48 AM   #7
diyAudio Member
 
Join Date: Jun 2009
looks like everyone is doing a USB to I2S converter these days.

you'd better watch that the chinese don't package it up and offer it on ebay for $99

regards
Trev
  Reply With Quote
Old 15th November 2011, 02:56 PM   #8
diyAudio Member
 
Join Date: Nov 2006
dean,
try to read VHDL. I only use if-then, case-when, and signals.
process() = function(), and signals are global variable.
I was thinking if I use MCU.. and still large VHDL exists.
  Reply With Quote
Old 15th November 2011, 03:04 PM   #9
diyAudio Member
 
Join Date: Nov 2006
Trev, $99 is great I spent $300 or so.
PCI VHDL is free IP, so someone can try in single FPGA PCI card..
  Reply With Quote
Old 15th November 2011, 08:03 PM   #10
deandob is offline deandob  Australia
diyAudio Member
 
Join Date: Oct 2002
Location: Brisbane, Australia
Koon,

Can you explain a little more about:
1) How resilient this design is for jitter performance
2) How do you manage the FIFO buffer to avoid over/underruns? I assume the PC sends its data full speed but how do you manage the FIFO buffer control? Its not obvious in your code.
3) Do you have a description of the serial protocol you use between the PC driver and the FPGA. How do you differenciate between the serial samples (header, timing etc?)
4) As I understand it, a FPGA needs to be programmed every time it is switched on. Do you send the program over serial? Wouldn't a CPLD be a better choice (sorry I am FPGA/CPLD newbie).
5) For PC/USB isolation, I assume its best to isolate the 8 data lines out of the FTDI module so that any added jitter is buffered by the FIFO

This is a very interesting approach to USB audio!
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Introducing miniStreamer: Native 24/96 USB to I2S / SPDIF interface minidsp miniDSP 39 5th January 2014 11:00 PM
Ultimate USB to I2S interface sampler Digital Source 206 30th January 2012 03:45 PM
Edel USB to I2S/SPDIF interface danny_66 Digital Source 0 27th July 2011 07:42 PM
Is it possible to develop a ASIO driver for PCM2900 based USB Audio interface? cxhawk Digital Source 7 3rd December 2010 02:30 PM
interface I2S with USB mermoz Digital Source 0 21st February 2003 10:34 AM


New To Site? Need Help?

All times are GMT. The time now is 11:37 AM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright ©1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2