This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Using TIVA for audio applications

Other Parts Discussed in Thread: EK-TM4C123GXL, TM4C123GH6PM

Hello,

I am very much new to the TIVA micro controller. I have a launchpad with Micro controller EK-TM4C123DXL.

I want to develop it for converting analog audio in digital with AGC and also control the output of uC with Keypads.

The keypads section will be done sooner or later. Right now I am in need of what to use and how.??
If i use ADC, will the sampling rate affect the continuity of the audio signal. Kindly help guys. Thank you

  • Hi,

    You would need to add some more details as to what the source of the audio signal is, what is the current driving capability of the source, what is the expected sampling rate for audio you are looking.

    As with any circuit the ADC during conversion will drain curent from the source and if the Source and Sink capability is not matched correctly, the signal may be distorted.

    Regards,

    Amit Ashara

  • Beyond issues registered by earlier responder - might the requirement for some fast, volatile memory - receive some consideration? 

    Most all of these more basic MCUs don't easily/efficiently attach to/accommodate external RAM.  A newer, more expensive device does however (129 device iirc) and may prove more suitable for your development efforts.  After you've realized some success - methods to employ less capable MCUs here - may have a greater chance of success...

    As w/most things in engineering - trade-offs/balance become normal/customary.  The "specs" - absent here - prevent little beyond the general approach provided here - by now two responders...

  • Hello Amit,

    Thank you for your instant response. I will be using this as announcement system and hence the source will be output from microphone with speech signal. Hence kindly confirm whether the ADC with speed of 1 MSPS will be able to do conversion of speech signal. After the ADC and AGC operation, the signal will be fed to Power amplifier where it will be again amplified.Hence my circuit will be acting similar to a pre amplifier.

    I would also add keypad which will be used to select the area of announcement. The current sourcing and sinking wont be an issue.

    Regards,

    Mit Morbia

  • The ADC will sink current, so the microphone output would need to be buffered by a OPAMP. Secondly the output voltage swing from the microphone has to be more than the error of the ADC which is 4LSB's. This may require you to add gain on the OPAMP so that the signal is well sampled and within the range of Reference voltage. This is a very serious consideration here as if the signal crosses the Reference voltage you will be staurating the ADC, and the AGC needs to take care of handling such samples.

    On the ADC conversion you will be getting 16 bits per sample at 1MSPS, which may be over budget in terms of processing. You may want to drop the sampling rate down to 125Ksps. so that you have sufficient processor time to run the algorithm and send the data out.

    Also it is not clear how you plan to send the data from the uC to the Power Amplifier on the way to the loudspeakers. Technical details would be appreciated as it would help better evaluate the requirements and suitability.

     

  • Frankly even I am not aware about so many details. I will rather give the proposed diagram which might clear your doubts and help me in a way. Kindly find the drawing attached herewith. 2134.Scan_Doc0062.pdfThanks.

    Kindly let me know the things to be taken care of in programming. I do not want to use any other IC except TIVA for the whole process.

    Thank you.


    Regards,

    Mit Morbia

  • @Mit

    Appreciate the drawing. That did give a better idea of what you want to do. I hope you are aware that TIVA does not have a DAC. So the Power Amplifier stage needs to have a Audio Codec like TLV320AIC to convert the digital post processed stream to Analog signalling for the Power Amplifier stage.

  • Thank you Amit for your kind concern. Happy new Year.!!

    After working with the launchpad of TIVA i faced some issues. The board suddenly started heating up and the led stopped glowing. I think some thing is wrong. I tried to coordinate with the distributor in Mumbai but he said he had no other choice and asked me to buy a new one.
    I will do that. I would like to know the reason what caused that in order to avoid that in future.

    Also would like to know whether the ADC can be used in real time communication and if yes, what amendments are required. It came to my notice that the transmission of data starts after completion of conversion. So what should be done.?

    Thank you.

    Regards,

    Mit

  • Hi Mit

    Wishing you a Happy New Year too.

    On the Lanuchpad overheating issue, have you connected some component/board externally which is overdrawing current from the LaunchPad causing the on board LDO's to fail? If you have a 3.3V DC Power Supply, you can bypass the LDO's and check if the TM4C123 Part is still OK.

    For any ADC there would be a certain amount of lag due to sampling and conversion time. This is true for the ADC in TM4C123. You have to wait for the ADC to Indicate that converted data is available in the ADC register and then work on it. There is no way of streaming it in Tiva.

    Amit

  • Hello Amit,

    I had just attached the launchpad to my laptop and it started getting overheat.

    As far as ADC part is concerned, is there any alternative for it.? I want to use it for industrial voice communication and it has to be similar to two people talking on a telephone. The lag will be for how many seconds, that depend on the data of transmission, right?

    What if I use audio codec TLV320AIC.? But in any case the transmission is done by Tm4C123 which wont be real time right. If i choose Audio ADC IC PCM 1850A/1851A. Would it be able to do real time?

    Thanks for your kind concern.

    Regards,
    Mit

  • Hi Mit,

    What part of the board overheats on connection? That would tell what may be the cause. Also you can erase the TM4C and then check to make sure it is not a code that may be contributing. I would be very interested in this part.

    On the lag part of it there would be definitely lag no matter what you use. But generally speaking the lag will not be audible unless there is a very large delay from the input to the final output, about which you are correct. There are a lot of articles on speech lag which will be considered audible to the end user depending upon the medium such as standard telephone n/w, IP Phone n/w, cellular phones, internet audio stream, etc. You may want to check the same and consider it as part of the solution.

    Frankly I am not an expert on audio lag, so maybe some one on the forum may be of more help...

    Amit

  • The Tiva Series MCU ADC is 12bit, Although the sample rate is 1MHz, According the data sheet, the ADC INL ±1.5 LSB to ±3.0 LSB,  Detail information can reference the Data Sheet. If you want make the high definition audio system, you need improve the input and output SNR, suggest you choose the additional Audio ADC & DAC.

  • Mit Morbia1 said:
    I want to use it for industrial voice communication and it has to be similar to two people talking on a telephone.

     Phone quality (8 bit a or u law) is encoded on an 8 bit pattern, data is sampled at 8KHz so why is not enough internal ADC? And why not use PWM as DAC? again oversampling is enough..

     This application was developed on MSP430 old version @8Mhz so why cannot run on Tiva without additional hardware?

     Phone quality is just 48dB S/N ratio, TIva has 12 bit on chip so 6.02*12 => 72dB is more than good phone quality and better than some commercial cheap player.

    Mit Morbia1 said:
    ADC IC PCM 1850A/1851A

     Why use a 101dB Sn ratio 24Bit @96KHz multichannel surround when you simply need use to talk to someone with band limited to 300Hz 4000Hz??? You need an ultra HIFI intercom?

     Use simple software or just search MSP430 PCM by software.

  • Thank you AMit, Gaven Liu and Roberto Romano.

    @Robert - So will it be like audio is coded, sent while the other audio is getting encoded.? I would be glad if you can explain me the details. What changes should be made in ADC programming and can it be a two way communication.

    Thank you in advance.

    Sincerely,

    Mit Morbia

  • @ Amit - I think the LDO gets heated and i did not load any program. It was in its initialization phase. Can i erase it if its not getting initialized?

    The IC no U8 gets heated and when the jumper is removed, the led glows which is off otherwise.

    Thank you.

    Sincerely,

    Mit

  • Hi Mit

    I checked the EK-TM4C123GXL LaunchPad User Guide. The U8 component is the LDO for sure.

    1. Which jumper when removed causes which LED to glow? That would be useful information.

    2. What do you mean by Initialization Phase. Are you able to connect the debugger?

    3. I have asked this earlier but still not clear if you have connected anything to the LaunchPad other than the USB cable from the Laptop?

    Amit

  • @ Amit - There is only one jumper in the launchpad I am using. I did not find any identification mark near it.  By initialization phase, I mean as it was provided to us on the day of seminar, the led blinking in a series state.

    I did not connect anything except my laptop to it without burning any code into it.

    Thank you for your kind concern.

    Sincerely,

    Mit

  • Hello Amit,


    There is only one jumper i found as far asthe launchpad is concerned. By initialization I mean the state in which the launchpad was given to us in seminar. I did not even connect the debugger, I just attached it to my laptop and it started heating. I did not connect anything to the laptop except the laptop. Thank you for your kind concern.


    Sincerely,

    Mit Morbia

  • Hello Roberto,


    Can I get some more details on how to use the ADC for continuous streaming? I only have queries about the coding part that how will the ADC work? Can two things be done simultaneously? The transmission as well as the conversion.

    I mean the voice is continuously sampled and transmitted with giving a lag in two way communication.

    Appreciate your valuable feedback.

    Thank you.


    Sincerely,

    Mit Morbia

  • Hi Mit,

    That is strange indeed, since I haven't seen a LaunchPad report on excessive heating. I am not sure if you have another LaunchPad, but if you could see that it shows the same behavior then it would be good grounds for an investigation into probable cause.

    Can you send me a snapshot of your LaunchPad, so that I can configure mine in the same manner, including every jumper, etc

    Amit

  • 2311.keypad tiva.docx

    I am trying to attach a keypad of 3x4 matrix. The errors found are confusing me. I tried adding the keypad.h file for the same and also checked all the libraries added. Kindly let me know what is the issue with my code. The code is also attached herewith.

    Revert asap. Thank you.

    Regards,

    Mit Morbia

  • Hi Mit.

          Did you declare your function prototype at keypad.h as "extern"? Post your keypad.h

    -kel

  • Hi Mit,

        U8 3.3V is the voltage regulator IC. If this is heating, that is not bearable, then possible that it was shorted out. It is also possible that when connecting to your laptop, the usb connector was connected at an angle causing this.

        Do a visual inspection of the entire board, and check for any anomalies. Usually you, need to replace the chip that is heating.

    -kel

      

        

  • Hi Mit,

    In the test file that you attached which I think is main.c, there is no call for main function call from tm4c123gh6pm_startup,c

    Regards

    Amit

  • Mit Morbia1 said:
    Can I get some more details on how to use the ADC for continuous streaming? I only have queries about the coding part that how will the ADC work? Can two things be done simultaneously? The transmission as well as the conversion.

    Hi, try this on speech

     http://www.ti.com/general/docs/litabsmultiplefilelist.tsp?literatureNumber=slaa405a

    and this is the bidirectional codec

    http://www.ti.com/mcu/docs/litabsmultiplefilelist.tsp?sectionId=96&tabId=1502&literatureNumber=slaa361&docCategoryId=1&familyId=4

    these are MSP430 ready, you can port or use MSP.

  • Mit,

         Are you still able to use your launchpad with U8 heating up? I doubt that you are still able to load programs to the launchpad.

    -kel

  • Dear Kel,

    I am ordering for a new one since we need it for urgent development. The faulty pad will be attended later. Thank you for your kind concern.

    Regards,
    Mir Morbia

  • I cant port on MSP430.

    Would be grateful if you suggest me the way of transmission. Should I use SSI or UART for transmission of data from one TIVA launchpad to another. My distance will vary from 100 metres to 1 km.

    I would be glad if you could help me on this part. Also have querries for using PWM as DAC in Tiva. In which mode should I use PWM and is there any document available.

    I saw the link provided by you and will try to incorporate it for TIVA for PWM.

    I don't have any other instruments for testing purposes of transmission. Could I check the transmission status by shorting the Tx and Rx and read the Rx register?

    Thank you for your kind concern.

    Regards,

    Mit Morbia

  • Mit Morbia1 said:
    100 metres to 1 km

    You, could try wireless connection.

    It would be helpful if you do your research in the internet besides E2E. 

    -kel

  • Hi Amit,

    I added the main.c file which was missed by me. Thank you.

    I tried installing the CCS v5 software on my desktop and it is showing errors after installation is completed. Though I have it installed in my laptop, also need to install it in my desktop. Can you suggest me the steps to solve the problems shown in the image attached.

    T hank you.

    Regards,
    Mit

  • Hi Mit

    CCS E2E Forum would be the right place to get this resolved..

    Regards

    Amit