文件名称:ak1
-
所属分类:
- 标签属性:
- 上传时间:2008-10-13
-
文件大小:1.96kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
一些应用中,经常要用到双串口,但是一般单片机只提供一个串口,其实完全可以用普通I/O口模拟一个串口。以下的程序是我编写的模拟串口程序,程序中使用了单片机的定时器0,和INT0中断。数据的发送和接收由中断程序自动进行。程序已经过AVR仿真器仿真和实际烧片使用,证明可靠。有一点需要说明的是,此模拟的串口为半双工方式。
主程序中,单片机将标准串口设置为115200bps,将模拟串口设置为19200bps。单片机将标准串口收到的数据从模拟串口发送出去,将模拟串口接收到的数据从标准串口发送回来。-some applications, the regular use of the dual serial port, but most only provide a microcontroller serial, In fact, the general can use I / O simulation of a serial mouth. Following the procedure is that I serial simulation procedure is the use of the computer's timer 0, and INT0 interruption. Data sending and receiving process by automatically suspended. Procedures have been AVR Simulator simulation and actual use of burn unit proved reliable. It should be explained that this simulation of half-duplex serial port. Main program, SCM standard serial port set to 115,200 bps. Serial analog set to 19,200 bps. SCM standard serial data received from analog to serial sent, Serial analog to receive data from the standard serial sent back.
主程序中,单片机将标准串口设置为115200bps,将模拟串口设置为19200bps。单片机将标准串口收到的数据从模拟串口发送出去,将模拟串口接收到的数据从标准串口发送回来。-some applications, the regular use of the dual serial port, but most only provide a microcontroller serial, In fact, the general can use I / O simulation of a serial mouth. Following the procedure is that I serial simulation procedure is the use of the computer's timer 0, and INT0 interruption. Data sending and receiving process by automatically suspended. Procedures have been AVR Simulator simulation and actual use of burn unit proved reliable. It should be explained that this simulation of half-duplex serial port. Main program, SCM standard serial port set to 115,200 bps. Serial analog set to 19,200 bps. SCM standard serial data received from analog to serial sent, Serial analog to receive data from the standard serial sent back.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
ak1.txt
www.dssz.com.txt
www.dssz.com.txt
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.