Searching \ for '[PIC] PIC18F4553 Oscillator and USB' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: massmind.org/techref/microchip/time.htm?key=oscillator
Search entire site for: 'PIC18F4553 Oscillator and USB'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] PIC18F4553 Oscillator and USB'
2012\06\14@093427 by Jim

flavicon
face
 BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }  
       Hi guys,
       I am using a pic18F4553 in a project and I am having problems with
the oscillator.
       I am trying to use the internal 8MHz clock PLL, prescaler etc (which
works nicely clocking at 32MHz), but when it comes to working with the
USB I am failing miserably.
       All of the Microchip documentation seems to contradict itself in
each section when discussing the USB clock.
       My question is this:-  
       Can i use the 8MHz internal oscillator to drive the 48MHz/6MHz
needed for the on-chip USB peripheral, and if so, what settings would
you use?
       Here is what I am using (I have documented the config settings)  
       (MPLab 8.83, Hi-tech C 9.65)
        // 8Mhz internal oscillator producing 48MHz USB clock and 48MHz CPU
clock
     // clk src from 96MHz PLL/2,        // Internal External Switch Over Mode disabled
    // Fail-Safe Clock Monitor Disabled
   // INTOSC: INTOSC+CLK0{RA6}, USB-EC     // CPU No divide
   // OSC Select div by 2 {8MHz internal input}  __CONFIG(1, USBPLL & IESODIS & FCMDIS & INTCLKO & CPUDIV1 &
PLLDIV2);                 // USB Voltage Regulator Enabled
       // Power Up Timer Disabled
       // Brown Out Detect Disabled (2.0v)
       // Watchdog Timer Disabled (1:32768)
__CONFIG(2, VREGEN & PWRTDIS & BORDIS & BORV20 & WDTDIS & WDTPS32K);
             // PortB A/D disabled (digital)
      // Low Power Timer1 Osc Disabled
     // Master Clear Enable
__CONFIG(3, PBDIGITAL & LPT1DIS & MCLREN);
            // Disable extended instruction set (Legacy mode)       // Stack Overflow Reset Disabled
     // Low Voltage Program Disabled
     // Dedicated In-Circuit Port {ICD/ICSP} Disabled
     // Background Debug Enabled
__CONFIG(4, XINSTDIS & STVRDIS & LVPDIS & ICPORTDIS & DEBUGEN);
             // Protect bits Unprotected
__CONFIG(5, UNPROTECT);
__CONFIG(6, UNPROTECT);
__CONFIG(7, UNPROTECT);
       Many Thanks,
       Ji

2012\06\14@095423 by Bob Ammerman

flavicon
face
\> I am using a pic18F4553 in a project and I am having problems with
> the oscillator.
>
> I am trying to use the internal 8MHz clock PLL, prescaler etc (which
> works nicely clocking at 32MHz), but when it comes to working with the
> USB I am failing miserably.
>
> All of the Microchip documentation seems to contradict itself in
> each section when discussing the USB clock.
>
> My question is this:-
>
> Can i use the 8MHz internal oscillator to drive the 48MHz/6MHz
> needed for the on-chip USB peripheral, and if so, what settings would
> you use?

I would not try to use the internal clock to do USB, even if it is possible on the chip (and I don't know if it is).

USB requires better clock accuracy than you are likely to get without a resonator or crystal.

-- Bob Ammerman
RAm Systems

2012\06\14@095716 by William Bross

picon face
Jim wrote:

{Quote hidden}

Jim,
I just glanced at the datasheet for the 4550 and found this:

2.2.5 INTERNAL OSCILLATOR BLOCK
The PIC18F2455/2550/4455/4550 devices include an
internal oscillator block which generates two different
clock signals; either can be used as the microcontroller’s
clock source. _If the USB peripheral is not used_, the
internal oscillator may eliminate the need for external
oscillator circuits on the OSC1 and/or OSC2 pins.

And looking at figure 2.1 on page 24, you see that the source of the USB clock can't be fed from the Internal Clock. It can only be derived from the Primary Osc.

Bill

2012\06\14@102731 by Jim

flavicon
face



         BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }
Hi Bill,

       I thought that initially, but looking through the datasheet has sent
my head in a spin.

       Normally, these configs are a breeze, but this one has just been
killing me.

       I have designed in (and now fitted) a 20MHz resonator, so I will try
with that.

       Thanks again

       Jim
On Thu 14/06/12 2:57 PM , William Bross spam_OUTwbrossTakeThisOuTspamcinci.rr.com sent:
 Jim wrote:
> BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }
>
> Hi guys,
>
> I am using a pic18F4553 in a project and I am having problems with
>the oscillator.
>
> I am trying to use the internal 8MHz clock PLL, prescaler etc
(which
>works nicely clocking at 32MHz), but when it comes to working with
the
>USB I am failing miserably.
>
> All of the Microchip documentation seems to contradict itself in
>each section when discussing the USB clock.
>
> My question is this:-
>
> Can i use the 8MHz internal oscillator to drive the 48MHz/6MHz
>needed for the on-chip USB peripheral, and if so, what settings
would
>you use?
>
> Here is what I am using (I have documented the config settings)
>
> (MPLab 8.83, Hi-tech C 9.65)
>
> // 8Mhz internal oscillator producing 48MHz USB clock and 48MHz
CPU
>clock
> // clk src from 96MHz PLL/2,
> // Internal External Switch Over Mode disabled
> // Fail-Safe Clock Monitor Disabled
> // INTOSC: INTOSC+CLK0{RA6}, USB-EC
> // CPU No divide
> // OSC Select div by 2 {8MHz internal input}
> __CONFIG(1, USBPLL & IESODIS & FCMDIS & INTCLKO & CPUDIV1 &
>PLLDIV2);
> // USB Voltage Regulator Enabled
> // Power Up Timer Disabled
> // Brown Out Detect Disabled (2.0v)
> // Watchdog Timer Disabled (1:32768)
> __CONFIG(2, VREGEN & PWRTDIS & BORDIS & BORV20 & WDTDIS &
WDTPS32K);
> // PortB A/D disabled (digital)
> // Low Power Timer1 Osc Disabled
> // Master Clear Enable
> __CONFIG(3, PBDIGITAL & LPT1DIS & MCLREN);
> // Disable extended instruction set (Legacy mode)
> // Stack Overflow Reset Disabled
> // Low Voltage Program Disabled
> // Dedicated In-Circuit Port {ICD/ICSP} Disabled
> // Background Debug Enabled
> __CONFIG(4, XINSTDIS & STVRDIS & LVPDIS & ICPORTDIS & DEBUGEN);
> // Protect bits Unprotected
> __CONFIG(5, UNPROTECT);
> __CONFIG(6, UNPROTECT);
> __CONFIG(7, UNPROTECT);
> Many Thanks,
>
> Jim
>
>
Jim,
I just glanced at the datasheet for the 4550 and found this:
2.2.5 INTERNAL OSCILLATOR BLOCK
The PIC18F2455/2550/4455/4550 devices include an
internal oscillator block which generates two different
clock signals; either can be used as the microcontroller’s
clock source. _If the USB peripheral is not used_, the
internal oscillator may eliminate the need for external
oscillator circuits on the OSC1 and/or OSC2 pins.
And looking at figure 2.1 on page 24, you see that the source of the
USB
clock can't be fed from the Internal Clock. It can only be derived
from
the Primary Osc.
Bill
--
http://www.piclist.com [1] PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist [2]


Links:
------
[1] http://www.piclist.com
[2] http://mailman.mit.edu/mailman/listinfo/piclist

2012\06\14@104158 by Dwayne Reid
flavicon
face
At 07:54 AM 6/14/2012, Bob Ammerman wrote:

>I would not try to use the internal clock to do USB, even if it is possible
>on the chip (and I don't know if it is).
>
>USB requires better clock accuracy than you are likely to get without a
>resonator or crystal.

That's what I've always thought as well.  But don't recent FDTI USB chips work without an external crystal?

How do they work their magic?

Thanks!

dwayne

-- Dwayne Reid   <.....dwaynerKILLspamspam@spam@planet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
(780) 489-3199 voice          (780) 487-6397 fax
http://www.trinity-electronics.com
Custom Electronics Design and Manufacturing

2012\06\14@110106 by Bob Ammerman

flavicon
face
>>USB requires better clock accuracy than you are likely to get without a
>>resonator or crystal.
>
> That's what I've always thought as well.  But don't recent FDTI USB
> chips work without an external crystal?
>
> How do they work their magic?
>
> Thanks!
>
> dwayne

I think they might adjust their timing based on the clock rate of the signal from the host. I have used that trick to do bit-banged RS232 async without a crystal.

-- Bob Ammerman
RAm Systems

2012\06\14@113607 by alan.b.pearce

face picon face
> >I would not try to use the internal clock to do USB, even if it is
> >possible on the chip (and I don't know if it is).
> >
> >USB requires better clock accuracy than you are likely to get without a
> >resonator or crystal.
>
> That's what I've always thought as well.  But don't recent FDTI USB chips work
> without an external crystal?
>
There are a handful of Microchip USB chips that claim to have an internal oscillator stable enough to work with USB, but I don't believe that chip is one in this category.
The only one I can think of that I have discovered claims to be stable enough is the PIC24FJ64GBxxx series.
-- Scanned by iCritical.

2012\06\15@114121 by Matt Bennett

flavicon
face
On Thu, June 14, 2012 10:35 am, alan.b.pearcespamKILLspamstfc.ac.uk wrote:
>> >I would not try to use the internal clock to do USB, even if it is
>> >possible on the chip (and I don't know if it is).
>> >
>> >USB requires better clock accuracy than you are likely to get without a
>> >resonator or crystal.
>>
>> That's what I've always thought as well.  But don't recent FDTI USB
>> chips work
>> without an external crystal?
>>
>
> There are a handful of Microchip USB chips that claim to have an internal
> oscillator stable enough to work with USB, but I don't believe that chip
> is one in this category.
>
> The only one I can think of that I have discovered claims to be stable
> enough is the PIC24FJ64GBxxx series.

To meet the USB spec (full speed, at least), you need a pretty accurate
oscillator, I believe about 0.5%. In general, the standard internal
oscillator just won't cut it across temperature. The internal oscillator
is often accurate enough for USB operation at room temp, but you run the
very real possibility of it drifting out of compliance with the USB
specification.

Low speed USB allows much looser tolerances on USB, and I believe it runs
within the USB specification across the temperature range of the most
parts (-40 to +85).

There is a future part (announced and available "real soon") that does USB
clock recovery (PIC16F14xx)
<http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en556971> - no
external (timing) components needed.

Matt Bennett
Just outside of Austin, TX
30.51,-97.91

The views I express are my own, not that of my employer, a large
multinational corporation that you are familiar with

2012\06\15@122153 by Jim Franklin

flavicon
face
Thanks Matt and everyone else who answered.

Although I'm running low speed USB *it's controlling a handful of I2c
digital pots and reading some digital ports, it seems I need to use the
external oscillator. As I posted earlier on the list, I have designed in a resonator including on
the pcb so I populated the spot with a 20Mhz part. I'll give it a whirl.

-Jim

{Original Message removed}

More... (looser matching)
- Last day of these posts
- In 2012 , 2013 only
- Today
- New search...