doubt in pic18f4550 working

Thread Starter

ashrok

Joined Feb 22, 2009
13
hi,
I'm newbie using microcontrollers.I was going thro' pic18f4550 datasheet.
I found the "flexible clock structure" confusing. it says
Five Crystal modes, including High-Precision PLL
for USB
• Two External RC modes, up to 4 MHz
• Two External Clock modes, up to 40 MHz
• Internal oscillator block:
- 8 user selectable frequencies, from 31 kHz to 8 MHz
- User tunable to compensate for frequency drift
• Secondary oscillator using Timer1 @ 32 kHz

I'm supposed to get data from a ADC-ads7888 serially giving a serial clk of 25Mhz.
All i wanna know is if i can use a crystal of 40Mhz for the pic18f and
derive 25Mhz by programming(toggling a port with some delay corr to 25Mhz) for the ADC Sclk.


thanks in advance,
A

I'd appreciate more if any1 could help me comprehend the text in bold
 

Thread Starter

ashrok

Joined Feb 22, 2009
13
hi mik3.
i read the datasheet oscillator part.
is what i say b'lo correct?:confused:?
using a 20mhz xtal and setting divide factor by 5 , we get 4mhz for pll and again dividing 96mhz by 2 we get clk for usb operation as 48mhz.
for cpu clock too shd we use the same oper freq = 48mhz.?
(i am using the mcu for usb communication with pc in full speed mode)

kindly reply..

thank u,
ashrok
 

mik3

Joined Feb 4, 2008
4,846
You can use an external crystal for the USB and the internal oscillator for the PIC if you want.
 
Top