完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛扫一扫,分享给好友
|
嘿,我试着用UART工作。
我复制了数据表中给出的用于软件地址检测的相同代码。但是代码不起作用。 你能帮助我吗?每个配置都与数据表中的相同。 其次是使用UART电缆在半双工模式下使用PC或板上的问题 以上来自于百度翻译 以下为原文 Hey i tried working with uart. i copied the same code given in thedata sheet for software address detection. But the code is not working. can you help me out ....Every configuration is the same as given in data sheet. Secondly is there a problem using uart cable in half duplex mode either with pc or board to board |
|
相关推荐
15个回答
|
|
|
我还有一个问题…
什么是TX EN引脚后,选择硬件TX使能… 是不是说“我要传播”? 它有什么用呢? 以上来自于百度翻译 以下为原文 i have one more question... what is tx-en pin that appers after selecting hardware tx enable.... is it some sort of saying that "i am going to transmit" What is the use of it... |
|
|
|
|
|
我想我们应该归结为个人的纪律。我是评论家,
在我继续进行的时候重新审视它们。尤其是那些评论所反映的, 或者应该反映代码不分段的HW特性。毕竟在这 年龄和年龄,我们采取API的应用,并根据他们的描述,而不是 彻底检查潜在的HW。否则我们将继续工作 4位处理器,还不包括简单的计算器应用程序。 然而,你的观点并没有落在我身上。我的评论不再发表评论了。 准确。但这又回到了个人习惯,释放压力,时间 Mars之旅……这就是人类必须被机器取代的原因。 问候,Dana。 以上来自于百度翻译 以下为原文 I suppose we are getting down to an individuals discipline. I am a commenter, and re-examine them as I go along. Especially in light that comments reflect, or should reflect, HW peculiarities that a code piece may not. After all in this day and age we take API's and apply them based on their description, not a thorough examination of underlying HW. Otherwise we would still be working with 4 bit processors and not yet beyond simple calculator applications. Your point, however, is not lost on me. My reviews do show up comments no longer accurate. But that goes back to personel habits, pressure to release, time for that trip to Mars........This is why humans must be replaced with machines. Regards, Dana. |
|
|
|
|
|
看看RS232接口的定义,你会发现RTS和CTS信号。它们被广泛地用来作为硬件协议来控制数据流的方向。
让您的UART以常规方式工作,即没有寻址字节等,您的PC无法使用它。UART是一种非常简单的数据传输,但在连接到PC机时需要电压电平偏移,通常是Maxm芯片和一些CS。 当你陷入困境时,把你的项目上传到这里,我们来看看。 这样做:建设和清洁工程 文件& gt;创建工作区束(最小) 最后上传结果。 鲍勃 以上来自于百度翻译 以下为原文 Have a look at the definition for a RS232 interface, there you'll find RTS and CTS-signals. They have been used widedly to control as a hardware-protocol the direction of dataflow. Get your UART to work in the conventional way, that is without addressing-bytes and so on, your PC is not able to work with that. UART is a very simple data-transmission but needs a voltage-level shift when connected to a PC, usually a maxim chip and some Cs. When you got stuck, upload your project here, we'll have a look at it. To do so: Build -> Clean Project File -> Create Workspace Bundle(minimal) and finally upload the resulting .Zip-archieve. Bob |
|
|
|
|
|
如果你使用的是-001或050 DVK,他们都有RS232收发器。
RS232链路的两端必须配置: PC端-通常流量控制关闭。使用Windows设备管理器设置其他参数。 确保没有其他PC应用软件在端口上有挂钩。 DVK结束时钟设置频繁出现问题的根源。确保收发器电源跳线 就位了,如果有的话。 电缆,正常交换电缆,RX到Tx和Tx到RX。 前面提到的两个板都有可以运行的UART示例。 问候,Dana。 以上来自于百度翻译 以下为原文 If you are using the -001 or -050 DVKs they both have RS232 Transceivers on them. Both ends of an RS232 link must be configured - PC End - Usually flow control is turned off. Use Windows Device manager to set other parameters. Make sure no other PC application software has a hook on port. DVK end - Clock settings frequently source of problem. Make sure Transceiver power supply jumper is in place, if there is one. Cable, normal swapped cable, Rx to Tx and Tx to Rx. Both previously mentioned boards have UART examples you can run. Regards, Dana. |
|
|
|
|
|
你说的交换电缆是什么意思?
半双工不使用全双工电缆吗?? 如果是这样,我可以连接两条线TX-RX和RX - Tx。 以上来自于百度翻译 以下为原文 What do you mean swapped cable....... Half duplex does n.t work with the cable used for full- duplex?? And if that is thecase i can just connect with two wires Tx - Rx and rx - Tx |
|
|
|
|
|
半/全双工电缆使用相同的布线。
接线连接。 问候,Dana。 RS232电缆4.JPG 9.4 K 以上来自于百度翻译 以下为原文 Half/Full Duplex cable use the same wiring. Wiring attached. Regards, Dana.
|
|
|
|
|
|
你好,
请检查以下内容。 1。如果您使用CY8CKIT-00,那么检查UARTIS是否供电(J10跳线连接)并检查TX和RX管脚是否正确连接。 2。在工具箱上缩短UART TX和RX引脚,并验证传输的数据是回送的。 三。如果步骤2工作,那么可能会出现电缆问题。检查电缆的连续性,然后再试一次。 如果上面的事情不起作用,那么请附上您的项目,并提供工具包的细节。 当做, 阿那律 以上来自于百度翻译 以下为原文 Hi, Please check for the following. 1. If you are using CY8CKIT-001 then check if UART is powered ON (J10 jumper is connected) and check if TX and RX pins are connected properly 2. Short the UART Tx and RX pins on the kit and verify that the data that is transmitted is looped back 3. If step 2 works then there might be issue with the cable. Check for continuity on the cable and try again. If above things do not work, then please attach your project and provide the Kit details. Regards, Aniruddha |
|
|
|
|
|
嘿,我正在安装我的半双工项目,看看它们并复习一下。
告诉我代码够好了吗?行业认可吗?LOL 以上来自于百度翻译 以下为原文 Hey i am attaching my half duplex projects take a look at them and review Tell me is the code good enough .. does the industry approve it...lol |
|
|
|
|
|
我找不到我附上的照片。我再次依恋它
哦,我意识到只有ZIP文件可以附加 UART半双工码 509.2 K 以上来自于百度翻译 以下为原文 i couldnt find the projrct i attached.. i am attaching it again oh..i realise only zip files can be attached
|
|
|
|
|
|
任何人可以看看这个项目,并回答我可以发展自己…
如果你不想逮捕我,你可以在MigHaRialYaHo.Co公司给我寄邮件。 以上来自于百度翻译 以下为原文 Can anyone take a look at the project and reply where i can develop myself... if you dont want to embarass me you can mail me at microHari@yahoo.co.in |
|
|
|
|
|
在PSoC3和5中,我通常倾向于稍微不同的解决方案:
有宏CYSISRYPROTO(MYISR)来声明中断处理程序和 CysISR(MYISR)的定义。现在用API ISRSARTTEX(MYISR)启动中断。 这允许在我自己的文件(main .c)中保存MyyISR,因此我不必在国外(创建)文件中进行篡改。 特别是当我从PSoC5切换到PSoC3时,这意味着我必须重新插入我已经为第一个版本所做的修改。需要一些时间来发现一个bug,项目切换到另一个设备不再运行。啊! 您使用了数据表中给出的示例,老实说,我相信它们可以被改进。 给你一个“好”计划的标准:(工作)不是庞德,一个不工作的程序就像一块木头一样好,尽管后者燃烧时间更长。 你的老板会说什么?好节目很便宜 一个好的程序可以很容易地适应不同的需要。 好节目长 如何做到这一点?神奇的词是“可读性”。一个程序可以是红色的,越容易理解,它就可以更好地维护。这并不集中在评论(事实上,你改变了你的程序,但没有改变评论-一个通常的MIS行为我们的-。使用易于阅读的变量名,使用大写函数使用函数与说话的名字。 你有一个结构,当(某物){ } /等待某事时 你可以一边写(某事)一边写;(/)不需要注释。 看,可读性是什么?有一本书叫做“干净代码”,动手吧! 快乐编码 鲍勃 以上来自于百度翻译 以下为原文 I usually prefer a slightly different solution for interrupts in PSoC3 and 5: There are the macros CY_ISR_PROTO(MyISR) to declare an interrupt handler and CY_ISR(MyISR) for the definition. The interrupt is started now with the API ISR_StartEx(MyISR). This allows keeping theMyISR in one of my own files (main.c) and so I do not have to mangle in foreign (created) files. Especially when I switch from PSoC5 to PSoC3 this would mean I have to re-insert the modifications I already did for the first version. Takes some time to find a bug, project after switching to a different device doesn't run any more.... arghhh! You used the examples given in the datasheet and to be honest I am sure they can be improved. To give you some criteria for a "Good" program: ("Working" is NO pont, a not-working program is as good as a piece of wood, although the latter burns longer) What would your boss say? A good program is cheap A good program can easily be adapted to different needs A good program lives long How to accomplish that? The magic word is "Readability". The better a program can be red, the easier it is understood, the better it can be mainained. This does not focus at the comments (in fact you changed your program, but did not change the comment - a usual mis-behaveour- . Use easy-to-read variable names, use capitals use functions use functions with talking names. You have a construct as while(SomeThing){} // Wait for SomeThing You may write while(SomeThing) Wait(); // No comment needed See, what readability is? There's a book named "Clean Code", get hands on it! Happy coding Bob |
|
|
|
|
|
谢谢你的评论…我会努力改进…
代码是不可读的,我知道……以及实现半双工通信的逻辑是好的还是应该以不同的方式实现。 提前感谢 以上来自于百度翻译 以下为原文 Thanks for the comments...i will try to improve .... the code is not readable, i know ......and what about the logic of implementing halfduplex communication is it good enough or should it have been implemented in diffrent manner.... Thanks in advance |
|
|
|
|
|
我不在的位置,老师给你的程序的等级。我认为你是衡量标准。
一个问题可以用几个不同的方式程序解决。哪条路更好?我喜欢的可读性,别人的速度,一些小的代码等。 你要看看你的程序自己,从头开始,看看cpoyrights。这是你的节目?那么为什么柏树有版权呢?因为您没有更改该文本。 从那里开始,什么是你的计划做,你什么时候写的,和你是谁和谁的权利。 这是更重要的比improveany逻辑内的项目。 鲍勃 以上来自于百度翻译 以下为原文 I'm not in the position of a teacher giving you the grades for your program. I think you are the measure. A problem can be solved with a program in several different ways. Which way is better? I prefer readability, others speed, some small code and so on. You will have to look at your program yourself, start at the beginning, look at the cpoyrights. This is your program? So why is it copyrighted by Cypress? Because you did not change that text. Start there, what does YOUR program do, when did you write it, and who are you and to whom belongs the rights. THAT is quite more essential than to improve any logic within that project. Bob |
|
|
|
|
|
只是一个一般的评论,你能阅读和理解你写了6个月的内容吗?
项目完成后?如果你不能,很好的机会没有其他人可以 困难重重。 经验法则,对于您编写的每个代码命令字符,您在5中编写了 你为什么发布命令?没有好的标准 代码化,查看Web上的示例。 问候,Dana。 以上来自于百度翻译 以下为原文 Just a general comment, can you read and understand what you wrote 6 months after completion of a project ? If you cannot, good chance nobody else can w/o great difficulty. Rule of thumb, for every code command character you write, did you write 5 in the comments of why you issued the command ? There is no magic standard for good code-i-fying, Look at examples on the web. Regards, Dana. |
|
|
|
|
|
@ Dana
令人惊讶的是(至少对我来说)《干净代码》中的一句话是不使用评论。 作者给出了两个原因: 第一、当您在30%的情况下更改程序时,忘记更改注释,导致程序真正执行的和评论所说的不匹配。 第二。你可以用不需要注释的方式编写程序,这样你就可以省略它们。(用WAITE()函数查看我的帖子 我不认为绝对的限制是“Noice”,但我自己的(坏的)经验1是一个可重复的事实。因为我喜欢用书面形式表达自己(正如你从我的长篇文章中所认识到的),第二点对我来说并没有任何困难。 鲍勃 以上来自于百度翻译 以下为原文 @Dana Surprisingly (at least for me) one of the statements in the book "Clean Code" was not to use comments. The author gave two reasons for that: 1st. When you change the program in 30% of all cases you forget to change the comment, resulting in a mismatch between what the program really does and what the comment says. 2nd. You can write your programs in a way that no comment is needed, so you can ommit them. (Have a look at my post with the "Wait()"-function) I dislike most absolute restrictions as "NO Comments" but with my own (bad) experiences number 1 is a remarable fact. Since I like to express myself in written form (as you may recognise from my lengthy posts) the second point does not induce any difficulties for me. Bob |
|
|
|
|
只有小组成员才能发言,加入小组>>
788个成员聚集在这个小组
加入小组cyUSB3014一直显示2.1,不能到3.0情况,谁遇到过
7478 浏览 0 评论
2492 浏览 1 评论
2184 浏览 1 评论
4046 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
2095 浏览 6 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
7955浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
6531浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
760浏览 2评论
736浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
8380浏览 2评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-18 01:23 , Processed in 0.933204 second(s), Total 106, Slave 86 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
1685