14 Replies Latest reply on Jun 30, 2014 10:35 AM by elkin.gutierrez.patio

    rtos y voz.

    elkin.gutierrez.patio

       I apologize for the English, do not speak so play me use "google translator". 

         
          attempt to make a musical instrument, which must be communicated to a computer where this style "guitar hero" game, my problem is that when I try to play the sound directly from the Psoc and send at the same time the sound is distorted, thinking this quice use "RTOS" to look like it is doing at the same time but when it happened, not the DAC to RTOS funcioana someone could help me.    
         
              
         
          Thank you.   
        • 1. Re: rtos y voz.
          user_1377889

          Questions:

             

          Are you really using an RTOS (Real-Time Operating System) for PSoC 1?

             

          Do you use a development Kit? Which one??

             

          Can you post the complete project, so that we all can have a look at? To do so: use Designer -> File -> Archive Project and then attach the resulting archive. (do NOT use chrome, there is a problem with attached files)

             

           

             

          Bob

          • 2. Re: rtos y voz.
            elkin.gutierrez.patio
                    yes, I'm using rtos, I've used in past projects, but when I try to use a DAC to play a sound, the sound does not work. the rtos not take a note of the application "2046" is something old but works with a few adaptations, the development kit is the "CY3210-Psoc EVAL1" if they can give me more information would be very useful with other projects but works this is not the case. thanks   
            • 3. Re: rtos y voz.
              user_1377889

              Probably the settings for Port2 which is to select the tone to play is not correct. <When you use a switch connected to V+ the port should have drive pull down. Now the port is defined as strong which is an output port.

                 

               

                 

              Bob

              • 4. Re: rtos y voz.
                elkin.gutierrez.patio

                bob thanks for helping, but if you change the configuration of port 2 does not work on a separate project the probe Generator Speeds and works well, the problem is I think the RTOS tine to do with the watch, I will continue trying.

                • 5. Re: rtos y voz.
                  user_14586677

                  In the global resource window, chip editor, set your OpAmp Bias and A Buff Power

                     

                  to High.

                     

                   

                     

                  Is it correct to say you are updating DAC at 16 Khz rate via RTOS ?

                     

                   

                     

                  Also listening to DAC output, not a direct connection to speaker I hope.

                     

                  Sould be a Hi Z load.

                     

                   

                     

                  Also I do not see where you set the period of the timer, and in  its global properties window

                     

                  you have its period set to 1 ? Is that what you want, the RTOS time slot ISR to run at 16 Khz ?

                     

                   

                     

                  Lastly the 32 Khz clk varies from 15 to 64 Khz, unless derived from a crystal. Thats a huge variation

                     

                  in sample rate to DAC if former.

                     

                   

                     

                  Regards, Dana.

                  • 6. Re: rtos y voz.
                    elkin.gutierrez.patio

                     I apologize for the English, 

                       

                    thanks danaaknight 

                       
                        first: why did you put the values right global resources on high? Does that change anything?    
                       
                        second: the reason why the watch timer were 32k, it was because I was doing some tests and forget to change them before uploading, the configuration of the timer is:    
                       
                        Configuration of RTOS_Timer8    
                       
                        Clock: Source VC1 2MHZ    
                       
                        Capture: Low    
                       
                        Period: 62    
                       
                        CompareValue: 0    
                       
                        InterruptType: Terminal count    
                       
                        Output: None    
                       
                          Global Resources:    
                       
                          CPU_Clock: 24MHz    
                       
                            
                       
                        already been operated on me for other projects, but not for this.    
                       
                        Thanks and I will continue testing.   
                    • 7. Re: rtos y voz.
                      user_14586677

                      first: why did you put the values right global resources on high? Does that change anything?

                         

                       

                         

                      Yes, if you look at CT blocks they are all affected by bias, and the column output buffer

                         

                      that drives pins. It affects GBW of the amps, and CM range and drive capability. Shown

                         

                      in respective module datasheet and device datasheet, in the case of the buffer.

                         

                       

                         

                      Regards, Dana.

                      • 8. Re: rtos y voz.
                        elkin.gutierrez.patio

                         ok take this into account and op amp buffer. 

                           
                            but still does not work, thanks anyway, sorry for the insistence but if you have some other idea would be very useful.   
                        • 9. Re: rtos y voz.
                          user_14586677

                          I would try two tests -

                             

                           

                             

                          1) Flip a pin to test the jitter in the RTOS time slot ISR, that way you can see

                             

                          if the sample rate of an event, like DAC update, will be constant.

                             

                           

                             

                          2) Create a sine table, and use that to output to DAC. Then look at its waveform

                             

                          to see if you can draw any conclusions about distortion source.

                             

                           

                             

                          Regards, Dana.

                          • 10. Re: rtos y voz.
                            elkin.gutierrez.patio

                            hi

                               

                            ok thanks, I'll give a try and tell them.

                            • 11. Re: rtos y voz.
                              elkin.gutierrez.patio

                              hi
                              to close the post, and found the problem, which only serves this template programs that take less than 125u seconds and check my program and takes longer for that does not work, if someone else will use,
                              regards

                              • 12. Re: rtos y voz.
                                elkin.gutierrez.patio

                                here is the program without "rts" if someone needs it.

                                • 13. Re: rtos y voz.
                                  user_1377889

                                  Thank you for sharing your experience with us! Since I only play the flute I am not quite used to multi-tone instruments as a guitar.

                                     

                                   

                                     

                                  Jonny B. Good Bob

                                  • 14. Re: rtos y voz.
                                    elkin.gutierrez.patio

                                    thank you for helping me, but sometimes it can be annoying for the language that I do not understand well, and do not have much knowledge I like to participate in this forum and contribute what little they have.