完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
你好,
我使用spartan3E板,ISE 8.2i和matlab 2010a。 我正在通过rs-232设置FPGA和Matlab之间的通信。 我写了一个vhdl程序,它应该获取8位数据并将它们传输到matlab(Simulink-Real time Windows Target模块集),但是我在matlab中获得的数据与我通过rs-232的TDX通道从FPGA发送的数据不匹配。 任何建议? 我尝试根据电路板上的50 MHz时钟制作一个时钟分频器,使数据速率达到9600波特,但我觉得它比这更复杂。 另外,我在论坛上看到我需要使用UART,也许这是我的解决方案?也许还有其他什么? 谢谢你的帮助。 以上来自于谷歌翻译 以下为原文 Hello,I work with spartan3E board, ISE 8.2i and Matlab 2010a.I'm trying to set communication between FPGA and Matlab through rs-232. I wrote a vhdl program that should take 8 bits of data and transmit them to the matlab (Simulink-Real Time Windows Target blockset), but data that I get in matlab doesn't match to data that I send from FPGA through TDX channel of rs-232. Any advice? I tried making a clock divider based on the 50 MHz clock on the board to bring the data rate to 9600 baud, but I have a feeling it's more complicated than that. Also, I have seen in Forum that I need to use UART, maybe this is my solution? maybe something else? Thanks for your help. |
|
相关推荐
5个回答
|
|
这是一个定制的电路板设计,还是您使用的是特定的开发板?
如果你要描述Spartan 3E和运行Matlab的PC之间的信号连接和接口,它将对我们有所帮助。 - 鲍勃埃尔金德 签名:新手的自述文件在这里:http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369总结:1。 阅读手册或用户指南。 你读过手册了吗? 你能找到手册吗?2。 搜索论坛(并搜索网页)以寻找类似的主题。 不要在多个论坛上发布相同的问题。 不要在别人的主题上发布新主题或问题,开始新的主题!5。 学生:复制代码与学习设计不同.6“它不起作用”不是一个可以回答的问题。 提供有用的详细信息(请与网页,数据表链接).7。 您的代码中的评论不需要支付额外费用。 我没有支付论坛帖子的费用。 如果我写一篇好文章,那么我一无所获。 以上来自于谷歌翻译 以下为原文 Is this a custom board design, or are you using a particular development board? It would help us if you would describe the signal connections and interfaces between the Spartan 3E and the PC which is running Matlab. - Bob Elkind SIGNATURE: README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369 Summary: 1. Read the manual or user guide. Have you read the manual? Can you find the manual? 2. Search the forums (and search the web) for similar topics. 3. Do not post the same question on multiple forums. 4. Do not post a new topic or question on someone else's thread, start a new thread! 5. Students: Copying code is not the same as learning to design. 6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please). 7. You are not charged extra fees for comments in your code. 8. I am not paid for forum posts. If I write a good post, then I have been good for nothing. |
|
|
|
我正在使用特定的开发板。
vhdl中的信号(std_logic)代码连接到引脚M14(rs-232_DCE_TXD),并且我使用标准-232 9针串行电缆(我打开电缆并检查有9根电线)用于连接我的com1端口 PC。 在那之后,我发送速率为9600的逻辑“1”或“0”(我将50Mhz时钟转移),我希望借助Simulink中的“数据包输入”块来帮助它(按照我发送它的确切顺序)(RT Windows 目标块集),其中将板线作为“标准串口设备”,用, Boud rate:9600数据位:8奇偶校验:无停止位:1 “数据包输入”:采样时间:0.0001或0.001输入数据包大小:1Blockoutput数据类型:'int8' 所有我想要的(作为第一步:))是在我发送的数据的simulink scopeplot上看到的。 我不知道为什么,但是我认为错误的数据,可能是什么问题? 非常感谢你! 以上来自于谷歌翻译 以下为原文 I'm using a particular development board. The signal (std_logic) in vhdl code connected to pin M14 (rs-232_DCE_TXD), and I'm using standart rs-232 9-pin serial cable (I've opened the cable and checked that there are 9 wires) for connection with com1 port on my PC. After that I send logical "1" or "0" with rate 9600 (I diveded the 50Mhz clock ) and I want to recive it (in exact order that i send it) with help of "Packet Input" block in Simulink (RT Windows Target blockset), where I difined the board line as a "standart serial port device" with, Boud rate: 9600 Data bits: 8 Parity: none Stop bits: 1 "Packet input": Sample time: 0.0001 or 0.001 Input packet size: 1 Block output data types: 'int8' All that I want (as the first step:) ) is to see on the simulink scope plot of data that I send. I don't know why, but the data that I recive is wrong, what can be a problem? thank you very much! |
|
|
|
我正在使用特定的开发板。
当您确定使用哪个特定开发板时,也许您可以查看该板附带的参考设计代码。 这应该给你一个如何通过串行接口传输格式数据的例子。 一般来说,您有两个问题需要解决: 1.如何以串行UART格式对数据进行格式化和计时,以便PC接收器按您的意图解释您的数据。 这被称为接口设计的“物理层”或“低层”。 2.要发送到Matlab程序(或simulink)的数据。 您需要了解并适应Simulink的更高级协议。 你需要说Simulink的“语言”,可以这么说。 - 鲍勃埃尔金德 签名:新手的自述文件在这里:http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369总结:1。 阅读手册或用户指南。 你读过手册了吗? 你能找到手册吗?2。 搜索论坛(并搜索网页)以寻找类似的主题。 不要在多个论坛上发布相同的问题。 不要在别人的主题上发布新主题或问题,开始新的主题!5。 学生:复制代码与学习设计不同.6“它不起作用”不是一个可以回答的问题。 提供有用的详细信息(请与网页,数据表链接).7。 您的代码中的评论不需要支付额外费用。 我没有支付论坛帖子的费用。 如果我写一篇好文章,那么我一无所获。 以上来自于谷歌翻译 以下为原文 I'm using a particular development board.When you figure out which particular development board you are using, perhaps you can check out the reference design code which comes with the board. This should give you an example of how format data fro transmission via serial interface. Generally speaking, you have two problems to address: 1. How to format and time your data in serial UART form so that the PC receiver interprets your data as you intend. This is called the "physical layer" or "low layer" of interface design. 2. What data to send to the Matlab program (or simulink). You need to understand and accommodate Simulink's higher level protocol. You need to speak Simulink's "language", so to speak. - Bob Elkind SIGNATURE: README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369 Summary: 1. Read the manual or user guide. Have you read the manual? Can you find the manual? 2. Search the forums (and search the web) for similar topics. 3. Do not post the same question on multiple forums. 4. Do not post a new topic or question on someone else's thread, start a new thread! 5. Students: Copying code is not the same as learning to design. 6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please). 7. You are not charged extra fees for comments in your code. 8. I am not paid for forum posts. If I write a good post, then I have been good for nothing. |
|
|
|
嗨,
RS232连接上的数据使用特殊格式。 在你的情况下(8N1)由一个起始位8位数据和(至少)一个停止位组成。 一个简单的UART(可以作为picoblaze核心(KCPSM3.zip)的一部分)帮助您格式化数据。 它配备了BAUD速率发生器,可以使用泛型进行参数化。 (参见内核附带的pdf) 一旦在设计中使用了这些,就可以简单地将字节写入UART,并将它们自动发送到PC。 由于您处于测试阶段,因此您可以使用一个很好的示例应用程序(实时时钟)来测试RS232连接。 需要在主机上安装一个简单的终端(例如WIN $上的超级终端)来设置和读取时钟。 此外,您不需要使用picoblaze。 UART独立工作。 有一个很好的综合 Eilert 以上来自于谷歌翻译 以下为原文 Hi, the data over a RS232 conection uses a special format. In your case (8N1) consisting of one start bit 8 bits of data and (at least) one stop bit. A simple UART (can be found as part of the picoblaze core (KCPSM3.zip)) helps you with formating the data. It comes with a BAUD rate generator that can be parametrized with Generics. (See the pdfs that come with the cores) Once you have these in your design, you can simply write bytes to the UART and they are sent automatically to the PC. Since you are in the testing phase, there is a nice example application (real time clock) that you can use to test your RS232 connection. Needs just a simple Terminal (e.g. hyperterm on WIN$) on your host computer to set and read the clock. Besides, you don't need to use the picoblaze. the UART works independently. Have a nice synthesis Eilert |
|
|
|
好的,我知道我需要使用UART来解决我的问题,我将开始阅读它。
感谢大家的帮助。 如果有人可以给我额外的解决问题的话,我会很开心。 以上来自于谷歌翻译 以下为原文 Ok, I am understand that I need use UART to solve my problem, I'll start to read about it. Thank you all for your help. If somebody can give me additional ways to solve my problem I"ll be happy to listen about it. |
|
|
|
只有小组成员才能发言,加入小组>>
2388 浏览 7 评论
2804 浏览 4 评论
Spartan 3-AN时钟和VHDL让ISE合成时出现错误该怎么办?
2270 浏览 9 评论
3338 浏览 0 评论
如何在RTL或xilinx spartan fpga的约束文件中插入1.56ns延迟缓冲区?
2440 浏览 15 评论
有输入,但是LVDS_25的FPGA内部接收不到数据,为什么?
768浏览 1评论
请问vc707的电源线是如何连接的,我这边可能出现了缺失元件的情况导致无法供电
551浏览 1评论
求一块XILINX开发板KC705,VC707,KC105和KCU1500
386浏览 1评论
1975浏览 0评论
692浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-29 18:02 , Processed in 1.512932 second(s), Total 86, Slave 70 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号