完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,我修改了“USB设备HydSuth固件Exp16PoPIC24FJ64 GBB44PIP.x”,对于PIC24FJGBB2,当试图通过USB快速连接MCU时,我得到了“未知设备”的错误。MPLAB驱动程序用于Windows已经安装Windows 7并用于PIC18F2550。我有10UF TANTALCAP FAVUSB引脚(23),并连接到GND。Vbus pin是不连接的。不使用USB VCC和GND PINSI只使用+,D-我配置寄存器如下:我尝试MCU与LED闪烁的周期为200毫秒,秒。成功地编程和工作。我使用8MHz晶体,期望得到32 MHz振荡器FRQ使用16MHz进行正常操作,但我没有实现使它通过USB连接到PC,可能会产生什么问题?谢谢帮助
以上来自于百度翻译 以下为原文 Hi, I modified "u***devicehid_customfirmwareexp16_pic24fj64gb004_pim.x" for PIC24FJGB002 and I am getting "unknown device" error when trying to connect MCU via USB Fast Speed. MPLAB driver for windows already installed on Windows 7 and used to work for PIC18F2550. I have 10uF tantal cap for Vu*** pin (23) and connected to GND. Vbus pin is unconnected I don't use USB Vcc and GND pins I only use D+,D- My config registers as follows: /** CONFIGURATION Bits **********************************************/ // CONFIG4 #pragma config DSWDTPS = DSWDTPS3 // DSWDT Postscale Select (1:128 (132 ms)) #pragma config DSWDTOSC = LPRC // Deep Sleep Watchdog Timer Oscillator Select (DSWDT uses Low Power RC Oscillator (LPRC)) #pragma config RTCOSC = SOSC // RTCC Reference Oscillator Select (RTCC uses Secondary Oscillator (SOSC)) #pragma config DSBOREN = OFF // Deep Sleep BOR Enable bit (BOR disabled in Deep Sleep) #pragma config DSWDTEN = OFF // Deep Sleep Watchdog Timer (DSWDT disabled) // CONFIG3 #pragma config WPFP = WPFP0 // Write Protection Flash Page Segment Boundary (Page 0 (0x0)) #pragma config SOSCSEL = SOSC // Secondary Oscillator Pin Mode Select (SOSC pins in Default (high drive-strength) Oscillator Mode) #pragma config WUTSEL = LEG // Voltage Regulator Wake-up Time Select (Default regulator start-up time used) #pragma config WPDIS = WPDIS // Segment Write Protection Disable (Segmented code protection disabled) #pragma config WPCFG = WPCFGDIS // Write Protect Configuration Page Select (Last page and Flash Configuration words are unprotected) #pragma config WPEND = WPENDMEM // Segment Write Protection End Page Select (Write Protect from WPFP to the last page of memory) // CONFIG2 #pragma config POSCMOD = HS // Primary Oscillator Select (HS Oscillator mode selected) #pragma config I2C1SEL = PRI // I2C1 Pin Select bit (Use default SCL1/SDA1 pins for I2C1 ) #pragma config IOL1WAY = OFF // IOLOCK One-Way Set Enable (The IOLOCK bit can be set and cleared using the unlock sequence) #pragma config OSCIOFNC = ON // OSCO Pin Configuration (OSCO pin functions as port I/O (RA3)) #pragma config FCKSM = CSDCMD // Clock Switching and Fail-Safe Clock Monitor (Sw Disabled, Mon Disabled) #pragma config FNOSC = PRIPLL // Initial Oscillator Select (Primary Oscillator with PLL module (XTPLL, HSPLL, ECPLL)) #pragma config PLL96MHZ = ON // 96MHz PLL Startup Select (96 MHz PLL Startup is enabled automatically on start-up) #pragma config PLLDIV = DIV2 // USB 96 MHz PLL Prescaler Select (Oscillator input divided by 2 (8 MHz input)) #pragma config IESO = OFF // Internal External Switchover (IESO mode (Two-Speed Start-up) disabled) // CONFIG1 #pragma config WDTPS = PS1 // Watchdog Timer Postscaler (1:1) #pragma config FWPSA = PR32 // WDT Prescaler (Prescaler ratio of 1:32) #pragma config WINDIS = OFF // Windowed WDT (Standard Watchdog Timer enabled,(Windowed-mode is disabled)) #pragma config FWDTEN = OFF // Watchdog Timer (Watchdog Timer is disabled) #pragma config ICS = PGx1 // Emulator Pin Placement Select bits (Emulator functions are shared with PGEC1/PGED1) #pragma config GWRP = OFF // General Segment Write Protect (Writes to program memory are allowed) #pragma config GCP = OFF // General Segment Code Protect (Code protection is disabled) #pragma config JTAGEN = OFF // JTAG Port Enable (JTAG port is disabled) #define _XTAL_FREQ 48000000 /********************************************************************* I tried MCU with LED blinking with period of 200ms, successfully programmed and worked. I use 8MHz Crystal and I expect to get 32MHz Oscillator freq to use 16MHz for normal operations But I did not achieve to get it connected via USB to PC, what may cause such problem? Please help Thank you Regards |
|
相关推荐
3个回答
|
|
嗨,你有自己的棋盘吗?你知道USB协议吗?你使用哪种USB固件:MLA?MCC图书馆?你能展示一下你的原理图吗?我想也许USB堆栈正在检查VBUS,所以如果你不连接它,它就不会开始枚举…..定义xTalthFrq 48000000==& gt;不正确……阅读编译器手册大概应该是16000000(如果你的FoCC是32000000)。
以上来自于百度翻译 以下为原文 Hi, Do you have your own board ? Do you know the USB protocole ? Which USB firmware do you use : MLA ? MCC library ? Can you show your schematic ? I think maybe the USB stack is checking Vbus so if you don't connect it it will not start enumeration... #define _XTAL_FREQ 48000000 ==> not correct...read the compiler manual probably should be 16000000 (if your Fosc is 32000000). Regards |
|
|
|
|
|
|
|
这与你的实际问题无关,但考虑在未来使用陶瓷多层电容器代替钽。如今,在这些值中的陶瓷帽是小的、便宜的,并且由于其在要求的频率范围内的ESR较低而很好地去耦。确保使用至少10V或16V的部分,虽然3.3V的使用。/ Ruben
以上来自于百度翻译 以下为原文 This has nothing to do with your actual problem but consider to use a ceramic multilayer capacitor instead of the tantalum in the future. Today ceramic caps in those values are small, cheap and excellent for decoupling because of their low ESR over the required frequency range. Make sure to use at least a 10V or 16V part for 3.3V usage though. /Ruben |
|
|
|
只有小组成员才能发言,加入小组>>
5234 浏览 9 评论
2026 浏览 8 评论
1950 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3201 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2253 浏览 5 评论
771浏览 1评论
659浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
588浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
670浏览 0评论
571浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-20 16:49 , Processed in 1.221281 second(s), Total 83, Slave 66 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号