changing osc on the fly


Closed Thread
Results 1 to 23 of 23

Hybrid View

  1. #1
    Join Date
    May 2007
    Posts
    604


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    ...Maybe not at 2 volts, but 2.5 is doable. Using the PICKIT2 for a PS, only goes down to 2.5. So I can not verify the 2 volts right now...
    It is poor engineering practice to operate a device outside of the manufacturer's specs - take a look at the graph above where it shows that the minimum voltage is 4.2V for frequencies >25Mhz.

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by rmteo View Post
    It is poor engineering practice to operate a device outside of the manufacturer's specs - take a look at the graph above where it shows that the minimum voltage is 4.2V for frequencies >25Mhz.
    But I am not an engineer

    I look at the graph as showing the primary frequency.
    I have not built anything to run on less than 3.3 volts. I do a lot at 3.3 though. Have for some time. Makes working with SD cards and other low power things much easier. One power supply.
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    May 2007
    Posts
    604


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    But I am not an engineer

    I look at the graph as showing the primary frequency.
    Makes sense then.

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


    Did you find this post helpful? Yes | No

    Default

    If you need to run at 4Mhz on the internal OSC, put this in your code.



    Code:
    ASM
           movlw 0x62                              ; %0110 0010  = 4 Mhz, internal osc block
           movwf OSCCON
           movlw 0x80                              ; %1000 0000  = PLL disabled
           movwf OSCTUNE
    ENDASM
    I have a development board that runs at 40Mhz on a 10Mhz XTAL + PLL, but sometimes I need to slow things down to 4Mhz and run on the internal oscillator to see how they will run on "little" parts. This code does the trick.
    Charles Linquist

  5. #5
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default

    I was thinking of a routine that could detect the clock speed the pic is running at
    so that then the pic program could adjust serial speed, etc accordingly.

    Make a delay loop in picbasic and count the number of ticks a hardware timer
    makes during the delay loop.. and then the hardware timer value will be
    different for different clock speeds.

  6. #6
    Join Date
    May 2007
    Posts
    604


    Did you find this post helpful? Yes | No

    Default

    Wouldn't a delay need to know clock speed to work correctly?

  7. #7
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    Art, What would you use as a reference in that situation?

    Dave Purola,
    N8NTA

  8. #8
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by rmteo View Post
    Wouldn't a delay need to know clock speed to work correctly?
    No, because you use a timer based on RC clock, which is always the same,
    but the delay is dependent on osc speed.

    So, start timer, execute delay, read timer.

    The fact that the delay varies is what I'm counting on.

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