RS232 to I2S conversion - diyAudio
Go Back   Home > Forums > Amplifiers > Solid State

Solid State Talk all about solid state amplification.

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 31st August 2010, 07:11 AM   #1
diyAudio Member
 
Join Date: Aug 2010
Default RS232 to I2S conversion

Hi everyone ,

I am onto a small project for now in which i have to use the data sent from PC's RS232 out and convert this to I2S format and give to transmitter module,,,

This is so simple to listen but i am not able to get how to convert RS232 data to I2S format , so please do anyone can help me out from this...

It will be a great help if i could get some information about this , waiting for your valuable feedbacks ....
  Reply With Quote
Old 31st August 2010, 11:14 AM   #2
jaycee is offline jaycee  United Kingdom
diyAudio Member
 
Join Date: Apr 2004
Location: Norwich, UK
Well, the best way to do it is with a microcontroller BUT i don't think RS232 is fast enough for this.

If you just want to send sound, what about USB to I2S ? TI's PCM2707 will do this trivially.
  Reply With Quote
Old 31st August 2010, 11:35 AM   #3
diyAudio Member
 
Join Date: Aug 2010
@jay, i want to transfer the data sent from a radio , so the radio signals are RS232 signals and i dont want much complex circuits , so i am hopping to find something which can convert RS232 to I2S directly...
  Reply With Quote
Old 31st August 2010, 04:27 PM   #4
jaycee is offline jaycee  United Kingdom
diyAudio Member
 
Join Date: Apr 2004
Location: Norwich, UK
the radio sends digital audio via RS232?
  Reply With Quote
Old 31st August 2010, 04:58 PM   #5
macboy is offline macboy  Canada
diyAudio Member
 
Join Date: Oct 2003
Location: Ottawa, Canada
RS232 sends one byte (or 7 bits) at a time. First a start bit is sent, then 8 bits of data, then a stop bit. It is asynchronous, so there is no clock, just data. The receiver needs to know the data rate so that it can estimate where each bit is located in the data stream. It is up to the transmitting and receiving equipment to know and agree upon what the data means. If you need to reliably send and receive data packets larger than 8 bits (a byte) then you need to have some kind of protocol. So usually some kind of start message is sent (sometimes indicating the number of data bytes to follow) then some data bytes and sent, then maybe a stop/end message is sent, maybe containing a checksum to validate that all the data is sent correctly, or maybe the message is NULL-terminated. The details are entirely up to the two devices that are communicating. There is no standard.

I2S is used for audio. It is synchronous, so there is a clock, actually two. There is a bit clock and a L/R or word (W) clock. A master clock of usually 256x or 512x the bit clock is sometimes included as well, since most audio devices require this clock, but it isn't strictly part of the I2S protocol. There are 64 bits of data sent for each cycle of the W Clock (so W clock is 64x the frequency of the bit clock). 32 bits for left, 32 for right. Of those 32, 16 to 24 are used for audio and the rest are usually unused. The format for the data is strictly defined, but there are a few different variations: Left justified and Sony are maybe the most common and they differ only slightly, mostly in the alignment of the data to the W clock.

Judging by your question, the above is probably over your head. Fortunately (or unfortunately?) you probably don't really need to convert RS232 into I2S. You probably don't need to do what you think you need to do, because you don't understand the problem well enough. Describe the problem here (not what you think you need to do!) and we'll see if we can help you figure that out.
  Reply With Quote
Old 31st August 2010, 05:39 PM   #6
paulb is offline paulb  Canada
diyAudio Member
 
Join Date: Jun 2001
Location: Calgary
I'll bet you mean I2C, not I2S.

Hey macboy, how do you do superscripts in replies?
  Reply With Quote
Old 31st August 2010, 06:32 PM   #7
macboy is offline macboy  Canada
diyAudio Member
 
Join Date: Oct 2003
Location: Ottawa, Canada
Even I2C would be tricky, but possible. I2S will be virtually impossible. But that's why I want the poster to clarify the problem. Maybe there is a workable solution after all.

For superscript, use "sup" (to start) and and "/sup" (to stop), in square brackets. Like:
I [ s u p ] 2 [ / s u p ] S
(without all the extra spaces). Experiment using the preview post button. Do the same for subscript with "sub", bold using "b", italics using "i", etc. You can even do color. Check out:
diyAudio - BB Code List
  Reply With Quote
Old 1st September 2010, 05:12 AM   #8
diyAudio Member
 
Join Date: Aug 2010
I have a radio module which send data to a processing unit via RF channel...
So now my part is to replace this RF channel with some other means (Sorry i cant reveal this)...

So the new module has got inputs SPDIF, I2S , Analog and JTAG (Transmitter) , so i have to interface the data from the radio module to this new module in any
of these formats and without the loss of data ....

Next the Receiver module accepts this data from New module and should pass onto a PC or a disply unit .....

1st block - RF module (RS232 signals)
2nd block - New transmitter module (SPDIF, I2S , Analog and JTAG) , the processed data is sent wirelessly to Receiver
3rd block - New Receiver module
4th block - A PC or any display unit
.

So i think now i am clear with my problem definition
  Reply With Quote
Old 1st September 2010, 01:17 PM   #9
macboy is offline macboy  Canada
diyAudio Member
 
Join Date: Oct 2003
Location: Ottawa, Canada
I think you are in over your head. You will not find any easy answers here.
  Reply With Quote
Old 1st September 2010, 02:10 PM   #10
Banned
 
Join Date: Jan 2008
Blog Entries: 2
PC RS232 serial port data has many formats; 9600,n,8,1... 1200,y,7,2... 2400,y,8,0...

I2S can run at different speeds.

You can almost certainly do this with a PIC micro, one that has a UART built in. You will need a MAX232 chip or similar to interface 5V to RS232 levels.

You cannot do this unless you know the data formats, byte ordering, and data rates for both I2S and RS232.

w
  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
Sony to Philips I2S Format Conversion Elso Kwak Digital Line Level 68 1st April 2012 12:07 PM
I2S conversion for SB Device timequest Digital Line Level 2 29th May 2009 09:48 PM
I2S -> SPDIF conversion SteveCarr Digital Source 8 7th February 2008 07:13 PM
Single connection USB Audio PLUS RS232 Conversion? mbcouple Digital Source 1 16th January 2007 01:06 PM
i2s to parallel conversion jcsveth Digital Source 3 12th May 2005 07:52 PM


New To Site? Need Help?

All times are GMT. The time now is 05:23 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