RS232串口通信实验报告
学院:电子信息学院
班级:08031102
姓名:张泽宇 康启萌 余建军
学号:2011301966 2011301950 2011301961
时间:2014年11月13日
学校:西北工业大学
一.实验题目:
设计一个简单的基于串口通信的信息发送和接受界面
二.实验目的:
1.熟悉并掌握RS232串口标准及原理。
2.实现PC机通过RS232串口进行数据的收发。
3.熟悉VC语言编写程序的环境,掌握基本的VC语言编程技巧。
三.实验内容
程序代码:
P// PC1PC2Dlg.cpp : implementation file
//
#include "stdafx.h"
#include "PC1PC2.h"
#include "PC1PC2Dlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
//
// CAboutDlg dialog used for App About
class CAboutDlg : public CDialog
{
public:
CAboutDlg();
// Dialog Data
//{ {AFX_DATA(CAboutDlg)
enum { IDD = IDD_ABOUTBOX };
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{ {AFX_VIRTUAL(CAboutDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
//{ {AFX_MSG(CAboutDlg)
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
//{ {AFX_DATA_INIT(CAboutDlg)
//}}AFX_DATA_INI