PIC系列单片机作为一款外设丰富性能优良的单片机,被广泛应用于各种控制系统。在微机测控系统中,用作上位机的PC机系统与用作下位机的单片机之间经常要进行信息交换。为此提出了一种基于Visual C++的PIC18F452单片机与PC机之间串行通信的实现方法,给出了硬件电路图和通信源程序,调试实验表明,硬件设计与软件开发达到了预期的功能要求。该方法为PIC单片机与PC机间串行通信的应用提供了良好的参考。
PIC SCM is a microcontroller with rich peripherals and high performance.It is widely used in various control systems.In the computer control system,information is often exchanged between PC used as the upper machine and PIC used as the lower machine.This paper mainly proposes an approach of serial communication between PIC18F452 and PC based on Visual C+ +,and hardware circuit and communication source program are provided.Debugging experiments indicate that the hardware design and software development achieve the preplanned function requirements.Therefore,the method provides good reference for serial communication between PIC SCM and PC.