文件名称:autobaud
介绍说明--下载内容来自于网络,使用问题请自行百度
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
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.