Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] PIC32MX675F256H. Crystal stops after few seconds

Status
Not open for further replies.

Nicolás Celedón

Junior Member level 2
Joined
Jan 4, 2014
Messages
20
Helped
4
Reputation
8
Reaction score
4
Trophy points
3
Activity points
151
I made my first board with a pic32 smd.



The thing is that the 8MHz crystal oscillator (see attached file - Orig_Crystal.pdf) works just some times and just for few seconds, after that it stops. I have a led blinking that shows that. Both capacitors connected to the crystal are 22pF.

Here are the gerbers of the board **broken link removed**.



First i thought that the problem was with the crystal , so i changed with other 8MHz crystal oscillator (see attached file - Replace_Crystal.pdf). It's not smd but i managed to solder this. I had the same behavior.

The microchip has 3.3V in Vdd.

Right now i'm trying to understand some documents from microchip, but haven't got a solution yet.

Any tip will be very helpfull.
 

Attachments

  • Orig_Crystal.pdf
    239.9 KB · Views: 69
  • Replace_Crystal.pdf
    143.5 KB · Views: 66
  • gerber.zip
    20.3 KB · Views: 72
Last edited:

Any of the these cases might be happening.

1. As suggested in the datasheet, a parallel feedback resistor is required which is not connected.
2. The PLL settings not set properly inside (prescalar)
3. Sometimes, your configuration in the code may be enabling internal oscillator, so, may be you are switching back to internal oscillator on power up (configuration settings)
4. Logic level of the crystal not suitable (which may be in your case)
5. Load capacitance of crystal not matching to pcb trace+controller pin capacitance

Are you seeing a damping effect on the pins or it stops instantly?
 

1. I really don't find where in the datasheet appears this parallel feedback resistor.
2. The internal 8MHz clock works well with the prescaler config. I'm using the PLL and as i read i have to keep "Fin"(after the first pll divider) between 4MHz and 5MHz, and the output shuld be less or equal to 80MHz
3. I have selected the external with the FNOSC and the IESO is disabled. I tried enabling and disable the internal oscillator with the FNOSC register, between "Fast RC Osc with PLL" (internal 8MHz) and "Primary Osc w/PLL" (external 8 MHz). I have also selected the XT mode
4. I will verify this.
5. I'm still grasping this part, have a few formulas over here but i'm still understanding.

I don't see a damping effect, it seems to just stop working. But again, i just have a LED to verify that(some times stops when it's OFF and sometimes when it's OFF)

*1. One thing that i just notice with the new crystal(is a through hole), is that the drive level is 0.1mW and the ESR is 60ohm. Should i add a series resistance(Rs)?
*2. I have read about adjusting the gain or phase, but i don't know which one should i try first. there must be some theory, or something that i can measure to verify this. I tried measuring the signal with the oscilloscope, but as i read it also adds some capacitance.

*3.In details, when i just solder the first crystal, it worked for about 20 seconds, then it stoped. I turned the power OFF and ON like 5 times and it didn't work. After few hours i turned on again and worked for just about 10 seconds. When i changed the crystal, had the same behavior.

Thanks embeddedlover, i'll put more effort in points 4 and 5.
 

Add 1M parallel to make work for DC self-bias to overcome leakage from contaminated solder flux to Vcc or ground. OSC2 is output should be Vcc/2 if working. Normally 10M works also down <470k but more power consumption.

Add 1 -3 K in series with OSC2 output to prevent frying crystal (<100u
W) and avoid long solder time >5sec.

See appendix clock circuit 141...

image.jpg

Clock will always work since inverter gain is 10 or 20dB and crystal loss <10dB and self bias with OSC2out=Vcc/2 for 50% duty cycle. You can see effect with finger in OSC1 input to Vcc or gnd by looking at OSC2 out . DC = direct current, also duty cycle here of clock. If stuck high or low. No clock.
 

Attachments

  • image.jpg
    image.jpg
    194.7 KB · Views: 83

Thanks SunnySkyguy.

I added a 2.2kOhm Rs resistance and so far is working well (i will have this running for a few hours though, just to be sure). About the Parallel resistance, i tried but it didn't work, and as i read in a microchip document (AN849) its often needded but for resonator circuits.

I tried the parallel before because it was easier, and i wanted to avoid the series resistance because i needed to cut a track. But i decide to took SunnySkyguy advice.

Thanks!

PS: ZASto, i tried HS and XT and made no difference. I read i some documents that XT was up to 10MHz. In others i read that it was up to other value lower than 8MHz (don't remember the exact value)

UPDATE: I waited more time(had launch) and when i came back, it wasn't working anymore(it was a weird frequency and not stable). Now it shows some erratic behavior. For example: 1 minute after power ON, it started the clock and then after few seconds, stoped. I'll read a little bit more to understand better the Rs resistance, and i'll post the results.
 
Last edited:

Now it works. I took SunnySkyguy advice on putting a parallel resistance of 1MOhm. Also, i put a 3.9kOhm series resistance(Rs).

Thanks
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top