文件名称:ak1
- 所属分类:
- 单片机(51,AVR,MSP430等)
- 资源属性:
- [Text]
- 上传时间:
- 2012-11-26
- 文件大小:
- 2kb
- 下载次数:
- 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