rtos y voz.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

 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.   
0 Likes
14 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable
        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   
0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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

0 Likes
Anonymous
Not applicable

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.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

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.

0 Likes
Anonymous
Not applicable

 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.   
0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

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.

0 Likes
Anonymous
Not applicable

 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.   
0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

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.

0 Likes
Anonymous
Not applicable

hi

   

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

0 Likes
Anonymous
Not applicable

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

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

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

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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

0 Likes
Anonymous
Not applicable

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.

0 Likes