匿名
未登录
登录
丢石头百科
搜索
查看“使用C8051F的串口对MAX3232进行自发自收”的源代码
来自丢石头百科
名字空间
页面
讨论
更多
更多
页面选项
查看
查看源代码
历史
←
使用C8051F的串口对MAX3232进行自发自收
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
<table border="0" cellpadding="0" cellspacing="0" style="color: rgb(72, 61, 139); font-family: Arial, 新宋体, 微软雅黑; font-size: 12px;" width="780"><tbody><tr><th class="type_483D8B" scope="col" style="line-height: 20px; font-weight: normal; border-top-style: none;" valign="top"> <table border="0" cellpadding="0" cellspacing="0" width="120"><tbody><tr><th bgcolor="#698192" class="white_12px_b" height="20" scope="col" style="font-size: 12px; color: rgb(255, 255, 255); line-height: 20px; font-family: Arial, Helvetica, sans-serif;">系统功能</th></tr></tbody></table> 使用C8051F的串口对MAX3232进行自发自收。 </th></tr><tr><th class="type_483D8B" scope="col" style="line-height: 20px; font-weight: normal; border-top-style: none;" valign="top"> <table border="0" cellpadding="0" cellspacing="0" width="120"><tbody><tr><th bgcolor="#698192" class="white_12px_b" height="20" scope="col" style="font-size: 12px; color: rgb(255, 255, 255); line-height: 20px; font-family: Arial, Helvetica, sans-serif;">硬件设计</th></tr></tbody></table> [[File:C8051F_3_9.jpg]] 串口芯片MAX3232控制电路原理图 </th></tr><tr><th class="type_483D8B" scope="col" style="line-height: 20px; font-weight: normal; border-top-style: none;" valign="top"> <table border="0" cellpadding="0" cellspacing="0" width="120"><tbody><tr><th bgcolor="#698192" class="white_12px_b" height="20" scope="col" style="font-size: 12px; color: rgb(255, 255, 255); line-height: 20px; font-family: Arial, Helvetica, sans-serif;">软件设计</th></tr></tbody></table> 下面部分从TXT拷出,拷到网页,代码部分缺省了很多空格,比较凌乱,请谅解! USART详细程序请查看<a class="Blue_2_12px_" href="https://{{SERVERNAME}}/article/C8051F-4-3-12.htm" style="color: rgb(7, 66, 184);" target="_blank">C8051F USART程序 。 //目标系统: 基于C8051F单片机 //应用软件: Silicon IDE / Keil /*01010101010101010101010101010101010101010101010101010101010101010101 ---------------------------------------------------------------------- 实验内容: 使用串口调试助手查看串口的收发状态是否正常。 ---------------------------------------------------------------------- 硬件连接: DVK501(MAX3232PrlPort) F320 EX VCC --------- VCC GND --------- GND R1O --------- P0.5 T1I --------- P0.4 ---------------------------------------------------------------------- 注意事项: (1)若有加载库程序,请将光盘根目录下的“library”下的“C8051F”文件夹拷到D盘 (2)请详细阅读:光盘根目录下的“说明书首页.htm”里的相应产品说明 ---------------------------------------------------------------------- 10101010101010101010101010101010101010101010101010101010101010101010*/ #define _DVK501_F320_EX_ #include <c8051f320.h> #include <stdio.h> #include <../../../../library/C8051F/ws_clock.h> #include <../../../../library/C8051F/ws_usart_port.h> void main (void) { uchar inputcharacter; PCA0MD &= ~0x40; //clear watchdog timer XBR1 = 0x40; // Enable crossbar and weak pull-ups clock_external(); usartInit(); while (1) { printf ("\nEnter character: "); inputcharacter = getkey (); printf ("\nCharacter entered : %c",inputcharacter); printf ("\n Value in Hex: %bx",inputcharacter); } }</th></tr><tr><th class="type_483D8B" scope="col" style="line-height: 20px; font-weight: normal; border-top-style: none;" valign="top"> <table border="0" cellpadding="0" cellspacing="0" width="120"><tbody><tr><th bgcolor="#698192" class="white_12px_b" height="20" scope="col" style="font-size: 12px; color: rgb(255, 255, 255); line-height: 20px; font-family: Arial, Helvetica, sans-serif;">系统调试</th></tr></tbody></table> 打开串口调试助手,波特率调为9600,在PC机接收到“Enter character: "后,从键盘中随意输入一个字母、数字或符号,然后回车,查看串口调试助手上的现象。 </th></tr></tbody></table>
返回至
使用C8051F的串口对MAX3232进行自发自收
。
导航
导航
首页
最近更改
随机页面
MediaWiki帮助
首页
首页
树莓派
主机
配件包
外壳
键鼠
电源
扩展板
显示屏
墨水屏
摄像模块
通信模块
继电器
电机驱动板
游戏机
产品分类
树莓派
Arduino
micro:bit
STM32
Espressif
WiFi模块
蓝牙模块
无线模块
LoRa模块
4G模块
GSM
GPRS
以太网
导航模块
北斗卫星
GPS
LCD
墨水屏
OLED
摄像头
USB模块
串口模块
RS232
RS485
CAN
传感器
温度模块
湿度模块
气压模块
继电器
电机模块
指纹模块
电平转换
音频模块
编程器
Wiki工具
Wiki工具
特殊页面
页面工具
页面工具
用户页面工具
更多
链入页面
相关更改
页面信息
页面日志