LPC3130 for asynchronous USB to I2S - 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 2nd November 2012, 03:12 AM   #1
diyAudio Member
 
Join Date: Oct 2007
Default LPC3130 for asynchronous USB to I2S

Nobody seems to have considered using the NXP LPC3130 (or LPC3131) as an Asynchronous USB to I2S converter. It is $3.89 Q1 at Avnet.
  • 96 kB (LPC3130) or 192 kB (LPC3131) embedded SRAM
  • High-speed USB 2.0 (OTG, Host, Device) with on-chip PHY, 480Mb
  • It is meant for a MP3 player so it can synthesize audio clocks (44.1, 48K multiples)
  • You can dynamically download the software for it over the USB line. It boots in DFU mode.
  • Available open source libraries implementing USB support
  • Two dedicated I2S channels.
I think you could make a lot more IS2 channels by using the static memory interface. This interface has DMA capability and a 16b bus. The DMA is triggered from an external input. You could wire the audio clock output from an I2S channel into the external DMA trigger input.

Inside the CPU use software to serialize 15 channels of audio data and a word clock. Now when the audio clock triggers the SRAM DMA, clock out 15 channels of I2S and the word clock.

External devices should see this as 15 channels of I2S. Reverse the procedure for input.

96KB should be enough for the program an a good sized FIFO. If not use the LPC3131 and get 192KB of RAM.

Last edited by jonsmirl; 2nd November 2012 at 03:19 AM.
  Reply With Quote
Old 2nd November 2012, 03:30 AM   #2
diyAudio Member
 
abraxalito's Avatar
 
Join Date: Sep 2007
Location: Hangzhou - Marco Polo's 'most beautiful city'. 700yrs is a long time though...
Blog Entries: 98
Send a message via MSN to abraxalito Send a message via Yahoo to abraxalito Send a message via Skype™ to abraxalito
Not a very DIY-friendly package that TFBGA180. But a great part for the price for sure.
__________________
It doesn't have to take the form of a conspiracy, rather a consensus... James H Kunstler
  Reply With Quote
Old 2nd November 2012, 03:40 AM   #3
diyAudio Member
 
Join Date: Oct 2007
We can solder this chip in our lab, but it is a pain. For any significant quantity we have an assembly house solder.

Olimex makes a fairly cheap dev board for the chip. It has a lot of extra stuff on it. US disti

I suspect a USB to IS2 board can be made for under $20 using this chip. If someone gets this working I'll buy ten.

BTW, I've seen this chip go for $2.25 in huge quantity.

Last edited by jonsmirl; 2nd November 2012 at 03:42 AM.
  Reply With Quote
Old 2nd November 2012, 04:16 AM   #4
diyAudio Member
 
abraxalito's Avatar
 
Join Date: Sep 2007
Location: Hangzhou - Marco Polo's 'most beautiful city'. 700yrs is a long time though...
Blog Entries: 98
Send a message via MSN to abraxalito Send a message via Yahoo to abraxalito Send a message via Skype™ to abraxalito
I remain skeptical of your use of DMA to bit-bang the 15 channels of output. - it would require bit-twiddling by the CPU which I reckon will be very cycle-intensive. Besides the SDR Widget guys already have an Open Source async solution, I think they were using an Atmel SoC though which is bound to be a bit more expensive than the NXP.
__________________
It doesn't have to take the form of a conspiracy, rather a consensus... James H Kunstler
  Reply With Quote
Old 2nd November 2012, 12:36 PM   #5
diyAudio Member
 
Join Date: Oct 2007
It is a 180Mhz ARM9 core that would be dedicated to bit banging. USB arrives via DMA. At 96Khz that's 125 instructions per bit. For another $1 you can get a 270Mhz version which gives you 187 instructions per bit.

The 96K on-chip memory is SRAM so there are no refresh delays. There will be some interference from DMA. This is also a 32b CPU with lots of registers.

Based on these estimates it doesn't look hopeless.
  Reply With Quote
Old 2nd November 2012, 02:27 PM   #6
diyAudio Member
 
Join Date: Oct 2007
LPC3130 vs AT32UC3A3256 used in SDR widget
  • $3.89 vs $12.47 - Q1
  • 180Mhz vs 66Mhz
  • 96KB RAM vs 128KB RAM
  • can make audio clocks vs needs external oscilator
  • download firmware from host vs 256KB flash
  • 180-TFBGA vs 144-TFBGA
  Reply With Quote
Old 9th November 2012, 04:56 AM   #7
diyAudio Member
 
Join Date: Jun 2009
Hmm, if you're going to the trouble of coding up an asynchronous USB Audio Deivce Class 2.0 implementation for ARM why not target the LPC4300? Granted, the 4300 parts are a little more expensive but the clock rate is comparable, they're available in LQFPs, and the bit shuffling can be offloaded to the M0 and SGPIO.
  Reply With Quote
Old 9th November 2012, 06:21 AM   #8
diyAudio Member
 
abraxalito's Avatar
 
Join Date: Sep 2007
Location: Hangzhou - Marco Polo's 'most beautiful city'. 700yrs is a long time though...
Blog Entries: 98
Send a message via MSN to abraxalito Send a message via Yahoo to abraxalito Send a message via Skype™ to abraxalito
Somewhat ironically the M0 isn't blessed with the very instruction (rotate with extend) that would make bit shuffling viable...
__________________
It doesn't have to take the form of a conspiracy, rather a consensus... James H Kunstler
  Reply With Quote
Old 9th November 2012, 11:25 AM   #9
diyAudio Member
 
Join Date: Apr 2003
Location: Tampere Finland Europe
Quote:
Originally Posted by twest820 View Post
Hmm, if you're going to the trouble of coding up an asynchronous USB Audio Deivce Class 2.0 implementation for ARM why not target the LPC4300? Granted, the 4300 parts are a little more expensive but the clock rate is comparable, they're available in LQFPs, and the bit shuffling can be offloaded to the M0 and SGPIO.
I think the 4300 LQFP's ( LPC4320FBD144) aren't available yet. Also they don't have internal flash, and the second I2S port pins are mostly shared with the SPIFI pins which are used for interfacing the external flash. Anyway, there's the NGX LPC4330-Xplorer board with the (not so good) UDA1380 codec which you can use for development until you can design your own one with the LQFP part.
  Reply With Quote
Old 9th November 2012, 12:43 PM   #10
diyAudio Member
 
Join Date: Oct 2007
There are two ways to use the LPC3130, bare metal or add a $1 SDRAM chip. Bare metal is cheaper and more efficient. NXP has basic support libraries for bare metal USB and I2S. No audio class 2 though.

The other approach is to run Linux on it using the SDRAM chip. Linux already has audio class 2 and I2S support.

The two on-chip I2S channels can do 96/24 per the manual. I suspect they can also do 192/24 but can't provide a 256 fs clock at 192/24. 64 fs should work.

I don't have a need for more than two I2S. The bit twiddling appeared to be possible so I just mentioned it.
  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
XMOS-based Asynchronous USB to I2S interface Lorien Digital Source 2111 12th July 2014 05:21 AM
exaU2I - Multi-Channel Asynchronous USB to I2S Interface exa065 exaDevices 1357 3rd March 2014 08:51 PM
exaU2I - 32bit/384kHz Multi-Channel Asynchronous USB to I2S Interface exa065 exaDevices 0 11th November 2011 11:41 AM


New To Site? Need Help?

All times are GMT. The time now is 11:40 PM.


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