完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
嗨,所有的,我试图控制方向的马达向前或BouWald,我发出信号,通过使用DACOF电位器。我正在研究CY8CY4C6464-24SXI。
如果有人能帮助我找出如何控制这将是伟大的。 谢谢 以上来自于百度翻译 以下为原文 HI all, i am trying to control the direction of the motor forward or bacward, i am giving out signal, by using DAC from Potentiometer. i am working on KIT number CY8C29466-24 SXI. If anyone can help me to figure out how to control that would be great. Thanks |
|
相关推荐
50个回答
|
|
|
嗨,鲍伯,我用了你发给我的东西,把它用在我的代码里,但我仍然遗漏了什么东西。
所以你可以理解我在这个项目中所做的事情。我使用CY8C946624SXI来控制一个电机单元。我试图通过将电位器连接到输入端口0-7,以及端口0到5的输出速度来控制电机的速度。 通过SWITCH运行/停止连接到PORT0-1,并将CW/CW(方向)控制到PORT-0。 我试图能够改变速度,而马达正在运行,或在它不运行。并朝着正确的方向前进。 我附上了这个项目,你能看一下,看看我错过了什么。 谢谢 车轮快速固定装置 479.2 K 以上来自于百度翻译 以下为原文 Hi Bob, i used what you sent me and used it in my code but still i am missing something. so you can understand what i am trying to do in this project. I am using CY8C29466-24 SXI to control a motor unit. i am trying to control the speed of the motor by connecting the potentiometer to input PORT 0-7, and the output speed on PORT 0-5. Controlling it by swtiches RUN/STOP connected to PORT 0-1 , and CW/CCW ( direction ) to PORT 0-0. i am trying to be able to change speed while motor is running or while its not running. and by the right direction. I attached the project, can you take a look at it and see what am i missing in it. Thanks
|
|
|
|
|
|
嗨,鲍伯,
当我更改开关时,你发送给我的修改代码不起作用,一旦转到Run和CW或CW方向之一,它就会被卡住。我不确定我是否错过了什么。 谢谢 以上来自于百度翻译 以下为原文 Hi Bob, the modified code that you sent me is not function when i change the switches, once it goes to RUN and one of the direction CW or CCW, it gets stuck. i am not sure if i am missing something. Thanks |
|
|
|
|
|
查看你的文件并用***来留言
鲍勃 轮辐固定器 180.1 K 以上来自于百度翻译 以下为原文 Looked over your file and left comments with **** Bob
|
|
|
|
|
|
您正在使用变量“IDATA”作为循环控件,并且在循环中给它分配一个值,因此循环永远不会正确终止。
另一方面,我怀疑你正把你的马达直接连接到PSoC的DAC输出,它会立即摧毁它。! 控制电机通常是用PWM来完成的,PWM具有不同的占空比的数字输出以控制速度。虽然PSoC能够驱动几毫安来驱动一个(非常)小的电机,但是由于运行的电机将产生(如发电机)的电压比允许的5V高,因此立即将保护电路立即吹入引脚,所以不能将电机直接连接到它。 在继续您的PSoC编程之前,试着做一个示意图并在这里张贴,我们将看看它。 鲍勃 以上来自于百度翻译 以下为原文 You are using the variable "iData" as the loop-control and you are assignig a value to it within the loop, thus the loop will never terminate correctly. On the other hand I suspect that you are connecting your motor directly to the DAC output of the PSoC which will destroy it immediately!! Controlling a motor is usually done with a PWM which has a digital output with a varying duty-cycle to control the speed. Although the PSoC is able to drive a few mA to drive a (very) small motor you may NOT connect the motor directly to it because the running motor will create (like a dynamo) voltages that are grater than the allowed 5V and so blowing immediately the protection circuits at the pins. Before continuing with the programming of your PSoC try to make a schematic and post it here, we'll have a look at it. Bob |
|
|
|
|
|
在MyMeMOTROR函数中,它永远不会从循环中出来。
以上来自于百度翻译 以下为原文 it never comes out from for loop in the MoveMotor function |
|
|
|
|
|
我修理它,它与CW/CW一起工作,但是一旦我切换到停止,它停止马达,但不去我的其他功能。
车轮快速固定装置 478.7 K 以上来自于百度翻译 以下为原文 i fixed it, and it works with CW/CCW but once i switch to STOP, it stops the motor but doesnt go to my else function.
|
|
|
|
|
|
如果它是有用的,我将使用它,因为在完成之后,我必须捕获时间输入并将其与输出捕获PRT进行比较。
但是我怎么用呢?因为我必须使用DAC9(IDATA)手动使用电位器来改变输入。 以上来自于百度翻译 以下为原文 if it will be helpful i will use it, because after i am done with that, i have to capture the time input and compare it to the output capture PRT. But how i use it ? because i have to vary the input manually using the potentiometer using DAC9 (iData) |
|
|
|
|
|
尝试替换DAC9AWORKSTARTALL(X);用DAC9X写盲(X);
如果启用中断,并且等待时间很长,WrestESTALL可能会出现一些问题。 以上来自于百度翻译 以下为原文 Try replacing DAC9_WriteStall(x); with DAC9_WriteBlind(x); WriteStall might have some problems if interrupts are enabled and the latency is high. |
|
|
|
|
|
这是更新的,停止条件仍然不正确。它应该是任何时候我切换到停止(!(电力和运行)应增加到钾肥价值。不恢复IDATA。
车轮快速固定装置 480.9 K 以上来自于百度翻译 以下为原文 thats the updated one, the STOP condition still not function right. it should be anytime i switch to stop (!(POWER&RUN)) should increase to the POT value. not resume the iData.
|
|
|
|
|
|
分钟,
正如最近有人说的:“我们可以告诉你如何捕鱼,但我们不会给你任何鱼。” 当程序停留在一个循环中时,尝试找出原因并相应地改变循环,我们这里没有硬件来测试所有的东西。正如我所看到的,你的编程技巧还没有完全开发出来,你需要更多的练习。我建议使用这个HTTP://Puxal.GbDist.C.UK/CyBooo/书来构造C的语法。 因为你和PSoC1一起工作,而你没有冰块(电路仿真器),所以很难找出出故障的原因。 PSoC3和PSoC5开发工具包配备了内置的调试功能(断点,监视变量等),以便使您的生活更容易,我建议: 给自己买一个冰块。昂贵,但它可以显示你的芯片上发生了什么。与一个CYC24466 DIP一起吊舱 或 买一个KIT-050(更便宜),并在那里开发/调试你的软件模块。这将额外教写硬件无关代码。当软件运行时,将源传递到目标PSoC。 鲍勃 以上来自于百度翻译 以下为原文 mins, as someone lately said:"We can show you how to catch fishi, but we will not give you any fish". When the program stays within a loop, try to find out why and alter the loop accordingly, we here do not have got the hardware you have got to test everything. As I could see, your programming skills are not yet fully developed, and you need a bit more practice. I would recommend for syntax of C using this http://publications.gbdirect.co.uk/c_book/ book. Since you are working with PSoC1 and you do not have got an ICE-Cube (In-Circuit-Emulator) it is very difficult to find out the reason if something goes wrong. The PSoC3 and PSoC5 developement kits are equipped with a built-in debugging-feature (breakpoints, watching variables etc.) so to make your life easier i would suggest: Buy yourself an ICE-Cube. Expensive, but it can show what goes on in your chip. Comes together with a pod for a CyC29466DIP or Buy a Kit-050 (cheaper) and develop / debug your software-modules there. That will teach additionally to write hardware-independant code. When the software runs, transfer the source to your target-PSoC. Bob |
|
|
|
|
|
这是我第三次在同一个地方做一些修改,你没有接受我给你的所有建议,你没有纠正计时器时钟和周期…你必须更精确一些。
看看这个。作为提示:代码中出现的两倍以上的内容通常是可以优化的。 看看这两个新宏。 鲍勃 车轮快速固定装置61.ZIP 179.5 K 以上来自于百度翻译 以下为原文 It is now the third time i make some corrections at the very same places, you did not take the all the advices I gave you, you did not correct the timer clock and period..... you must be a bit more precise. Take a look at this. As a hint: everything that occurs more than twice in the code is often something that can be optimized. And have a look at the two new macros. Bob
|
|
|
|
|
只有小组成员才能发言,加入小组>>
786个成员聚集在这个小组
加入小组cyUSB3014一直显示2.1,不能到3.0情况,谁遇到过
7102 浏览 0 评论
2477 浏览 1 评论
2166 浏览 1 评论
4031 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
2074 浏览 6 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
7585浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
6134浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
742浏览 2评论
710浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
7980浏览 2评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-3 08:20 , Processed in 1.472356 second(s), Total 95, Slave 77 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
2029