完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
你好,我希望我的项目从我的板发送到PIN A系列1或0位,这意味着我将得到
再一次,我不想使用WaveDac,我想手动发送1或0的信号。 以上来自于百度翻译 以下为原文 hello I want for my project to send from my board to out pin a serios of bits 1 or 0 meaning the i will get and again i dont want to use wavedac i want to send signals of 1 or 0 manually |
|
相关推荐
7个回答
|
|
|
我需要更多一点的信息你想通过开关或有脉冲出现在代码的某个地方。还什么电压等级的你需要什么,PRF和什么优先级。如果你只是需要脉冲针上你能做的,只是从软件。.
以上来自于百度翻译 以下为原文 I need a little more information do you want this done by switches or just have the pulses appear some place in the code. Also what voltage levels do you need and what PRF and what PRI. If you just need pules on a pin you can do that just from software. . |
|
|
|
|
蔡R2016 发表于 2018-10-3 13:53 无需任何额外的信息,就好像你有很多选择来做这个。 你可以写一个函数在软件写出来的1和0手动一词,移了位手动用pin_write()。这看起来有点像: 空SDENBY字节(UIT88T OUT字节){ UIT88T I,OutBIT; Pin写入(0);/ /确保信号从0开始 对于(i=0,i&lt;8,i++){ OutnBIT =(OutthByth&Gt;G.I)和0x01; Pin写入(OutNoBIT);/ /将位放到输出引脚上 CyDelay(5);/位时间5ms } Pin写入(0);/ /返回行到0 } 你也可以使用转移登记shift_out组件和连接到输出引脚,将移了位上销在时钟连接到组件的速度。这将让硬件移位处理字节。 以上来自于百度翻译 以下为原文 Without knowing any additional information, it seems like you have a number of options to do this. You could write a function in software to write out 1s and 0s from a word manually, shifting out the bits manually by using Pin_Write(). That could look something like: void Send_Byte(uint8_t out_byte){ uint8_t i, out_bit; pin_write(0); //ensure signal starts at 0 for (i=0,i<8,i++){ out_bit = (out_byte >> i) & 0x01; pin_write(out_bit); //Put bit onto the output pin CyDelay(5); //bit time 5mS } pin_write(0); //return line to 0} You could also use a Shift Register component and connect shift_out to the output pin, which will shift out the bits onto the pin at the speed of the clock connected to the component. This would let the hardware shift handle the byte. |
|
|
|
|
wrsffwrss 发表于 2018-10-3 14:02 是的但我们不知道他是想去的最终结果。 以上来自于百度翻译 以下为原文 yes but we have no ideal what he is trying to do to get to the end result. |
|
|
|
|
蔡R2016 发表于 2018-10-3 13:53 这正是我想做的!!!!看靶子 以上来自于百度翻译 以下为原文 ye that is exactly what i want to do!!! to see pules on scope |
|
|
|
|
|
空SDENBY字节(UIT88T OUT字节){UIT88T T I,Outnbit;Pin写入(0);//确保信号从0开始(i=0,i & lt;8,i++){OutnBIT=(OutthByth&G&G.I;)和0x01;Pin写入(Outnbit);/ /将位放置到输出引脚CyDelay(5);/ /位时间5MS}Pin写入(0);/ /返回行到0 }此代码将如果你想做的就是在范围内画一个脉冲。 以上来自于百度翻译 以下为原文
|
|
|
|
|
|
值得注意的是,如果你真的想发送数据并在另一端读到一些东西(不只是看到一个作用域上的位),那么使用一个实际的UART或I2C可能会更好。
在我发布的代码中,另一端的接收器无法区分0V空闲信号与字节的前导零之间的差异。你需要某种类型的启动比特来告诉接收器传输开始了。UART将自动处理开始/停止位。 以上来自于百度翻译 以下为原文 Worth noting though, if you actually want to send data and have something read it on the other end (not just see the bits on a scope) you would probably be better off using an actual UART or I2C. With the code I posted, there's no way for a receiver on the other end to tell the difference between the 0V idle signal and the a leading zero of a byte. You would need a start bit of some kind to tell the receiver that a transmission is starting. A UART would handle start/stop bits automatically |
|
|
|
|
wrsffwrss 发表于 2018-10-3 14:53 好的,谢谢大家的帮助。 以上来自于百度翻译 以下为原文 ok thank you all for the help |
|
|
|
|
只有小组成员才能发言,加入小组>>
787个成员聚集在这个小组
加入小组cyUSB3014一直显示2.1,不能到3.0情况,谁遇到过
7315 浏览 0 评论
2484 浏览 1 评论
2178 浏览 1 评论
4042 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
2087 浏览 6 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
7802浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
6363浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
757浏览 2评论
729浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
8208浏览 2评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-12 03:40 , Processed in 1.212085 second(s), Total 86, Slave 69 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
2914