手机版

PC与51单片机串口通信(17)

时间:2025-07-15   来源:未知    
字号:

PC与51单片机串口通信。包括单片机内运行的程序,及MATLAB调试助手简易程序等!

'请检查串口连接或串口已打开'],'串口打开错误');

rethrow(lasterror); end

guidata(hObject, handles);

% --- Outputs from this function are returned to the command line. function varargout = chuankoutongxingmatlab_OutputFcn...

(hObject, eventdata, handles)

varargout{1} = handles.output;

% --- Executes on button press in pushbutton2.

function pushbutton2_Callback(hObject, eventdata, handles) delete(handles.figure1);%关闭对话框

% --- Executes on button press in pushbutton1.

function pushbutton1_Callback(hObject, eventdata, handles) global port; global data;

data=get(handles.edit2,'string'); fprintf(port,data);

function edit2_Callback(hObject, eventdata, handles)

% --- Executes during object creation, after setting all properties. function edit2_CreateFcn(hObject, eventdata, handles) if ispc && isequal(get(hObject,'BackgroundColor'),...

get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white'); end

function edit1_Callback(hObject, eventdata, handles)

PC与51单片机串口通信(17).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
×
二维码
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)