Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Using 32 kHz crystal with PLL

Status
Not open for further replies.

dgnr

New Member
Hi there,

I have a PIC18F4XK20 Starter Kit board (with a PIC18F46k20)

( **broken link removed** )

which has a 32.768kHz crystal connected to the T1OSO and T1OSI (Timer1) pins. My application needs either a 32Mhz or 64Mhz clock frequency, and has to use an external oscillator as it requires timing accuracy. To increase the crystal frequency, I had planned to use it with the PLL in HSPLL mode. However, I have read that this 'High Speed' mode will only work with crystals of 3-4Mhz or more, and so I'm guessing that I won't be able to run my 32kHz in this HSPLL mode. Is this true ?

Furthermore, from PIC MCU Clock Source Block Diagram it looks like the T1OSO and T1OSI pins (secondary oscillator) are not connected to the PLL, only the primary oscillator and internal oscillator. So it seems to me that I cannot use that board's crystal for my application after all; however I'd just like you guys to confirm my suspicions, as I'm not really familiar with oscillators and PLLs.

Thanks for you time.
 
That crystal is for the real time clock / TMR0.

Why do you need 32 or 64MHz. Are you hoping to generate it?
 
Last edited:
He could use the internal 16Mhz osc to generate the 32 or 64 Mhz with PLL, at least until his external 16Mhz crystal comes in the mail. Hopefully that kit has the pads or the ability to add the external osc.
 
That crystal is for the real time clock / TMR0.

Why do you need 32 or 64MHz. Are you hoping to generate it?

I need it to measure time from a start point until an external interrupt occurs, with the time ranging from a few microseconds up to 1 second. At first I thought of using the internal oscillator to generate that frequency, but I've read that the int. osc. is not recommended for timing applications, so I guess my only bet would be to use an ext. crystal ?


The kit does have pads/headers to the right of the board (as you can see in the link). The only way I could think of is to either connect a crystal and the two caps directly on the headers, or on a breadboard, then wire it to the headers. I think ideally the crystal should be as close to the PIC as possible, so if I do it this way, there will be accuracy problems ? What do you guys recommend ?
 
Looked up the schematic and the osc pins are hooked up to the SPI CS pins for the oled and external eeprom. That's really messed up! if you expect to run the demo examples etc. Even if you are done with the demo's, re-purposing the CS lines to other I/O lines, cutting traces (possibly lifting traces), fly wires, protoboarding/socketing a crystal to the header, would make a real mess of things.

Try out the internal osc, and see if it suits your needs. If need be, trim the osc calibration register to a scope. There is a temp sensor on the board, one could also trim for that according to the data sheet graphs.

Worst comes to worst, consider an inexpensive project board (like Olimex PIC-40) if that chip comes in dip form.
 
Hi there,

I have a PIC18F4XK20 Starter Kit board (with a PIC18F46k20)

( **broken link removed** )

which has a 32.768kHz crystal connected to the T1OSO and T1OSI (Timer1) pins. My application needs either a 32Mhz or 64Mhz clock frequency, and has to use an external oscillator as it requires timing accuracy. To increase the crystal frequency, I had planned to use it with the PLL in HSPLL mode. However, I have read that this 'High Speed' mode will only work with crystals of 3-4Mhz or more, and so I'm guessing that I won't be able to run my 32kHz in this HSPLL mode. Is this true ?

Furthermore, from PIC MCU Clock Source Block Diagram it looks like the T1OSO and T1OSI pins (secondary oscillator) are not connected to the PLL, only the primary oscillator and internal oscillator. So it seems to me that I cannot use that board's crystal for my application after all; however I'd just like you guys to confirm my suspicions, as I'm not really familiar with oscillators and PLLs.

Thanks for you time.
You get 32MHz oscillators straight in dip14 type package with 4 pins.
 
Status
Not open for further replies.

Latest threads

Back
Top