Yea I checked that, power is getting to the pins and MCLR is pulled high
Yea I checked that, power is getting to the pins and MCLR is pulled high
The pull-up resistor I am using is 6K and I do have a capacitor over the power pins.
I have gotten it to work by accident when it was programmed for an internal oscillator but the crystal and capacitors were still hooked up from when I was trying an external mode. It started working when I touched one of the capacitors off the crystal, I put it on the scope and the timing was right. It was like the extra capacitance kicked it off or something? Only sometimes this works and it doesn’t work when I set it to external mode. It makes me think it is a configuration problem but I’ve tried everything I can think of
this could be a breadboard problem. In many occasion it's extra capacitance may screw up things. Higher your crystal value is, worst it is. The trick is to keep every pins short (crystal and capacitors) and be able to mount them directly.
Here's a setup for a 4MHz crystal
Have a look at the USBDemo thread and code, there you'll find some settings.Code:' ' Pic Configuration ' ================= asm __CONFIG _CONFIG1L, _PLLDIV_1_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L ; ; ; USB clock source comes from the 96 MHz PLL divided by 2 ; ; [OSC1/OSC2 Src: /1][96 MHz PLL Src: /2] ; No prescale (4 MHz oscillator input drives PLL directly) __CONFIG _CONFIG1H, _FOSC_XTPLL_XT_1H & _FCMEN_OFF_1H & _IESO_OFF_1H ; ; ; Oscillator Switchover mode disabled ; ; Fail-Safe Clock Monitor disabled ; XT oscillator, PLL enabled, XT used by USB __CONFIG _CONFIG2L, _PWRT_ON_2L & _BOR_ON_2L & _BORV_2_2L & _VREGEN_ON_2L __CONFIG _CONFIG2H, _WDT_OFF_2H __CONFIG _CONFIG3H, _MCLRE_ON_3H & _LPT1OSC_OFF_3H & _PBADEN_OFF_3H & _CCP2MX_ON_3H __CONFIG _CONFIG4L, _STVREN_ON_4L & _LVP_OFF_4L & _XINST_OFF_4L & _DEBUG_OFF_4L endasm DEFINE OSC 48
http://www.picbasic.co.uk/forum/showthread.php?t=5418
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
I am still having trouble.
I noticed the assembler gives the warning message:
Warning[217] c:\pbp18f2550.inc 18 : Hex file format specified on command line
Could this be the problem?
Problem solved!!
after many hours of mister_e style head banging , I updated the not just the software (like i did before i made a post) but the firmware on my melabs U2 programmer that fixed the problem
Bookmarks