You are on page 1of 11




    

 &%#'($&

&" 
 
 
 
 

"



 #!#  "!!  :97;<8: 
 "#) %  #!" ""
2!#3!"0

81 ,  !!"!0  #   /  ! 


$!#'"$""&",1
91 ,$,!!0"#","$#!
"""#%""!"!"#!$,"!#!
!!'#!#"!!1%(""#$,
"! #!  !! '  #!#  "!!  #!%*"  $!#
/ " #"  #! " %!#     $,  
"+(,  $!##!"""#%""#"#
#!(!$!,#!
:1 ,%!"!409:"$%!"!4
"#*!/    $"#!  =;777 $"#!" ! "$
5=;
4"6  #"  $"#! "1  %!"! 9: # #!"
"#!'"!!"1
  


     #! ! # ! $   " %, "  !
!!"$!2

  #  !"(  '  #!!  "   #  $  
"  " !"( &#"  "" 
4#!'#52

 $ !  3 " ! : " ! & : !! ,! & ! !
!  #"%   46389.7    (52 !" $ " ! "! 
!  $ !  3 # $   #    9; "!
 # "! 2!!"!!"$# #$,
#"" #,!  " 2!" #
" "! ! :$!"!#!" 4#! 52

 -"!"(!," %, ! ) !!*!1


 
0 "!3  0#!!%!, &
 ) !4#!$ 52

   


  "#)     !! "# 48 '#"  !1  "
$" " "#) "" 87 '#"   ! #   #!#
"!!3

 #" " ""  !  " 87 '#" "#) "" ! "$
$"1 ' $  ! "  " #"  #!!$"1   !
(.#!#"!!1!$#"$.)""
!!1#3

   
 

"!!""-"$#"$#!2

43 .%!"
53  $(.
63 #
73 $#"#!!$.

        

"#("("#'!*!"1"%!""1$'
""#!!$" $%!"!""#3

 " !!" " !) "!%! ""  $"3  #$. "
!(!)$"!."!!"*!"3

.%!""!((."""3

"#!!#  !! $ " ( "  #!#  "!!  "
"$#"+"2
/* Initialize the board support library, must be first BSL call */
DSK6713_init();
/* Initialize the LED and DIP switch modules of the BSL */
DSK6713_LED_init();
DSK6713_DIP_init();

!  #  .  " !$#"  #!!$. ' !*!" $
$ !$! "-(.  #!!$. " "! "#!
# " #!!$" !&!3 "#!!# " ( "
!$#"  #!!$.1 ' $ %( ( #  ""# " # "
!$#"#!!$.3 "!%"$2

IRQ_globalDisable(); // Disable global interrupts during setup
hCodec = DSK6713_AIC23_openCodec(0, &config);
DSK6713_AIC23_setFreq(hCodec,DSK6713_AIC23_FREQ_8KHZ);
initIrq();
IRQ_globalEnable();
 


void initIrq()
{
/* Enable RXTX interrupts to the CPU */
IRQ_clear(IRQ_EVT_RINT1); // Clear any pending RX interrupts
IRQ_enable(IRQ_EVT_RINT1); // Enable RX interrupt
}


#"&  #% # ,4 "" # #$ # $""% #3
# %+##%"&"#"63#"%%#$"
(#!%$""% #$%"%##"5$#$"
%!%"$""% /##" "#%#$7 9"85

%$# "$$$"$#""#"
#%%/ " )"$"#$#!%$"%# "+"#5
"$"  #$ $ # ""# #.# "   $"  % %
$5   #  ##$  #""  #"3  " 
""3(#%(%$(##" """5

      
"%$$""% /#%%/!%#&$!%
% # #$& "'" " % #.  "#"3 #$ #"
$5

*#"$""% #!%# #$&#&#"$##


 "" % $""% /5  *#"  $""% # # % "#$"
# , "#"5 "!%$""% /#$$
$""% /##$":5

  $ !%  % $""% /3 # &"  *#" 
$""% #5#$*$##%$$$""% #5 $
$""% ##%)"# "$""% /
 "/  "  # %$"  "%$ !%  &  $"5 
&) $  "/ #   #$  "# !% # #$
%$ $#  ""  $""% /3 # &  "%$ #  
$""% / (  )" #  #"   "%$     3 !%
!%#$" "#"$""% /(#"#$"
#$ "#"5

  # # ,  $"  #""  # #" ""#"  
%/"%$$""% /0# ,3 "
(#"#5

"#$" $""% #"%$!%#%$" "


%$""% /# ,

" "  $  $""% #3   #/  6#  
"($3   #/  7"'" $""% $#8 # %"  $ 
$""% #5

 
           &'!     
  !    !           
      
      
      #%$"


 ! 
        "



     


  

                 
   "       $  
  " % !    
   
   $
#  . $ $   %# 1#  &%  #2. $ # &
&' %#. (   '% $ "& #&% $  &%# (  &% $
$& $0


$#'"& ##&%5$%$ # %%7$6$%! &
$   172.  ##$! %    #      ! # # # $
#&%$0

 $   # ,%!$ & $  ' #. $ &%#*   #
$% $+13  20

 


 

!# % %& %#%$##  /

80  %%+
90  %&$ # #
:0 &%$$%$##    ! $# :08
;0  %   &   $%#  4   &  $ # #$ 
& $%#
 
<0  %  %# $%# 4 &$
  $ $
$ $ $ ! 0

$  %#$%# 4 &!&&%)#  + 4 


!# %# %#  # #  & $   %#%  $##  0  
&$ &     +  4  !#  %#  $   %#% 
$##  . ( "& $  ##  #$   "&#  ! #  $ 
 '#$ #0
"%"#!!!$"#$)&7
 #!2  !$  #! !)   !$  $"#!0
#$!!#! ' $"#2

  
 

  !! "$"#!0  $- $ #   #!!$-
4! #4552
"!%$!1

 %( $  $ #  %!"! 3 " !$!  # )"
#$$!0"#!#0"!(!$%#'
 #! $   "-  # )" #$ " !# 
!!$!2
Output = buffer0[buffer0_pos];
buffer0[buffer0_pos] = Channel;
buffer0_pos = (buffer0_pos+1)%buffer_len;


%("#"0"$%!"!2

   "$"#! 8 #"  ! "$#%0 !!  
( $!'"#!!#!0"#!8"!$#
#!!$-2

%!%#!67!!"""#)!"
64( $!574!52

# $""$$!!!"#2

)$#-!!%!!#!" $"$$# $


   #!#  "!!2   $# $ " %!   
!$$"#!'#$$!#2

 $  !! ! "#!  "  $  " "2
# $   "" $   $ !!"    
""2$ $$#"%'!"!0 ""!
#"!!"#!#!0"* $"##$!
"#"2

  
 

 $ $#(!  !  $"#!  !! #!!$" !
!(!!""#"#!#"2

 !!   # " #"  #"0  "    79
'#"$","4!!#"#6#7!
", " '  "$ # "#7 # 8 !"  $ ",
"52

 %( $ $ # "    %!"! 0 " %  !$# 
#!!$- 4! #4550  $   #  %!"!0  "0  
#   #  "   !!"# '  $   %!"!
2
DSK6713_AIC23_read(hCodec,&Channel);

if (! flag) {
Output = sinetableC0[pos_tbl_c0];
pos_tbl_c0 = (pos_tbl_c0 +1)% SINE_TABLE_SIZE;
} else {
Output = sinetableC1[pos_tbl_c1];
pos_tbl_c1 = (pos_tbl_c1 + 1)% SINE_TABLE_SIZE;
}
flag = !flag;

DSK6713_AIC23_write(hCodec,Output);


'  $'   % %,% % !%  $%2 % +% % !
'$(!$"$!!%,! ! !"$!!'%&$!)
! &'  '%&$% #' ! !$  '  "$!!2 $    9 %$  :=
'%&$%"!$"$!!%,'%&$!6:5?*72

!#'$' '%&$!"$!$$' %%,%


 $%2
!%(!$%"!%%$' %'%&$!%%&+  $!
3%=>:<8;<24 #'  ! &$$+    %-    '%  "$!)&!2
!%
!$%"!%%"* "!$ =>:<8;<88 2

' '($' %%,%% !% $%"$&$


'($' '%&$!2

%$(#' '(! %&%!%&$  %%,% $$"$ 


9) :"  !($2


    

 "$!$ &$ " & ; &$!%   !$  :=2 $    9 %
! '  &$! "%!! !  $'   !$& : *2 $    : %
! '  &$! "%!&! !  $'   !$& ; *2  %$ '  %%& ! 
'%&$!! ($%!$! & ' &$!"%! ! $' !$&
&!'$' '%&$!5;2 !$!& &!&$!"%!&!$ &%
!"!$&$+!!' &$!"% ! $' !; *)!$&&!5;2


Acumulador=0;
buffer0[0]=Channel;
for (c=buffer_len-1;c--;c>0){
Acumulador += buffer0[c]*coefs_ch0[c];
buffer0[c] = buffer0[c-1];
}
Acumulador += buffer0[0]*coefs_ch0[c];

%$( #' !% !% &$!% % " &   '  $1  !
.  & !% ! &% '!%2 '$ #' "$ '$ !%
! &%' &$!%&!%"  $' '%&$!2
"  !" #"#"" $" "!
" 5# :6&!"!" 5!9:62"(! "!
# :7:8&(!"## :7;@802

 "  ! &!"!" (!"/  ' 


! "   &  "!  "     !#" " ,/
!'"!,3;!,2

 @A;=!!    ""!"!#!



  &"!/! # #"""2  &
#  !   &  "    ! "!  ;@ "! " </
"  !"!#"/!"!";@2

  



! ! /   ""/ " #  ! "!   !  #
 !",- !" !2 !#!#$ (%!"$
D; !  !"   -  5 %6 A 5") ! #
 !"  :%A6&*4;/$ D:2?" *
 !"">:::2!"  !",   ";?1

;?E<;? ,
 2

 ""/!"!"  !!  !" "" 1

         

   

;E;? :2B:C:;A <@?;: @AB

E;? :2?BAAB?= ;C<@: >=

 !    #",   " ;?2 # ! #

1 y[n-1]

K1
y[n-1] 2

4000 678E

MULTIPLICADOR
Multiplica los dos valores

19E3 8000 Preg

Mueve resultado a ACC

Suma el resultado dos 19E3 8000 Acumulador


veces para compensar
1
K
2 1

33C7 0000 Acumulador


Normaliza
desplazando un bit a
la izquierda y elimina
el bit extra 678E 0000 Acumulador

Resultado
&""$""74:8C93>C=999(93>:C93A9B9:@C?@A3

"$""%#$" "#%$ .3


/".!%
#"##""/$").3$"#%$!%
"" "#$"#&"#"## "$ $;3
" $$1 % &) !% #  $  %$ .1 # # $# *#
#$&# # $#  #3  #. # #" %1  #"$ #
# ))!%"$%%"3 #+"&#1
*#1"#%$$& " "$$%%"3

# $#  # #" !% # %  "$ '3 
% "$$""#/"##:93

#"&# $ $$$"5#%".


#$$#$"62
Int32 Acumulador;
Int16 Channel;

Acumulador=0;
buffer0[0]=Channel;
for (c=buffer_len-1;c--;c>0){
Acumulador += buffer0[c]*coefs_ch0[c];
buffer0[c] = buffer0[c-1];
}
Acumulador += buffer0[0]*coefs_ch0[c];
Output = Acumulador>>15;


 # $#  $" ( # $# # #%# !% #$*
#:>1"#%$#%$ ".2
buffer0[c]*coefs_ch0[c];

#$"*   <93 # "#%$# 5$# #  <96 #
"*%%"!%#<;$#3

 &) # $"  %"  "#%$  $"1 # #" ""#" 
$:>1!%#"),
Output = Acumulador>>15;

#$"(#$"#%$$""):>3

  

    

(&"!%#"%#"$##$"# $#3

!%"%%#$"(#%&#$"#$#3

%  
 (  %. : # %&# $# " % " 
$"# #":?1 """ #: )< )(
#%= )A )("%%#$";= )3