文件名称:autobaud
- 所属分类:
- 单片机(51,AVR,MSP430等)
- 资源属性:
- [ASM] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 1kb
- 下载次数:
- 0次
- 提 供 者:
- 宋**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
C8051检测用户设定的波特率,然后初始化自己的波特率。-This code attempts to automatically detect the user s baud rate and initialize the 8051 s built-in uart. More specifically, these steps are taken:
1.If the code was assembled with the correct baud rate, skip to step 5.
2.If we have previously detected the baud rate, skip to step 5.
3.Wait for the user to press Enter (aka Carriage Return) and count how long it takes for the bits to arrive.
4.Calculate the required timer1 reload value for the user s baud rate.
5.Store the result so that we can (hopefully) skip having to detect the baud rate if this code is called again.
6.Initialize the various special function registers.
1.If the code was assembled with the correct baud rate, skip to step 5.
2.If we have previously detected the baud rate, skip to step 5.
3.Wait for the user to press Enter (aka Carriage Return) and count how long it takes for the bits to arrive.
4.Calculate the required timer1 reload value for the user s baud rate.
5.Store the result so that we can (hopefully) skip having to detect the baud rate if this code is called again.
6.Initialize the various special function registers.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
autobaud.asm