文件名称: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
1999-2046 搜珍网 All Rights Reserved.
本站作为网络服务提供者,仅为网络服务对象提供信息存储空间,仅对用户上载内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。
