资源简介
一个简单的matlab 编程串口通信程序。可以供初学者使用
代码片段和文件信息
function varargout = seriesComm(varargin)
% SERIESCOMM M-file for seriesComm.fig
% SERIESCOMM by itself creates a new SERIESCOMM or raises the existing
% singleton*.
%
% H = SERIESCOMM returns the handle to a new SERIESCOMM or the handle to
% the existing singleton*.
%
% SERIESCOMM(‘CALLBACK‘hobjecteventDatahandles...) calls the local
% function named CALLBACK in SERIESCOMM.M with the given input arguments.
%
% SERIESCOMM(‘Property‘‘Value‘...) creates a new SERIESCOMM or raises the
% existing singleton*. Starting from the left property value pairs are
% applied to the GUI before seriesComm_OpeningFunction gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to seriesComm_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE‘s Tools menu. Choose “GUI allows only one
% instance to run (singleton)“.
%
% See also: GUIDE GUIDATA GUIHANDLES
% Edit the above text to modify the response to help seriesComm
% Last Modified by GUIDE v2.5 16-Nov-2005 22:07:39
% Begin initialization code - DO NOT EDIT
%%Author: spirit3772THUEENIP LABlks04@mails.tsinghua.edu.cn
%%Date: 2005/11/1623:00
gui_Singleton = 1;
gui_State = struct(‘gui_Name‘ mfilename ...
‘gui_Singleton‘ gui_Singleton ...
‘gui_OpeningFcn‘ @seriesComm_OpeningFcn ...
‘gui_OutputFcn‘ @seriesComm_OutputFcn ...
‘gui_LayoutFcn‘ [] ...
‘gui_Callback‘ []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State varargin{:});
else
gui_mainfcn(gui_State varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Executes just before seriesComm is made visible.
function seriesComm_OpeningFcn(hobject eventdata handles varargin)
% This function has no output args see OutputFcn.
% hobject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to seriesComm (see VARARGIN)
% Choose default command line output for seriesComm
handles.output = hobject;
%设置初始化参数
set(handles.text3‘string‘‘‘);
set(handles.text4‘string‘‘‘);
set(handles.pushbutton4‘enable‘‘off‘);
set(handles.pushbutton5‘enable‘‘off‘);
set(handles.pushbutton6‘enable‘‘off‘);
set(handles.pushbutton1‘String‘‘Open Serial Port‘‘foreGroundColor‘[100.5]);
set(handles.checkbox1‘Value‘0);
set(handles.checkbox2‘Value‘0);
%设置handles中的一些变量,便于全局共享
handles.displayT = 0;
handles.displayR = 1;
handles.baud_rate = 600;
handles.com = ‘COM1‘;
handles.verifiedBits = ‘NONE‘;
handles.dataBits = 8;
handles.stopBit = 1;
handles.flowControl = ‘NONE‘;
handles.receiveString = ‘‘;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 5705 2005-11-17 14:47 seriesComm.fig
文件 19728 2005-11-18 12:11 seriesComm.m
----------- --------- ---------- ----- ----
25651 3
- 上一篇:无线传感网仿真代码
- 下一篇:以MATLAB为平台的电弧模型
相关资源
- 以MATLAB为平台的电弧模型
- 开关磁阻电机MATLAB模型 非线性 电压
- 利用MATLAB从图片中提取曲线数据的小
- MATLAB写的成绩管理系统
- 基于PCA法的故障检测含matlab代码
- matlab版本的红外目标跟踪代码
- matlab的copula相关程序
- matlab中text函数在显示字符串时的使用
- jpeg压缩的matlab程序
- PIIFD描述符matlab源代码
- 自动驾驶多目标检测.7z
- 使用QQ监控Matlab程序运行
- 登月挺软着陆MATLAB仿真
- 图像分割的多种算法MATLAB代码
- matlab实现图像模板匹配
- 光伏MPPT模型
- RS编码和纠错算法 matlab
- Matlab2010b的license.txt
- 基于matlab的自动报靶系统.rar
- matlab声线图源代码
- 神经网络理论与Matlab R2007实现
-
matlab simuli
nk 离合器模型 - 多车型车辆路径问题Matlab程序
- GPS/INS组合导航Matlab仿真源码包含实验
- Delaunay三角划分的Matlab实现
- isight联合matlab仿真
- 利用MATLAB优化电力系统稳定器
- BPA转matpower格式Matlab程序
- 基于C MEX S函数的研华PCI1716驱动程序
- 最小二乘法 MATLAB
评论
共有 条评论