changing osc on the fly


Closed Thread
Results 1 to 23 of 23

Hybrid View

  1. #1
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    In some cases, you can read the configuration bits to determine if you are running on the INT OSC, and whether or not any dividers or PLLs are in use. If you have any kind of external oscillator or RS-232 input, you can figure things out pretty easily.
    Charles Linquist

  2. #2
    Join Date
    May 2007
    Posts
    604


    Did you find this post helpful? Yes | No

    Default

    With VDD = 5.0V, supply current of PIC18F4550 at 4MHz is typically 2.5mA (5.0mA MAX). In sleep mode it is 0.1uA (2.0us MAX). See table 28-2 of the datasheet.

    So in sleep mode, current consumption is 1/25000 of that of run mode at 4MHz. To reduce power consumption - the intent of the OP - it makes more sense to use the Power Managed Modes of the device, which is what they were designed to do.

    Any of the available interrupt sources can cause the device to exit from the Sleep mode to Run mode. To enable this functionality, an interrupt source must be enabled by setting its enable bit in one of the INTCON or PIE registers. The exit sequence is initiated when the corresponding interrupt flag bit is set. You can also exit Sleep mode by WDT time out.

  3. #3
    Join Date
    Jun 2007
    Posts
    15


    Did you find this post helpful? Yes | No

    Thumbs up thanks all

    thank you all for your help,, here is what i did,

    i ran the cpu on lower speed than the 48mhz needed for the USB, which did the trick without the need to switch the clock on the fly.

    thanks again

Similar Threads

  1. Define osc 1
    By ronsimpson in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 1st October 2009, 06:35
  2. Changing bits in a byte for multiple output
    By tazntex in forum Serial
    Replies: 3
    Last Post: - 11th August 2008, 19:10
  3. Replies: 4
    Last Post: - 16th May 2008, 14:35
  4. Changing declared variables names on the fly
    By jessey in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 16th December 2006, 06:34
  5. Mode changing on the fly
    By Angus Anderson in forum GSM
    Replies: 1
    Last Post: - 28th November 2006, 08:58

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts