Topics Topics Edit Profile Profile Help/Instructions Help Member List Member List  
Search Last 1|3|7 Days Search Search Tree View Tree View  

PIC 18 with clock PLL question

:: EPE Chat Zone ­:: ­Radio Bygones Message Board :: » EPE Forum Archives 2010 - » Archive through 20 July, 2010 » PIC 18 with clock PLL question « Previous Next »

  Thread Last Poster Posts Pages Last Post
  ClosedClosed: New threads not accepted on this page        

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

epithumia
Frequent Contributor
Username: epithumia

Post Number: 750
Registered: 06-2006

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, 07 July, 2010 - 02:00 pm:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

Hi,

I'm using the 18F4520 with a 4.096MHz oscillator, and planning to use the PLL to boost the clock speed by 4.

My question is, do the ADC, USART and Timers use the external 4.096MHz, or the multiplied 16.384MHz?

I've looked at the datasheet, but so far find it ambiguous. I found one diagram that implies the PLL is used by peripherals, and several pieces of text which imply otherwise by referring to Fosc.

I can certainly try it on the real hardware to find out, but wondered if anyone already knew.

Unfortunately, it's a bit difficult to source a 16.384MHz crystal, what with £20 minimum order charges...

Thanks,
Epi
If you need me, Neil and me will be hanging out with the Dream King. - Tori Amos
Top of pagePrevious messageNext messageBottom of page Link to this message

joe
:::: Super User ::::
Username: joe

Post Number: 819
Registered: 05-2005

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, 07 July, 2010 - 02:11 pm:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

All the different clock options are routed into the MUX and the clock source selection controlled by FOSC register.

So as I understand it (and from figure 2-8), as long as you setup for using HSPLL (as you want to use an external xtal), then the output from the crystal osc, drives the PLL which feeds into the MUX and in turn drives the CPU AND the peripherals.

Joe
Read my ramblings - www.techbites.com/joe-farr
Top of pagePrevious messageNext messageBottom of page Link to this message

bruce
Frequent Contributor
Username: bruce

Post Number: 367
Registered: 04-2008

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, 07 July, 2010 - 03:33 pm:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

Epi,
I dont know about PICs, but does your clock have to be 16.384 MHz?
I'm sure I have a 16MHz crystal I could let you have.

Bruce
Top of pagePrevious messageNext messageBottom of page Link to this message

epithumia
Frequent Contributor
Username: epithumia

Post Number: 751
Registered: 06-2006

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, 07 July, 2010 - 03:41 pm:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

Thanks for the replies, guys.

I think I have a 16MHz crystal somewhere.

16.384MHz lets me divide down to 1 millisecond easily.

Hope to try out the hardware tonight.

Epi
If you need me, Neil and me will be hanging out with the Dream King. - Tori Amos
Top of pagePrevious messageNext messageBottom of page Link to this message

epithumia
Frequent Contributor
Username: epithumia

Post Number: 752
Registered: 06-2006

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, 07 July, 2010 - 06:05 pm:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

Good news. I tried it and the timers and USART are definitely running off the PLL. I assume the ADC is as well.

Thanks for looking, and thanks for the offer, Bruce.

Epi
If you need me, Neil and me will be hanging out with the Dream King. - Tori Amos
Top of pagePrevious messageNext messageBottom of page Link to this message

bruce
Frequent Contributor
Username: bruce

Post Number: 368
Registered: 04-2008

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, 07 July, 2010 - 08:05 pm:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

Hello Epi,
I wondered what the 16M384 was about; of course, it's a divide by 2 thing.
Glad you got it going!
BTW, if you used a 16mHz Xtal, can you 'pull' it by 0.384 MHZ? This is 2% so may be too much.

Bruce

Administration Administration Log Out Log Out   Previous Page Previous Page Next Page Next Page