Model { Name "ex10_I2C" Version 7.6 MdlSubVersion 0 GraphicalInterface { NumRootInports 0 NumRootOutports 0 ParameterArgumentNames "" ComputedModelVersion "1.271" NumModelReferences 0 NumTestPointedSignals 0 } SavedCharacterEncoding "windows-1255" SaveDefaultBlockParams on ScopeRefreshTime 0.035000 OverrideScopeRefreshTime on DisableAllScopes off DataTypeOverride "UseLocalSettings" DataTypeOverrideAppliesTo "AllNumericTypes" MinMaxOverflowLogging "UseLocalSettings" MinMaxOverflowArchiveMode "Overwrite" MaxMDLFileLineLength 120 Created "Fri Dec 16 08:52:35 2011" Creator "Lior" UpdateHistory "UpdateHistoryNever" ModifiedByFormat "%" LastModifiedBy "Lior" ModifiedDateFormat "%" LastModifiedDate "Wed Jan 25 20:06:38 2012" RTWModifiedTimeStamp 249422794 ModelVersionFormat "1.%" ConfigurationManager "None" SampleTimeColors off SampleTimeAnnotations off LibraryLinkDisplay "none" WideLines off ShowLineDimensions off ShowPortDataTypes on ShowLoopsOnError on IgnoreBidirectionalLines off ShowStorageClass off ShowTestPointIcons on ShowSignalResolutionIcons on ShowViewerIcons on SortedOrder off ExecutionContextIcon off ShowLinearizationAnnotations on BlockNameDataTip off BlockParametersDataTip off BlockDescriptionStringDataTip off ToolBar on StatusBar on BrowserShowLibraryLinks off BrowserLookUnderMasks off SimulationMode "normal" LinearizationMsg "none" Profile off ParamWorkspaceSource "MATLABWorkspace" AccelSystemTargetFile "accel.tlc" AccelTemplateMakefile "accel_default_tmf" AccelMakeCommand "make_rtw" TryForcingSFcnDF off RecordCoverage off CovPath "/" CovSaveName "covdata" CovMetricSettings "dw" CovNameIncrementing off CovHtmlReporting on CovForceBlockReductionOff on covSaveCumulativeToWorkspaceVar on CovSaveSingleToWorkspaceVar on CovCumulativeVarName "covCumulativeData" CovCumulativeReport off CovReportOnPause on CovModelRefEnable "Off" CovExternalEMLEnable off ExtModeBatchMode off ExtModeEnableFloating on ExtModeTrigType "manual" ExtModeTrigMode "normal" ExtModeTrigPort "1" ExtModeTrigElement "any" ExtModeTrigDuration 1000 ExtModeTrigDurationFloating "auto" ExtModeTrigHoldOff 0 ExtModeTrigDelay 0 ExtModeTrigDirection "rising" ExtModeTrigLevel 0 ExtModeArchiveMode "off" ExtModeAutoIncOneShot off ExtModeIncDirWhenArm off ExtModeAddSuffixToVar off ExtModeWriteAllDataToWs off ExtModeArmWhenConnect on ExtModeSkipDownloadWhenConnect off ExtModeLogAll on ExtModeAutoUpdateStatusClock on BufferReuse off ShowModelReferenceBlockVersion off ShowModelReferenceBlockIO off Array { Type "Handle" Dimension 1 Simulink.ConfigSet { $ObjectID 1 Version "1.10.0" Array { Type "Handle" Dimension 10 Simulink.SolverCC { $ObjectID 2 Version "1.10.0" StartTime "0.0" StopTime "inf" AbsTol "auto" FixedStep "0.001" InitialStep "auto" MaxNumMinSteps "-1" MaxOrder 5 ZcThreshold "auto" ConsecutiveZCsStepRelTol "10*128*eps" MaxConsecutiveZCs "1000" ExtrapolationOrder 4 NumberNewtonIterations 1 MaxStep "auto" MinStep "auto" MaxConsecutiveMinStep "1" RelTol "1e-3" SolverMode "SingleTasking" ConcurrentTasks off Solver "FixedStepDiscrete" SolverName "FixedStepDiscrete" SolverJacobianMethodControl "auto" ShapePreserveControl "DisableAll" ZeroCrossControl "UseLocalSettings" ZeroCrossAlgorithm "Nonadaptive" AlgebraicLoopSolver "TrustRegion" SolverResetMethod "Fast" PositivePriorityOrder off AutoInsertRateTranBlk off SampleTimeConstraint "Unconstrained" InsertRTBMode "Whenever possible" } Simulink.DataIOCC { $ObjectID 3 Version "1.10.0" Decimation "1" ExternalInput "[t, u]" FinalStateName "xFinal" InitialState "xInitial" LimitDataPoints on MaxDataPoints "1000" LoadExternalInput off LoadInitialState off SaveFinalState off SaveCompleteFinalSimState off SaveFormat "Array" SaveOutput on SaveState off SignalLogging on DSMLogging on InspectSignalLogs off SaveTime on ReturnWorkspaceOutputs off StateSaveName "xout" TimeSaveName "tout" OutputSaveName "yout" SignalLoggingName "logsout" DSMLoggingName "dsmout" OutputOption "RefineOutputTimes" OutputTimes "[]" ReturnWorkspaceOutputsName "out" Refine "1" } Simulink.OptimizationCC { $ObjectID 4 Version "1.10.0" BlockReduction off BooleanDataType on ConditionallyExecuteInputs on InlineParams on UseIntDivNetSlope off UseSpecifiedMinMax off InlineInvariantSignals off OptimizeBlockIOStorage on BufferReuse off EnhancedBackFolding off StrengthReduction off ExpressionFolding on BooleansAsBitfields off BitfieldContainerType "uint_T" EnableMemcpy on MemcpyThreshold 64 PassReuseOutputArgsAs "Structure reference" ExpressionDepthLimit 2147483647 FoldNonRolledExpr on LocalBlockOutputs on RollThreshold 5 SystemCodeInlineAuto off StateBitsets off DataBitsets off UseTempVars off ZeroExternalMemoryAtStartup on ZeroInternalMemoryAtStartup on InitFltsAndDblsToZero off NoFixptDivByZeroProtection off EfficientFloat2IntCast off EfficientMapNaN2IntZero on OptimizeModelRefInitCode on LifeSpan "1" MaxStackSize "Inherit from target" BufferReusableBoundary on SimCompilerOptimization "Off" AccelVerboseBuild off } Simulink.DebuggingCC { $ObjectID 5 Version "1.10.0" RTPrefix "error" ConsistencyChecking "none" ArrayBoundsChecking "none" SignalInfNanChecking "none" SignalRangeChecking "none" ReadBeforeWriteMsg "UseLocalSettings" WriteAfterWriteMsg "UseLocalSettings" WriteAfterReadMsg "UseLocalSettings" AlgebraicLoopMsg "warning" ArtificialAlgebraicLoopMsg "warning" SaveWithDisabledLinksMsg "warning" SaveWithParameterizedLinksMsg "warning" CheckSSInitialOutputMsg on UnderspecifiedInitializationDetection "Classic" MergeDetectMultiDrivingBlocksExec "none" CheckExecutionContextPreStartOutputMsg off CheckExecutionContextRuntimeOutputMsg off SignalResolutionControl "UseLocalSettings" BlockPriorityViolationMsg "warning" MinStepSizeMsg "warning" TimeAdjustmentMsg "none" MaxConsecutiveZCsMsg "error" MaskedZcDiagnostic "warning" IgnoredZcDiagnostic "warning" SolverPrmCheckMsg "warning" InheritedTsInSrcMsg "warning" DiscreteInheritContinuousMsg "warning" MultiTaskDSMMsg "error" MultiTaskCondExecSysMsg "error" MultiTaskRateTransMsg "error" SingleTaskRateTransMsg "none" TasksWithSamePriorityMsg "warning" SigSpecEnsureSampleTimeMsg "warning" CheckMatrixSingularityMsg "none" IntegerOverflowMsg "warning" Int32ToFloatConvMsg "warning" ParameterDowncastMsg "error" ParameterOverflowMsg "error" ParameterUnderflowMsg "none" ParameterPrecisionLossMsg "warning" ParameterTunabilityLossMsg "warning" FixptConstUnderflowMsg "none" FixptConstOverflowMsg "none" FixptConstPrecisionLossMsg "none" UnderSpecifiedDataTypeMsg "none" UnnecessaryDatatypeConvMsg "none" VectorMatrixConversionMsg "none" InvalidFcnCallConnMsg "error" FcnCallInpInsideContextMsg "Use local settings" SignalLabelMismatchMsg "none" UnconnectedInputMsg "warning" UnconnectedOutputMsg "warning" UnconnectedLineMsg "warning" SFcnCompatibilityMsg "none" UniqueDataStoreMsg "none" BusObjectLabelMismatch "warning" RootOutportRequireBusObject "warning" AssertControl "UseLocalSettings" EnableOverflowDetection off ModelReferenceIOMsg "none" ModelReferenceMultiInstanceNormalModeStructChecksumCheck "error" ModelReferenceVersionMismatchMessage "none" ModelReferenceIOMismatchMessage "none" ModelReferenceCSMismatchMessage "none" UnknownTsInhSupMsg "warning" ModelReferenceDataLoggingMessage "warning" ModelReferenceSymbolNameMessage "warning" ModelReferenceExtraNoncontSigs "error" StateNameClashWarn "warning" SimStateInterfaceChecksumMismatchMsg "warning" InitInArrayFormatMsg "warning" StrictBusMsg "ErrorLevel1" BusNameAdapt "WarnAndRepair" NonBusSignalsTreatedAsBus "none" LoggingUnavailableSignals "error" BlockIODiagnostic "none" SFUnusedDataAndEventsDiag "warning" SFUnexpectedBacktrackingDiag "warning" SFInvalidInputDataAccessInChartInitDiag "warning" SFNoUnconditionalDefaultTransitionDiag "warning" SFTransitionOutsideNaturalParentDiag "warning" } Simulink.HardwareCC { $ObjectID 6 Version "1.10.0" Array { Type "Cell" Dimension 2 Cell "ProdHWDeviceType" Cell "ProdEqTarget" PropName "DisabledProps" } ProdBitPerChar 8 ProdBitPerShort 16 ProdBitPerInt 16 ProdBitPerLong 32 ProdBitPerFloat 32 ProdBitPerDouble 64 ProdBitPerPointer 16 ProdLargestAtomicInteger "Char" ProdLargestAtomicFloat "None" ProdIntDivRoundTo "Undefined" ProdEndianess "LittleEndian" ProdWordSize 16 ProdShiftRightIntArith on ProdHWDeviceType "16-bit Generic" TargetBitPerChar 8 TargetBitPerShort 16 TargetBitPerInt 32 TargetBitPerLong 32 TargetBitPerFloat 32 TargetBitPerDouble 64 TargetBitPerPointer 32 TargetLargestAtomicInteger "Char" TargetLargestAtomicFloat "None" TargetShiftRightIntArith on TargetIntDivRoundTo "Undefined" TargetEndianess "Unspecified" TargetWordSize 32 TargetTypeEmulationWarnSuppressLevel 0 TargetPreprocMaxBitsSint 32 TargetPreprocMaxBitsUint 32 TargetHWDeviceType "Specified" TargetUnknown off ProdEqTarget on } Simulink.ModelReferenceCC { $ObjectID 7 Version "1.10.0" UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange" CheckModelReferenceTargetMessage "error" EnableParallelModelReferenceBuilds off ParallelModelReferenceErrorOnInvalidPool on ParallelModelReferenceMATLABWorkerInit "None" ModelReferenceNumInstancesAllowed "Multi" PropagateVarSize "Infer from blocks in model" ModelReferencePassRootInputsByReference on ModelReferenceMinAlgLoopOccurrences off PropagateSignalLabelsOutOfModel off SupportModelReferenceSimTargetCustomCode off } Simulink.SFSimCC { $ObjectID 8 Version "1.10.0" SFSimEnableDebug on SFSimOverflowDetection on SFSimEcho on SimBlas on SimCtrlC on SimExtrinsic on SimIntegrity on SimUseLocalCustomCode off SimParseCustomCode on SimBuildMode "sf_incremental_build" } Simulink.RTWCC { $BackupClass "Simulink.RTWCC" $ObjectID 9 Version "1.10.0" Array { Type "Cell" Dimension 1 Cell "TargetLang" PropName "DisabledProps" } SystemTargetFile "dspic.tlc" GenCodeOnly off MakeCommand "make_CreateMPLAB" GenerateMakefile on TemplateMakefile "dspic_pic30_gcc.tmf" PostCodeGenCommand "dsPIC_Compile()" Description "Embedded Target for Microchip dsPIC (real-time)" GenerateReport off SaveLog off RTWVerbose on RetainRTWFile off ProfileTLC off TLCDebug off TLCCoverage off TLCAssert off ProcessScriptMode "Default" ConfigurationMode "Optimized" ProcessScript "dspic_make_rtw_hook" ConfigAtBuild off RTWUseLocalCustomCode off RTWUseSimCustomCode off IncludeHyperlinkInReport off LaunchReport off TargetLang "C" IncludeBusHierarchyInRTWFileBlockHierarchyMap off IncludeERTFirstTime off GenerateTraceInfo off GenerateTraceReport off GenerateTraceReportSl off GenerateTraceReportSf off GenerateTraceReportEml off GenerateCodeInfo off GenerateSLWebview off RTWCompilerOptimization "Off" CheckMdlBeforeBuild "Off" CustomRebuildMode "OnUpdate" Array { Type "Handle" Dimension 2 Simulink.CodeAppCC { $ObjectID 10 Version "1.10.0" ForceParamTrailComments off GenerateComments on IgnoreCustomStorageClasses off IgnoreTestpoints off IncHierarchyInIds off MaxIdLength 31 PreserveName off PreserveNameWithParent off ShowEliminatedStatement off IncAutoGenComments off SimulinkDataObjDesc off SFDataObjDesc off MATLABFcnDesc off IncDataTypeInIds off MangleLength 1 CustomSymbolStrGlobalVar "$R$N$M" CustomSymbolStrType "$N$R$M" CustomSymbolStrField "$N$M" CustomSymbolStrFcn "$R$N$M$F" CustomSymbolStrFcnArg "rt$I$N$M" CustomSymbolStrBlkIO "rtb_$N$M" CustomSymbolStrTmpVar "$N$M" CustomSymbolStrMacro "$R$N$M" DefineNamingRule "None" ParamNamingRule "None" SignalNamingRule "None" InsertBlockDesc off InsertPolySpaceComments off SimulinkBlockComments on MATLABSourceComments off EnableCustomComments off InlinedPrmAccess "Literals" ReqsInCode off UseSimReservedNames off } Simulink.STFCustomTargetCC { $BackupClass "Simulink.TargetCC" $ObjectID 11 Version "1.10.0" Array { Type "Cell" Dimension 6 Cell "GenerateSampleERTMain" Cell "MatFileLogging" Cell "SupportNonInlinedSFcns" Cell "UtilityFuncGeneration" Cell "IncludeMdlTerminateFcn" Cell "ModelReferenceCompliant" PropName "DisabledProps" } TargetFcnLib "ansi_tfl_table_tmw.mat" TargetLibSuffix "" TargetPreCompLibLocation "" TargetFunctionLibrary "ANSI_C" UtilityFuncGeneration "Auto" ERTMultiwordTypeDef "System defined" ERTCodeCoverageTool "None" ERTMultiwordLength 256 MultiwordLength 2048 GenerateFullHeader on GenerateSampleERTMain off GenerateTestInterfaces off IsPILTarget off ModelReferenceCompliant on ParMdlRefBuildCompliant off CompOptLevelCompliant off IncludeMdlTerminateFcn off GeneratePreprocessorConditionals "Use local settings" CombineOutputUpdateFcns on CombineSignalStateStructs off SuppressErrorStatus on ERTFirstTimeCompliant off IncludeFileDelimiter "Auto" ERTCustomFileBanners on SupportAbsoluteTime on LogVarNameModifier "rt_" MatFileLogging off MultiInstanceERTCode off SupportNonFinite on SupportComplex on PurelyIntegerCode off SupportContinuousTime off SupportNonInlinedSFcns off SupportVariableSizeSignals off EnableShiftOperators on ParenthesesLevel "Nominal" PortableWordSizes off ModelStepFunctionPrototypeControlCompliant off CPPClassGenCompliant off AutosarCompliant off SystemTargetFile "dspic.tlc" DialogCategory 0 Array { Type "Handle" Dimension 1 Simulink.ERTTargetCC { $BackupClass "Simulink.TargetCC" $ObjectID 12 Version "1.10.0" Array { Type "Cell" Dimension 9 Cell "GenerateSampleERTMain" Cell "GenerateErtSFunction" Cell "MatFileLogging" Cell "GRTInterface" Cell "ERTCustomFileTemplate" Cell "SupportNonInlinedSFcns" Cell "UtilityFuncGeneration" Cell "IncludeMdlTerminateFcn" Cell "ModelReferenceCompliant" PropName "DisabledProps" } TargetFcnLib "ansi_tfl_table_tmw.mat" TargetLibSuffix "" TargetPreCompLibLocation "" TargetFunctionLibrary "ANSI_C" UtilityFuncGeneration "Auto" ERTMultiwordTypeDef "System defined" ERTCodeCoverageTool "None" ERTMultiwordLength 256 MultiwordLength 2048 GenerateFullHeader on GenerateSampleERTMain off GenerateTestInterfaces off IsPILTarget off ModelReferenceCompliant on ParMdlRefBuildCompliant off CompOptLevelCompliant off IncludeMdlTerminateFcn off GeneratePreprocessorConditionals "Use local settings" CombineOutputUpdateFcns on CombineSignalStateStructs off SuppressErrorStatus on ERTFirstTimeCompliant off IncludeFileDelimiter "Auto" ERTCustomFileBanners on SupportAbsoluteTime on LogVarNameModifier "rt_" MatFileLogging off MultiInstanceERTCode off SupportNonFinite on SupportComplex on PurelyIntegerCode off SupportContinuousTime off SupportNonInlinedSFcns off SupportVariableSizeSignals off EnableShiftOperators on ParenthesesLevel "Nominal" PortableWordSizes off ModelStepFunctionPrototypeControlCompliant off CPPClassGenCompliant off AutosarCompliant off GenerateErtSFunction off CreateSILPILBlock "None" GenerateASAP2 off ExtMode off ExtModeTransport 0 ExtModeStaticAlloc off ExtModeStaticAllocSize 1000000 ExtModeTesting off ExtModeMexFile "ext_serial_win32_comm" ExtModeIntrfLevel "Level1" InlinedParameterPlacement "NonHierarchical" TargetOS "BareBoardExample" MultiInstanceErrorCode "Error" RateGroupingCode on RootIOFormat "Individual arguments" RTWCAPISignals off RTWCAPIParams off RTWCAPIStates off ERTSrcFileBannerTemplate "dsPIC_code_template.cgt" ERTHdrFileBannerTemplate "dsPIC_code_template.cgt" ERTDataSrcFileTemplate "dsPIC_code_template.cgt" ERTDataHdrFileTemplate "dsPIC_code_template.cgt" ERTCustomFileTemplate "dsPIC_main.tlc" CoverageDialogOpen "off" ModuleNamingRule "Unspecified" SignalDisplayLevel 10 ParamTuneLevel 10 GlobalDataDefinition "Auto" DataDefinitionFile "global.c" GlobalDataReference "Auto" ERTFilePackagingFormat "Modular" DataReferenceFile "global.h" GRTInterface off PreserveExpressionOrder off PreserveIfCondition off ConvertIfToSwitch off PreserveExternInFcnDecls on EnableUserReplacementTypes off Array { Type "Struct" Dimension 1 MATStruct { double "" single "" int32 "" int16 "" int8 "" uint32 "" uint16 "" uint8 "" boolean "" int "" uint "" char "" } PropName "ReplacementTypes" } MemSecPackage "--- None ---" MemSecDataConstants "Default" MemSecDataIO "Default" MemSecDataInternal "Default" MemSecDataParameters "Default" MemSecFuncInitTerm "Default" MemSecFuncExecute "Default" } PropName "Components" } CustomProperty { DataType "string" Name "GMAKE_PLACE" Value "C:\\PROGRA~1\\MATLAB\\R2010b\\bin\\win64\\gmake" } CustomProperty { DataType "string" Name "OPTIM_GCC" Value "-mcpu=33fJ256GP710A -O3 -fschedule-insns -fschedule-insns2" } CustomProperty { DataType "string" Name "LDFLAGS" Value " -Xlinker -t -Xlinker --report-mem -Xlinker -Map=../untitled.map -Xlinker --heap=0 -Xlinker -cref" } CustomProperty { DataType "string" Name "LDPICTYPE" Value " -Xlinker --script=C:\\PROGRA~2\\MICROC~1\\MPLABC~1\\support\\dsPIC33F\\gld\\p33fJ256GP710A.gld" } CustomProperty { DataType "string" Name "LDLIBPIC" Value " C:\\PROGRA~2\\MICROC~1\\MPLABC~1\\lib\\libpic30-coff.a C:\\PROGRA~2\\MICROC~1\\MPLABC~1\\lib\\dsPIC33F\\li" "bp33fJ256GP710A-coff.a C:\\PROGRA~2\\MICROC~1\\MPLABC~1\\lib\\libc-coff.a C:\\PROGRA~2\\MICROC~1\\MPLABC~1\\lib\\lib" "m-coff.a" } CustomProperty { DataType "string" Name "PIC_INCLUDES" Value " -I C:\\PROGRA~2\\MICROC~1\\MPLABC~1\\include" } CustomProperty { DataType "string" Name "PIC_REF" Value "33fJ256GP710A" } CustomProperty { DataType "string" Name "GCCPATH" Value "''" } } PropName "Components" } } SSC.SimscapeCC { $ObjectID 13 Version "1.0" Array { Type "Cell" Dimension 1 Cell "Name" PropName "DisabledProps" } Array { Type "Handle" Dimension 1 MECH.SimMechanicsCC { $ObjectID 14 Version "1.10.0" Name "SimMechanics" WarnOnRedundantConstraints on WarnOnSingularInitialAssembly off ShowCutJoints off VisOnUpdateDiagram off VisDuringSimulation off EnableVisSimulationTime on VisSampleTime "0" DisableBodyVisControl off ShowCG on ShowCS on ShowOnlyPortCS off HighlightModel on FramesToBeSkipped "0" AnimationDelay "3" RecordAVI off CompressAVI on AutoFitVis "off" EnableSelection on LastVizWinPosition "[-1 -1 -1 -1]" CamPosition "[0 0 0]" CamTarget "[0 0 -1]" CamUpVector "[0 1 0]" CamHeight "-1" CamViewAngle "0" VisBackgroundColor "[0.9 0.9 0.95]" DefaultBodyColor "[1 0 0]" MDLBodyVisualizationType "Convex hull from body CS locations" OVRRIDBodyVisualizationType "NONE" } PropName "Components" } Name "Simscape" EditingMode "Full" ExplicitSolverDiagnosticOptions "warning" InputDerivativeDiagnosticOptions "warning" GlobalZcOffDiagnosticOptions "warning" SimscapeLogType "none" SimscapeLogName "simlog" SimscapeLogDecimation 1 SimscapeLogLimitData on SimscapeLogDataHistory 5000 } DES.SimEventsCC { $BackupClass "Simulink.CustomCC" $ObjectID 15 Version "1.10.0" Name "SimEvents" SimEventsActiveTab "0" propIdentEvents "0" propIdentEventSeed "123456789" propUnconnectedPorts "0" propMaxDesBlkSimulEvents "1000" propMaxDesMdlSimulEvents "100000" propDiagAttribOutput "1" propDiagFcnCallOutput "1" propDiagStatOutput "0" propDiagChangeAttrib "2" propRNGIdenticalSeeds "1" } PropName "Components" } Name "Configuration" ExtraOptions "-aGenerateTraceInfo=0 -aIgnoreTestpoints=0 " CurrentDlgPage "Solver" ConfigPrmDlgPosition " [ 200, 85, 1080, 715 ] " } PropName "ConfigurationSets" } Simulink.ConfigSet { $PropName "ActiveConfigurationSet" $ObjectID 1 } BlockDefaults { ForegroundColor "black" BackgroundColor "white" DropShadow off NamePlacement "normal" FontName "Helvetica" FontSize 10 FontWeight "normal" FontAngle "normal" ShowName on BlockRotation 0 BlockMirror off } AnnotationDefaults { HorizontalAlignment "center" VerticalAlignment "middle" ForegroundColor "black" BackgroundColor "white" DropShadow off FontName "Helvetica" FontSize 10 FontWeight "normal" FontAngle "normal" UseDisplayTextAsClickCallback off } LineDefaults { FontName "Helvetica" FontSize 9 FontWeight "normal" FontAngle "normal" } BlockParameterDefaults { Block { BlockType Demux Outputs "4" DisplayOption "none" BusSelectionMode off } Block { BlockType SubSystem ShowPortLabels "FromPortIcon" Permissions "ReadWrite" PermitHierarchicalResolution "All" TreatAsAtomicUnit off CheckFcnCallInpInsideContextMsg off SystemSampleTime "-1" RTWFcnNameOpts "Auto" RTWFileNameOpts "Auto" RTWMemSecFuncInitTerm "Inherit from model" RTWMemSecFuncExecute "Inherit from model" RTWMemSecDataConstants "Inherit from model" RTWMemSecDataInternal "Inherit from model" RTWMemSecDataParameters "Inherit from model" SimViewingDevice off DataTypeOverride "UseLocalSettings" DataTypeOverrideAppliesTo "AllNumericTypes" MinMaxOverflowLogging "UseLocalSettings" Variant off GeneratePreprocessorConditionals off } } System { Name "ex10_I2C" Location [498, 84, 1244, 718] Open on ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "A4" PaperUnits "centimeters" TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" ReportName "simulink-default.rpt" SIDHighWatermark "761" Block { BlockType SubSystem Name "Blinking LEDs" SID "497" Ports [] Position [420, 213, 465, 255] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Blinking LEDs" Location [487, 220, 1136, 510] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "A4" PaperUnits "centimeters" TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Reference Name "Bitwise\nOperator" SID "750" Ports [1, 1] Position [240, 116, 280, 154] LibraryVersion "1.225" SourceBlock "simulink/Logic and Bit\nOperations/Bitwise\nOperator" SourceType "Bitwise Operator" logicop "NOT" UseBitMask off NumInputPorts "1" BitMask "bin2dec('11011001')" BitMaskRealWorld "Stored Integer" } Block { BlockType Demux Name "Demux" SID "726" Ports [1, 4] Position [325, 44, 330, 221] ShowName off DisplayOption "bar" } Block { BlockType Reference Name "Integer to Bit\nConverter" SID "722" Ports [1, 1] Position [115, 122, 195, 148] LibraryVersion "1.270" SourceBlock "commutil2/Integer to Bit\nConverter" SourceType "Integer to Bit Converter" nbits "4" signedInputValues "Unsigned" bitOrder "MSB first" outDtype "boolean" } Block { BlockType Reference Name "Red LED" SID "506" Tag "dsPIC_Digital_Output" Ports [4] Position [410, 38, 520, 227] Priority "5" LibraryVersion "3.44" SourceBlock "dsPICdrivers/Digital I//O/Digital Output Write" SourceType "" PORT "E" Pin "[1 2 3 4]" Simultaneous on OrderingInOutPopup "None" } Block { BlockType Reference Name "Repeating\nSequence\nStair" SID "510" Ports [0, 1] Position [35, 120, 65, 150] LibraryVersion "1.225" SourceBlock "simulink/Sources/Repeating\nSequence\nStair" SourceType "Repeating Sequence Stair" ShowPortLabels "FromPortIcon" SystemSampleTime "-1" FunctionWithSeparateData off RTWMemSecFuncInitTerm "Inherit from model" RTWMemSecFuncExecute "Inherit from model" RTWMemSecDataConstants "Inherit from model" RTWMemSecDataInternal "Inherit from model" RTWMemSecDataParameters "Inherit from model" GeneratePreprocessorConditionals off OutValues "[0 1 3 7 14 12 8 ].'" tsamp "0.1" OutMin "[]" OutMax "[]" OutDataTypeStr "uint8" OutputDataTypeScalingMode "uint8" OutDataType "fixdt(0,8)" ConRadixGroup "Best Precision: Vector-wise" OutScaling "2^-12" LockScale off } Line { SrcBlock "Repeating\nSequence\nStair" SrcPort 1 DstBlock "Integer to Bit\nConverter" DstPort 1 } Line { SrcBlock "Integer to Bit\nConverter" SrcPort 1 DstBlock "Bitwise\nOperator" DstPort 1 } Line { SrcBlock "Demux" SrcPort 1 DstBlock "Red LED" DstPort 1 } Line { SrcBlock "Demux" SrcPort 2 DstBlock "Red LED" DstPort 2 } Line { SrcBlock "Demux" SrcPort 3 DstBlock "Red LED" DstPort 3 } Line { SrcBlock "Demux" SrcPort 4 DstBlock "Red LED" DstPort 4 } Line { SrcBlock "Bitwise\nOperator" SrcPort 1 DstBlock "Demux" DstPort 1 } } } Block { BlockType Reference Name "Configuration" SID "2" Ports [] Position [545, 75, 645, 125] BackgroundColor "lightBlue" DropShadow on LibraryVersion "3.44" SourceBlock "dsPICdrivers/Configuration" SourceType "" ShowPortLabels "FromPortIcon" SystemSampleTime "-1" FunctionWithSeparateData off RTWMemSecFuncInitTerm "Inherit from model" RTWMemSecFuncExecute "Inherit from model" RTWMemSecDataConstants "Inherit from model" RTWMemSecDataInternal "Inherit from model" RTWMemSecDataParameters "Inherit from model" GeneratePreprocessorConditionals off double64 off } Block { BlockType Reference Name "Configure Model \nfor dsPIC" SID "3" Ports [] Position [100, 69, 212, 125] ForegroundColor "blue" BackgroundColor "yellow" LibraryVersion "3.44" SourceBlock "dsPICdrivers/Simulink Configuration/Configure Model \nfor dsPIC" SourceType "" } Block { BlockType Reference Name "Generate Code" SID "8" Ports [] Position [235, 69, 347, 125] ForegroundColor "blue" BackgroundColor "yellow" DropShadow on LibraryVersion "3.44" SourceBlock "dsPICdrivers/Simulink Configuration/Generate Code" SourceType "" } Block { BlockType Reference Name "I2C Bus Master2" SID "761" Tag "dsPIC_I2C_Master" Ports [] Position [245, 342, 370, 438] LibraryVersion "3.44" List { ListType RTWdata NbrInput8Data "0" NbrOutput8Data "0" LengthListeCmdI2C "4" NumI2C "2" Enable "1" Adress10Bits "0" I2CBusFreq " 360" SlewRate "0" Disable "1" WaitAfterEnable "1" SMBUSThreshold "0" OutputErrorFlag "0" Initialisation "1" } SourceBlock "dsPICdrivers/BUS I2C/I2C Bus Master" SourceType "I2C Master" NumI2C "2" AltI2C off Sequence "'S A92 W100 P'" InitializeOnceOnly "When PIC is initialized (only once)" Enable on WaitAfterEnable "1" Disable on AdressNbrBits "7 bits" I2CBusFreq " 360" SlewRate off SMBUSThreshold off OutputErrorFlag off SampleTime "0.1" OrderingInOutPopup "None" Info "Fscl = 20.0605 KHz" } Block { BlockType Reference Name "Master" SID "758" Tag "dsPIC_MASTER" Ports [] Position [394, 75, 494, 125] BackgroundColor "lightBlue" DropShadow on Priority "1" LibraryVersion "3.44" List { ListType RTWdata NumBusyPort "-1" } SourceBlock "dsPICdrivers/Master" SourceType "Master" TimeStepType "Timer1" picType "33fJ256GP710A" fcy "7375000" Quartz_33f "8e6" PLLActive_33f on fcyDesired_33f "7.37e6" tmr1 "[1 3999 0]" tmr1Info "Time Step : 0.001 ; Error : 0% PR1=7374" tmr2345 "[0 0 0 0 0 0 0 0]" tmr2345cfg "[-1 -1 -1 -1 -1 -1 -1 -1]" IOautoConf on typePort "[ 0 0 20 20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0" " 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0" " 0 0 0 0 0 0 0 0 0 0 0 0 0 10 10 10 10 0 0 0 0 0 0 0 0 0 0 0" " 0 0 0 0 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0" " 0 0 0 0 ]" TRIS "[ 65535 65535 65535 65535 65505 65535 65535 ]" ADPCFG "503316480" MasterBusyPort "None" MasterOverloadPort "None" FOSC "Quartz (XT - HS)" ClockSwitchMonitor "Clock switching enabled only" TempProtection_33f "TEMP_ON" FPBOR "" PWRT "disable" MCLR "" ICD "ICS_PGD1" JTAGEN "JTAGEN_OFF" PowerSave off OverrideFcy off NewFcy "1e6" PR2345 "[65535 65535 65535 65535 65535 65535 65535 65535]" } Block { BlockType Reference Name "Ports Info" SID "718" Tag "dsPIC_PortInfo" Ports [] Position [543, 174, 711, 396] LibraryVersion "3.44" SourceBlock "dsPICdrivers/Ports Info" SourceType "" } Block { BlockType Reference Name "UART Configuration1" SID "716" Tag "dsPIC_config_UART" Ports [] Position [115, 183, 215, 233] BackgroundColor "lightBlue" DropShadow on Priority "2" LibraryVersion "3.44" List { ListType RTWdata RxBufferSize "32" } SourceBlock "dsPICdrivers/Serial PORT/UART Configuration" SourceType "Configure UART" UART "2" proposed_BAUD "115200" BAUD "115200" ALT_TX_RX on InterruptTxWhen "When Transmit Buffer is empty" TXInterruptPri "1" TxBufferSize "32" TXEN off InterruptRxWhen "When Receive Buffer is full (contain 4 characters)" RXInterruptPri "2" RxBufferSize "32" DoNotImplementRxInterrupt off DoNotImplementTxInterrupt off UxBRG "1" Info "UxBRG = 1 || Real Baud : 125000 || % error : 8.5069 || max 12.5 Bytes / Step" RealBaud "0" ERROR "8.5069" BYTES_STEP "12.5" } } } # Finite State Machines # # Stateflow Version 7.5 (R2010a) dated Jul 24 2010, 06:19:54 # # Stateflow { machine { id 1 name "ex10_I2C" created "17-Dec-2011 15:22:21" isLibrary 0 firstTarget 2 sfVersion 75014000.000003 } target { id 2 name "sfun" description "Default Simulink S-Function Target." machine 1 linkNode [1 0 3] } target { id 3 name "rtw" machine 1 linkNode [1 2 0] } }