Using this crystal with a PIC

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
Post Reply
Newz2000
Posts: 507
Joined: Wed May 18, 2005 1:01 am
Location: Des Moines, Iowa, USA
Contact:

Using this crystal with a PIC

Post by Newz2000 »

Can anyone tell me how to hook this crystal to a PIC 16f84a?<p>Here is a link to the PDF but the pertinent information is (SG51 series):
14 pin DIP package (only 4 pins though)
- pin 1 labeled OE
- pin 7 labeled GND
- pin 8 labeled OUT
- pin 14 labeled Vdd
http://www.gulf-coast.net/ebay/sg-531p.pdf<p>The 16f84a-04 does not have its own clock but instead has pins labeled:
- pin 15 labeled OSC2
- pin 16 labeled OSC1
Diagram located at http://www.mikroelektronika.co.yu/engli ... hapter.htm<p>I'm using 4.5 volts battery pack for now, may use a serial port for power later.<p>Do I need to use two caps for this? I'm not famaliar with this package and most diagrams are not to helpful in this case.<p>Thanks!
dyarker
Posts: 1919
Joined: Fri Aug 22, 2003 1:01 am
Location: Izmir, Turkiye; from Rochester, NY
Contact:

Re: Using this crystal with a PIC

Post by dyarker »

Have you looked at the spec sheet at [url=http://www.microchip.com,]www.microchip.com,[/url] page 22, para 6.2?<p>Your SG-51 is not a crystal, it is a crystal oscillator; use spec sheet figure 6-2 (no caps).<p>The figure at mikroelektronika is for using a crystal.<p>Cheers,<p>[ June 14, 2005: Message edited by: Dale Y ]</p>
Dale Y
bodgy
Posts: 1044
Joined: Tue Dec 04, 2001 1:01 am
Location: Australia
Contact:

Re: Using this crystal with a PIC

Post by bodgy »

And a crystal oscillator is connected to OSC1 on the Pic, with Osc2 being an open connection.<p>There will, however, be a 1/4 freq signal on this pin that can be used for other purposes if needed.<p>Though I doubt you'll be needing that facility.<p>Colin
On a clear disk you can seek forever.
Gorgon
Posts: 325
Joined: Wed May 04, 2005 1:01 am
Location: Norway
Contact:

Re: Using this crystal with a PIC

Post by Gorgon »

Hi Colin,
The PIC must also be set in HS,LP or XT mode. NOT in RC mode.<p>TOK ;)
Gorgon the Caretaker - Character in a childrens TV-show from 1968. ;)
Newz2000
Posts: 507
Joined: Wed May 18, 2005 1:01 am
Location: Des Moines, Iowa, USA
Contact:

Re: Using this crystal with a PIC

Post by Newz2000 »

Thanks for the help everyone... the link to that PDF file gave me the answer about how to hook it up, and it worked ok (very slow) until I switched to HS mode. Then it worked great (It also helped that I MCLR to ground... it worked "funny" without that). For the archives:<p>To switch to HS mode in MPLAB, you have to:
1. From the "Configure" menu choose "Select Device" and do what seems logical, hitting OK at the end.
2. From the "Configure" menu choose "Configuration Bits"
3. Click once on "Oscillator" and the field in the "Setting" column should become a drop down list. From the drop down list, choose the proper mode (for example, HS)
4. Unlike other option windows, simply hit the X to close the window when you're done. There is no "OK" button here.
ezpcb
Posts: 98
Joined: Tue Apr 19, 2005 1:01 am
Contact:

Re: Using this crystal with a PIC

Post by ezpcb »

It's an active oscillator, not a passive crystal. No external circuit needed to make it vibrating. Just connector pin 15 to osc1, osc2 left unconnected.<p>mike
http://www.EzPCB.com
High Quality PCB for Electronics Hobbists, Pay for Chrokee, Get Land Rover
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 162 guests