📄 dtmf.mdl
字号:
Block {
BlockType EnablePort
Name "Enable"
Ports []
Position [175, 30, 195, 50]
StatesWhenEnabling "held"
ShowOutputPort off
}
Block {
BlockType Reference
Name "Sine Wave"
Ports [0, 1]
Position [155, 103, 200, 147]
SourceBlock "dspsrcs3/Sine Wave"
SourceType "Sine Wave"
Amplitude "1"
Frequency "941"
Phase "0"
SampleMode "Discrete"
OutComplex "Real"
CompMethod "Trigonometric Fcn"
TableSize "Speed"
SampleTime "1/Fs"
SamplesPerFrame "Framesize"
ResetState "Restart at time zero"
}
Block {
BlockType Outport
Name "Out1"
Position [320, 118, 350, 132]
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
SrcBlock "Sine Wave"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType Constant
Name "Constant"
Position [135, 45, 165, 75]
ShowName off
Value "0"
VectorParams1D on
}
Block {
BlockType Constant
Name "Constant1"
Position [135, 135, 165, 165]
ShowName off
Value "1"
VectorParams1D on
}
Block {
BlockType Constant
Name "Constant2"
Position [135, 225, 165, 255]
ShowName off
Value "2"
VectorParams1D on
}
Block {
BlockType Constant
Name "Constant3"
Position [135, 315, 165, 345]
ShowName off
Value "3"
VectorParams1D on
}
Block {
BlockType Merge
Name "Merge"
Ports [4, 1]
Position [500, 210, 540, 250]
Inputs "4"
InitialOutput "[]"
AllowUnequalInputPortWidths off
InputPortOffsets "[]"
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator"
Position [195, 37, 225, 68]
ShowName off
Operator "=="
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator1"
Position [195, 127, 225, 158]
ShowName off
Operator "=="
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator2"
Position [195, 217, 225, 248]
ShowName off
Operator "=="
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator3"
Position [195, 307, 225, 338]
ShowName off
Operator "=="
}
Block {
BlockType Outport
Name "Tone"
Position [575, 223, 605, 237]
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
SrcBlock "Row"
SrcPort 1
Points [45, 0]
Branch {
Points [0, -55]
Branch {
Points [0, -90]
DstBlock "Relational\nOperator"
DstPort 1
}
Branch {
DstBlock "Relational\nOperator1"
DstPort 1
}
}
Branch {
Points [0, 35]
Branch {
DstBlock "Relational\nOperator2"
DstPort 1
}
Branch {
Points [0, 90]
DstBlock "Relational\nOperator3"
DstPort 1
}
}
}
Line {
SrcBlock "697 Hz"
SrcPort 1
Points [140, 0]
DstBlock "Merge"
DstPort 1
}
Line {
SrcBlock "770 Hz"
SrcPort 1
Points [130, 0; 0, 30]
DstBlock "Merge"
DstPort 2
}
Line {
SrcBlock "852 Hz"
SrcPort 1
Points [130, 0; 0, -50]
DstBlock "Merge"
DstPort 3
}
Line {
SrcBlock "941 Hz"
SrcPort 1
Points [140, 0]
DstBlock "Merge"
DstPort 4
}
Line {
SrcBlock "Merge"
SrcPort 1
DstBlock "Tone"
DstPort 1
}
Line {
SrcBlock "Relational\nOperator"
SrcPort 1
Points [85, 0]
DstBlock "697 Hz"
DstPort enable
}
Line {
SrcBlock "Relational\nOperator1"
SrcPort 1
Points [85, 0]
DstBlock "770 Hz"
DstPort enable
}
Line {
SrcBlock "Relational\nOperator2"
SrcPort 1
Points [85, 0]
DstBlock "852 Hz"
DstPort enable
}
Line {
SrcBlock "Relational\nOperator3"
SrcPort 1
Points [85, 0]
DstBlock "941 Hz"
DstPort enable
}
Line {
SrcBlock "Constant"
SrcPort 1
DstBlock "Relational\nOperator"
DstPort 2
}
Line {
SrcBlock "Constant1"
SrcPort 1
DstBlock "Relational\nOperator1"
DstPort 2
}
Line {
SrcBlock "Constant2"
SrcPort 1
DstBlock "Relational\nOperator2"
DstPort 2
}
Line {
SrcBlock "Constant3"
SrcPort 1
DstBlock "Relational\nOperator3"
DstPort 2
}
Annotation {
Position [473, 42]
Text "One out of the four tone generators"
"\nare enabled at any time"
}
}
}
Block {
BlockType Lookup
Name "Row value\nfor digit"
Position [100, 34, 155, 76]
InputValues "[0 1 2 3 4 5 6 7 8 9 10 11]"
OutputValues "[3 0 0 0 1 1 1 2 2 2 3 3]"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [320, 40, 350, 70]
ShowName off
IconShape "round"
Inputs "|+-"
SaturateOnIntegerOverflow on
}
Block {
BlockType Outport
Name "Out1"
Position [400, 48, 430, 62]
Port "1"
OutputWhenDisabled "reset"
InitialOutput "0"
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "Column value\nfor digit"
SrcPort 1
DstBlock "Column Tones\n1209Hz 1336Hz 1477Hz"
DstPort 1
}
Line {
SrcBlock "Row value\nfor digit"
SrcPort 1
DstBlock "Row Tones\n697Hz 770Hz 852Hz 941Hz\n"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
Points [15, 0]
Branch {
Points [0, 95]
DstBlock "Column value\nfor digit"
DstPort 1
}
Branch {
DstBlock "Row value\nfor digit"
DstPort 1
}
}
Line {
SrcBlock "Column Tones\n1209Hz 1336Hz 1477Hz"
SrcPort 1
Points [55, 0]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Row Tones\n697Hz 770Hz 852Hz 941Hz\n"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Subtract 1"
Ports [1, 1]
Position [140, 94, 200, 146]
ShowPortLabels on
TreatAsAtomicUnit off
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
System {
Name "Subtract 1"
Location [392, 204, 582, 316]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "automatic"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [25, 28, 55, 42]
Port "1"
LatchInput off
Interpolate on
}
Block {
BlockType Constant
Name "Constant"
Position [70, 65, 90, 85]
ShowName off
Value "1"
VectorParams1D on
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [90, 25, 110, 45]
ShowName off
IconShape "round"
Inputs "|+-"
SaturateOnIntegerOverflow on
}
Block {
BlockType Outport
Name "Out1"
Position [135, 28, 165, 42]
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [5, 0]
DstBlock "Sum"
DstPort 2
}
}
}
Block {
BlockType Outport
Name "Out1"
Position [405, 113, 435, 127]
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
SrcBlock "Subtract 1"
SrcPort 1
DstBlock "Digit to Tone"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
Points [0, 0; 50, 0]
Branch {
DstBlock "Subtract 1"
DstPort 1
}
Branch {
Points [0, -65; 190, 0]
DstBlock "Digit to Tone"
DstPort enable
}
}
Line {
SrcBlock "Digit to Tone"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "DTMF Receiver"
Ports [1, 1]
Position [520, 114, 590, 186]
ShowName off
ShowPortLabels on
TreatAsAtomicUnit off
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
MaskPromptString "Sample Rate|Framesize"
MaskStyleString "edit,edit"
MaskTunableValueString "on,on"
MaskCallbackString "|"
MaskEnableString "on,on"
MaskVisibilityString "on,on"
MaskToolTipString "on,on"
MaskVariables "Fs=@1;Framesize=@2;"
MaskDisplay "disp('DTMF\\nReceiver');"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "Fs|Framesize"
MaskVariableAliases ","
Port {
PortNumber 1
Name "digits"
PropagatedSignals "out"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
}
System {
Name "DTMF Receiver"
Location [13, 227, 765, 478]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "automatic"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [20, 63, 50, 77]
Port "1"
LatchInput off
Interpolate on
}
Block {
BlockType Abs
Name "Abs"
Position [130, 55, 160, 85]
SaturateOnIntegerOverflow on
}
Block {
BlockType SubSystem
Name "Bandpass and decode"
Ports [1, 1]
Position [330, 126, 420, 194]
ShowPortLabels on
TreatAsAtomicUnit off
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
Port {
PortNumber 1
Name "Digit"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -