Professional Documents
Culture Documents
IntroDSP 3 PDF
IntroDSP 3 PDF
&%#'($&
&"
"
#!# "!! :97;<8:
"#) % #!" ""
2!#3!"0
#! ! # ! $ " %, " !
!!"$!2
# !"( ' #!! " # $
"
" !"( &#" ""
4#!'#52
$ ! 3 " ! : " ! & : !! ,! & ! !
! #"% 46389.7 (52 !" $ " ! "!
! $ ! 3 # $ # 9; "!
# "! 2!!"!!"$# #$,
#"" #,! " 2!" #
" "! ! :$!"!#!" 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
$ !% % $""% /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
!! "$"#!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$ $$#"%'!"!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
$ 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
! ! / ""/ " # ! "! ! #
!",- !" !2
!#!#$ (%!"$
D; ! !" - 5 %6 A 5") ! #
!" :%A6&*4;/$ D:2?" *
!"">:::2!" !", ";?1
;?E<;? ,
2
! #", " ;?2 # ! #
1 y[n-1]
K1
y[n-1] 2
4000 678E
MULTIPLICADOR
Multiplica los dos valores
Resultado
&""$""74:8C93>C=999(93>:C93A9B9:@C?@A3
# $# # #" !% # % "$ '3
% "$$""#/"##:93
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