完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,我有一个问题,用PIC18F45来实现一个基本的USB例子。对于故障查找,我决定了一个类似PICDEM FS USB(DM163025)的基本电路板,这样我就可以从Microchip中加载一个预编译的HEX文件。去掉IDE、代码和编译器作为我的问题的原因。VUSB上没有电压,我期望大约3.3V。我假设PIC中的USB模块不起作用。我不确定从这里去哪里?Microchip:PIC18F45050-I/PCCOD:(N/A预编译。来自微芯片的HEX):(N/A预编译。来自微芯片的HEX)编译器:(N/A预编译。来自微芯片的HEX)HEX:(.Microchip解决方案 USB预编译demo USB设备-CDC -基本demo -C18 -PICDEM FS)USB -HID BooToad .HEX)-17 18年六月程序员:PICkit 2示意图:示意图。JPG硬件:StrubAdRAD20170702Y175835. JPG问题:没有来自设备的响应。VUSB引脚上没有电压。
以上来自于百度翻译 以下为原文 Hi, I have a problems implementing a basic USB example with the PIC18F4550. To fault find I decided to breadboard a basic circuit similar to the PICDEM FS USB (DM163025) so I could load one of the precompiled hex files from microchip. Removing the IDE, code and compiler as the cause of my issues. There appears to be no voltage on the VUSB, I would have expected about 3.3V. With that I'm assuming the USB module in the pic is not functioning. I'm not sure where to go from here? Any help would be much appreciated, Thanks. Summary: MCU: PIC18F4550-I/P Code: (N/A Precompiled .hex from microchip) IDE: (N/A Precompiled .hex from microchip) Compiler: (N/A Precompiled .hex from microchip) Hex: (.Microchip SolutionsUSB Precompiled DemosUSB Device - CDC - Basic Demo - C18 - PICDEM FSUSB - HID bootload.hex) - 18 June 2008 Programmer: PICkit 2 Schematic: Schematic.JPG Hardware: Breadboard_20170702_175835.jpg Problem: No response from device. No voltage on VUSB Pin. Attached Image(s) |
|
相关推荐
15个回答
|
|
电路板是坏*你要么错过了一个电容在VUSB或在VDD/VSS(不确定从您的照片…)
以上来自于百度翻译 以下为原文 breadboards are *bad* You're either missing a capacitor at VUSB or at VDD/VSS (not sure from your photo...) |
|
|
|
啊,是的,没错,那个是VUSB(我不记得在手)所以…让我们看看!(事实上,这些帽似乎是聚酯薄膜或聚,即不可能的22PF陶瓷……)
以上来自于百度翻译 以下为原文 Ah yep, true, that one is VUSB (I did not remember at a hand So... let'see! (indeed those caps seem to be mylar or poly i.e. unlikely 22pF ceramic...) |
|
|
|
帽看起来像MLC引线设备,我使用的旧项目和电路板。但我看不到电容器的电源引脚的电容器。如果我看不见,那就太远了。此外,它看起来像引脚1(MCLR -)连接到VDD通过一个上拉,但也在其他地方。很难看到,但它看起来像直接连接到VDD。
以上来自于百度翻译 以下为原文 The caps look like the MLC leaded devices that I use for older projects and breadboards. But I don't see a capacitor across the power supply pins of the PIC. If I can't see it, it's too far away. Also it looks like pin 1 (MCLR-) is connected to Vdd through a pull-up, but also somewhere else. Hard to see, but it looks like it connects directly to Vdd. |
|
|
|
看来它去一个ICSP端口给我。电路真的需要一个4.7uF帽横跨轨道和100N直接通过VDD/VSS引脚。VBUS上的盖子确实应该被修整。飞到地上可以用来将MCLR引脚短接地,以确保PIC实际复位。我怀疑它正在走这么远。
以上来自于百度翻译 以下为原文 Looks like it goes to an ICSP port to me. The circuit really needs a 4.7uf cap across the rails and a 100n directly across the Vdd/Vss pins. That cap on VBUS really should be trimmed down. A flying lead to ground can be used to short the MCLR pin to ground to ensure that the PIC actually resets properly. I doubt that it is getting this far. |
|
|
|
嗨,谢谢大家的帮助。微笑:我把皮卡2连接在这里,引脚1-5(请参阅图片)。我已经运行了一个闪烁的LED程序之前,所有这些,以证明我自己的振荡器和程序员工作。晶体电容器确实是22PF,我会得到更多的替代他们,因为我的小帽子无论如何。我不认为这可能是因为闪烁的LED程序工作(假设错误)?MCLR pin是通过一个电阻VDD和另一个(蓝色)线到PIXIT2UPDATE的PIN 1:-我把帽子放在VCC VDD引脚的MCU上,修剪下来的Vu***帽上放一个10uf帽子横过轨道(这个值足够近吗?)-决定再次测试电路闪烁的LED程序= & t;没有输出。-我用另一个4550代替MCU并应用闪光灯LED。HEX到新的MUC= & Gt;它工作。-使用XC8 V1.32和MPLAB IDE 3编译了一个示例(简化的自定义HID演示项目使用MLA V2013Y1212/ 20 /V2014Y07Y22)。(BTW谢谢你制作VLogi)。然后应用十六进制。使用外部电源供电。= V.USB上的0V。复位后的MCU以飞行引导到GND。=0V在VUSB上使用预编译(USB设备- CDC -基本演示-C18 -PDENM FSUB-HID BooToad,HEX)从微芯片。= V.USB上的0V。复位后的MCU以飞行引导到GND。在VubMy理解上,当VMCU的硬件初始化时,VUSB引脚将在3.3V。因此,不管USB是否能与PC通信,如果MCU上的硬件工作,不管时钟设置等(如果MCU没有被中断),仍然应该有3.3V。在这方面我是正确的吗?
以上来自于百度翻译 以下为原文 Hi, thanks for your help everyone. Smile: I'm connecting the PICkit 2 here pins 1-5 (please see image). I have run a flashing LED program before all this to prove to myself that the oscillator and programmer were working. The crystal capacitors are indeed 22pF, I'll get more to replace them as I'm out of small caps anyway. I don’t think it could be those though due to the flashing LED program working (faulty assumption?). The MCLR pin is to Vdd through a resistor and the other (blue) wire goes to pin 1 of the PICkit2 Update: -I put the caps in across the Vcc Vdd pins of the MCU, Trimmed down the cap on Vu*** put a 10uF cap across the rails (is the value close enough?) . -Decided to test the circuit again with the flashing led program => no output. -I replaced the MCU with another 4550 and applied the flashing LED .hex to the new MUC => It works. -Compiled an example (Simplified Custom HID Demo project using MLA v2013_12_ 20 / v2014_07_22) using xc8 v1.32 and mplab IDE 3.00. (btw thanks for making that vloki). Then applied the .hex . Powered using an external supply.. => 0V on Vu***. After resetting the MCU with a flying lead to GND. => 0V on Vu*** -Used the precompiled (USB Device - CDC - Basic Demo - C18 - PICDEM FSUSB - HID bootload.hex) from microchip. Powered using an external supply.. => 0V on Vu***. After resetting the MCU with a flying lead to GND. => 0V on Vu*** My understanding is that the Vu*** pin will be at 3.3V when the hardware on the MCU is initialized. So regardless of whether or not the USB can communicate with the PC there should still be 3.3V there if the hardware on the MCU is working, regardless of clock setting etc (provided the MCU isn't be caught in an interrupt). <= Am I correct in this ? |
|
|
|
|
|
|
|
你是如何应用十六进制的?MPLABX内的所有东西,还是出口十六进制?如果将RA2与VUSB断开会发生什么?可能是HEX与HID引导加载程序一起使用,不包括配置位。(我找不到)
以上来自于百度翻译 以下为原文 How did you apply the .hex. Everything from within MPLABX or did you export the hex? What happens if you disconnect RA2 from VUSB? May be this hex is for use with the HID-Bootloader and does not include the configuration bits. From which MLA version is it exactly? (I can not find it) |
|
|
|
我在文件夹中找到了文件:C:Microchip解决方案V2012-0822USB预编译DEMOS PICDEM FSUBMCHPUSB BooBoLabeLead认为您可能需要做到以下几点,从Read Me.txt:最好是建立项目而不是使用预编译的演示。或者尝试在父目录中的文件:USB设备-CDC-BASIC演示-C18-PcDEM FSUB.HEX
以上来自于百度翻译 以下为原文 I found the file in the folder: C:Microchip Solutions v2012-08-22USBPrecompiled DemosPICDEM FSUSBMCHPUSB Bootloadable I think you might need to do the following, from README.TXT: It may be better to build the project rather than use the precompiled demos. Or try the file in the parent directory: USB Device - CDC - Basic Demo - C18 - PICDEM FSUSB.hex |
|
|
|
我正在使用:(硬件:皮卡2)(软件:皮卡2 V2.61)删除RA2从+5V=&;Vu***上没有伏特。复位后=& gt;VUSB上没有电压。微芯片USB固件框架V2.2安装。C:微芯片解决方案 USB预编译demo。我还尝试了LPCFFSUB-HID-X-R2示例,遵从XC8V1.32和MPLAIDID3.00。用LPCFFSUB-HID-X-R2示例,我从Bug(项目名称)生产文件夹获得编译的.HEX。是的,我得到了LPCF-FSUB-HID-X-R2示例FR。OM在这里:HTTP:/PICFROUM.RIC32 3.COM/VIEW?PHP?F=46和t=103πp697,并对其进行加载。但仍然有同样的问题。我真的只是在一个例子上,可以让MCU上的USB硬件启动。你怀疑有故障的MCU吗?谢谢
以上来自于百度翻译 以下为原文 I'm using: (Hardware: PICkit 2) (Software: PICkit 2 v2.61) Removing RA2 from +5V => no volts on Vu***.. After reset => no volts on Vu***.. Microchip USB firmware framework v2.2 Installation.. C:Microchip SolutionsUSB Precompiled Demos. I have also tried the LPC_FSUSB-HID-X-r2 example, complied using xc8 v1.32 and mplab IDE 3.00. With the LPC_FSUSB-HID-X-r2 example I'm getting the compiled .hex from the build(projectname)production - folder. Yeah. I got the LPC_FSUSB-HID-X-r2 example from here: http://picforum.ric323.com/viewtopic.php?f=46&t=103#p697 And complied and loaded it. Still have the same issues though. I'm really just after an example that can get the USB hardware on the MCU to fire up. Would you suspect a faulty MCU? Thanks |
|
|
|
我有一个PICDEM FSUB板与PIC18F2550,它提供了3.39 VDC上的VUSB。但是,这是一个枚举为COM端口的设备(我用CDC演示程序编程)。我把它连接到我的PICTIT3上,并从工具上给它供电。所以在USB端口上什么都没有。我在VUSB上得到3.41 VDC。所以,我怀疑一个坏照片或一个坏连接。你直接测量针了吗?
以上来自于百度翻译 以下为原文 I have a PICdem FSUSB board with a PIC18F2550, and it provides 3.39 VDC on Vu***. But that is for a device that enumerates as a COM port (I have it programmed with the CDC demo). I connected it to my PICkit3 and powered it from the tool. so there is nothing on the USB port. I get 3.41 VDC on Vu***. So, I suspect a bad PIC or a bad connection somewhere. Did you measure directly on the pin? |
|
|
|
你从这个文件夹中得到十六进制?你不是从IDE中编程出来的吗?你使用PACTIT2编程软件吗?为什么?这些HEX文件可能会在IDE中使用,而不是与其他编程软件一起使用。这就是为什么我要问的是:如果需要在MPLABX以外的编程,就必须使用来自/DIST/FIX的十六进制(参见:http://MyCHIPCDeave/COM/TLS0101:创建A-生产-Hi-Fi)。LE或简单地使用“出口十六进制”从项目菜单!
以上来自于百度翻译 以下为原文 You got the hex from this folder? Don't you program the PIC right from the IDE? Do you use PICkit2 programming software? WHY? Those hex files possibly will work if they are used with the IDE but not with other programming software. This is why I asked above: IF there is a need for programming outside MPLABX you have to use the hex from the /dist/ folder (see: http://microchipdeveloper.com/tls0101:creating-a-production-hex-file ) Or simply use the "Export Hex" from the project menu! |
|
|
|
没有遗憾的是:LPCFIX-HIDS-X-R2SRCLPCY-FSUB-HIDX.X.DISTPDFSUBBY450XXC8MPLAIDE是新的,并且不确定它是多么可靠,从IDE中燃烧/编程。我有使用PICTIT2烧录/编程的经验,并且没有使用其他软件/s创建的HEX的问题。直到知道代码已经编译成.HEX文件后,它才是要写入MCU的数据。是否存在与燃烧器/程序员和MPLABS/*编译器*.HEX文件的兼容性问题?是的,它是/文件夹/文件夹。检查一个我用的一个出口,他们是相同的大小。是的,在针上。(也用不同的DMM检查)我已经订购了另外4550个和盖帽,需要几天时间才能到达。我也在考虑移动到电线/焊锡而不是面包板来去除连接作为一个问题。
以上来自于百度翻译 以下为原文 No sorry it was: LPC_FSUSB-HID-X-r2srcLPC_FSUSB-HID-X.XdistPDFSUSB_4550_XC8production I'm quite new to the MPLAB IDE and was unsure of how reliable it was, burning/programming from within the IDE. I have experience burning/programming with PICkit2 and have had no issues using .hex created by other software/s. As far a knew once the code had been compiled into the .hex file it is just data to be written to the MCU. Are there compatibility issues with burner/programmers and MPLABs/*compiler* .hex files? Yeah, it was the /dist/ folder. Checked the one I was using against one exported and they were the same size. Yeah, right on the pin. (checked with a different DMM too) I've ordered another 4550 and caps, should take a few days to arrive. Also I'm thinking about moving to wire/solder instead of breadboard to remove connections as an issue. |
|
|
|
如果您继续使用MPLAB-X并进行调试模式,您会有错误吗?(在项目配置和菜单调试-调试项目中选择CIPIT2)
以上来自于百度翻译 以下为原文 If you stay with MPLAB-X and go for debug mode, do you get any errors? (Select PICkit2 in the project configuration and menu Debug -Debug Project) |
|
|
|
我把MCU换成了新的。在VUSB上应用了外部5V=和3.4V。从PC中插入USB电缆。奇怪的是,旧的MCU是半功能的,只是USB硬件不工作。非常感谢大家的帮助。
以上来自于百度翻译 以下为原文 I replaced the MCU with the new one. Applied external 5v => 3.4V on Vu***. Plugged in the USB cable from the PC. Success the PC recognizes the device! Strange because the old MCU is like half functioning, just the USB hardware on it doesn't work. Thanks so much for your help everyone. |
|
|
|
我认为VUSB输出有点敏感,可能在电源上有一个大电容会在电源断电时造成损坏。
以上来自于百度翻译 以下为原文 I think the Vu*** output is somewhat sensitive, and perhaps having a large capacitor on it may cause damage when the supply is powered down. |
|
|
|
只有小组成员才能发言,加入小组>>
5569 浏览 9 评论
2215 浏览 8 评论
2106 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3387 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2422 浏览 5 评论
1055浏览 1评论
889浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
907浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
934浏览 0评论
我是Microchip 的代理商,有PIC16F1829T-I/SS 威廉希尔官方网站 问题可以咨询我,微信:A-chip-Ti
639浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-7-9 00:31 , Processed in 1.599965 second(s), Total 102, Slave 86 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191