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.

why does nt my pic work at 20Mhz

Status
Not open for further replies.

roykyn

Full Member level 5
Joined
Sep 15, 2006
Messages
254
Helped
12
Reputation
24
Reaction score
5
Trophy points
1,298
Activity points
2,704
20mhz pic crystal

please help me.....
i am using 16f72 pic.....on a bread board......it works perfectly at 4.433619Mhz but when i insert a 20Mhz crystal it doesnt work.....i am using mplab 7.41 and jdm programmer... i have also grounded the crystal metal case....
ya i changed the config bit to hs its working now....
but i have another problem now...i need very accurate 4.194304 Mhz source...i am using crystal for that.....now i dont know the exact value of the parallel capacitors for satbilization
i dont have the datasheet of the crystal...... 4.194304 kds 2c is written on the crystal....
 

aviv6371

Member level 2
Joined
Jul 7, 2006
Messages
46
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Activity points
1,586
20mhz load capacitor

when using 4 mege crystal you work withe XT mode . the HS mode designed for high speed crystals. program the configuration bit of oscillator to HS.
 

16F676

Member level 2
Joined
Aug 14, 2006
Messages
44
Helped
5
Reputation
10
Reaction score
2
Trophy points
1,288
Activity points
1,531
aviv6371 is correct .
and one more thing to keep in mind that if your program is time based and configured for a 4 Mhz speed, it may not work higher value crystels.
for example: If you are comunicating the pic with another device in a specific speed, it may not work on higher speeds until you change the code or boad rate.


good luck
 

roykyn

Full Member level 5
Joined
Sep 15, 2006
Messages
254
Helped
12
Reputation
24
Reaction score
5
Trophy points
1,298
Activity points
2,704
ya i changed the config bit to hs its working now....
but i have another problem now...i need very accurate 4.194304 Mhz source...i am using crystal for that.....now i dont know the exact value of the parallel capacitors for satbilization
 

aviv6371

Member level 2
Joined
Jul 7, 2006
Messages
46
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Activity points
1,586
try connecting 2 parallel ceramic 22pF capacitors o the 4 mega crystal

avi.
 

Alliegro

Member level 3
Joined
Apr 26, 2006
Messages
61
Helped
6
Reputation
12
Reaction score
3
Trophy points
1,288
Activity points
1,740
you get crystals with inbuilt capacitors. Small package. So you will not require external stablisation. If you require very acurate crystal stablised for temparature variations, you would need a oven controlled crystal. Try AE electronics in Andhra.
 

roykyn

Full Member level 5
Joined
Sep 15, 2006
Messages
254
Helped
12
Reputation
24
Reaction score
5
Trophy points
1,298
Activity points
2,704
ya ocxo is a better choice.......even tcxo....is good......
any way i had tried 22pf in parallel but it changed the freq a little bit....the one without the capacitor was better.....i have seen in many websites.....they have suggested to calculate it using some load capacitance...since i dont know tat ...i have ruled it out.....
do u know the optimum value....cos i have seen using 2 diff caps with a variable capacitor on one side.......
 

aviv6371

Member level 2
Joined
Jul 7, 2006
Messages
46
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Activity points
1,586
the formula to calculate the capacitors is:
cl=(c1*c2)/(c1+c2)+cs

cl is load capacitor whice is mentioned in the data sheet
cs is the stray capacitor of the printed board typically 5pF
c1 and c2 is the parallel capacitors. usually its the same value

avi.

Added after 4 minutes:

one more thing ...for best stabilization connect potentiometer in serial from the output of the inverter/buffer to the crystal and tune it to get stabilliy and high starting performance.

avi.
 

blueroomelectronics

Advanced Member level 5
Joined
Sep 17, 2006
Messages
1,686
Helped
179
Reputation
356
Reaction score
77
Trophy points
1,328
Location
Toronto, Canada
Activity points
8,696
roykyn said:
please help me.....
i am using 16f72 pic.....on a bread board......it works perfectly at 4.433619Mhz but when i insert a 20Mhz crystal it doesnt work.....i am using mplab 7.41 and jdm programmer... i have also grounded the crystal metal case....

PICs running above 4MHz you have to be careful and not write to the same port twice in a row. Read up on PIC Read/Modify/Write... A real gremlin at high speeds.
 

Code Warrior

Full Member level 4
Joined
Dec 30, 2004
Messages
230
Helped
10
Reputation
20
Reaction score
2
Trophy points
1,298
Activity points
1,831
Connect very low value coil in parallel with crystal.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top