Xtal for 16f84a-16f628a


Closed Thread
Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302

    Default Xtal for 16f84a-16f628a

    I have wrote a programm for 16f84a and 16f628a with crystal 4MHZ.
    If i change the crystal to 20Mhz and define 4 to define 20 , will that works;

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Red face May be yes, May be no ...

    Hi, Savnik

    Depends on what your program is supposed to do and how it is written ... my Crystal ball is out for repairs !!!

    Timing instructions ( PULSIN, RCTIME,COUNT,FREQUOUT, etc ...) will especially be modified ... as stated in the PbP Manual ... if you've spread some assembler, or use interrupts, may be some registers preloadings ( TMRs i.e.) will have to be modified ...

    No more details available without knowing what you've written ...

    Alain
    Last edited by Acetronics2; - 13th August 2007 at 12:12.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    Hi, Savnik

    Depends on what your program is supposed to do and how it is written ... my Crystal ball is out for repairs !!!

    Timing instructions ( PULSIN, RCTIME,COUNT,FREQUOUT, etc ...) will especially be modified ... as stated in the PbP Manual ... if you've spread some assembler, or use interrupts, may be some registers preloadings ( TMRs i.e.) will have to be modified ...

    No more details available without knowing what you've written ...

    Alain
    If i want to turn on and off one led;

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by savnik View Post
    If i want to turn on and off one led;
    If you JUST want to turn the led ON or OFF ... no mod. involved.

    Note with the DEFINE OSC 20 ... PAUSE and PAUSEUS will still give the "written" time.

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  5. #5
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    If you JUST want to turn the led ON or OFF ... no mod. involved.

    Note with the DEFINE OSC 20 ... PAUSE and PAUSEUS will still give the "written" time.

    Alain
    I don't want to change the code.I ask because i have one pic16f84a-04 and one pic16f628a

  6. #6
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    For 20Mhz, you'll also need to change the oscillator config to HS.
    <br>
    DT

  7. #7
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    For 20Mhz, you'll also need to change the oscillator config to HS.
    <br>
    I know , but the pic16f84a-04 and pic16f628a work with crystal 20 Mhz;

  8. #8
    Join Date
    Mar 2006
    Location
    Hyderabad (India)
    Posts
    123


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by savnik View Post
    I don't want to change the code.I ask because i have one pic16f84a-04 and one pic16f628a
    please go thro the datasheet Ds35007B in respect of PIC16F84A-4/20-- figures 9-1 and 9-2 and relevent comments. it is however possible as per the datasheet but voltage restrictions apply , i beleive.

    for PIC16F628A, it is possible to have any crystal.

    In both cases appropriate config commet to be moddedas you know already
    Regards,
    Sarma

  9. #9
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mvs_sarma View Post
    please go thro the datasheet Ds35007B in respect of PIC16F84A-4/20-- figures 9-1 and 9-2 and relevent comments. it is however possible as per the datasheet but voltage restrictions apply , i beleive.

    for PIC16F628A, it is possible to have any crystal.

    In both cases appropriate config commet to be moddedas you know already
    Thank you.

Similar Threads

  1. Xtal speed vs PIC power
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 4th January 2010, 19:55
  2. Crystal oscillator problems on a 16f628a
    By achilles03 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 16th February 2009, 16:33
  3. 16F628A current high during sleep
    By Rubicon in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 9th October 2006, 10:21
  4. using internal xtal
    By jojokatada in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd April 2005, 16:25
  5. HSEROUT and 16F628A
    By fredblah in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 6th May 2004, 00:07

Members who have read this thread : 1

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