how to use external crystal?



THE BOOK of DT's INTERRUPTS is an organization of interrupt service routines and other works written by Darrel Taylor, RIP.

Interrupt routines are arranged per Darrel's original list. Darrel Taylor's Instant Interrupts are an extension of the work of Tim Box whom in October of 2002 wrote INT_CTRL.pbp

Many of the forum members felt this is a long overdue project.

THE BOOK of DT's INTERRUPTS
will be a valuable resource and a tribute to Darrel Taylor the "Fanatical Contributor".

THE BOOK of DT's INTERRUPTS is located at http://dt.picbasic.co.uk/

+ Reply to Thread
Results 1 to 27 of 27
  1. #1
    Join Date
    Oct 2014
    Posts
    17

    Default how to use external crystal?

    I am trying to use a 20 MHz crystal with a PIC16F886. When I select the external HS crystal in various ways it does not work rather the PIC runs at 4 MHZ, even tho the define is for OSC 20. This is measurable by setting a delay for 100usec and having it instead be 500usec. It thinks it is using a 20MHz crystal to calculate the timing when it is instead using the internal 4MHz clock. Unless somehow the crystal is operating at exactly 4 MHz instead of 20MHz. It doesn't seem to be, actually doesn't seem to be running at all.

    The circuit is built on a ground plane proto board and laid out carefully. I added 20k across the crystal input to I assume make it stop oscillating at all if it was but the execution is the same at 4 MHz, so I'm confident the crystal is not even part of the circuit now.

    I've set the configuration bits in MPLAB to select HS oscillator without success. I set the OSCCON to %01101000 which is supposed to use bits FOSC 0-2 to set the oscillator choice.

    I've tried various settings of #config...#endconfig and those don't work. But given how those are kind of mysterious I may be setting those wrong.
    This is what I tried: __config1 _FOSC_HS & _WDTE_OFF & _PWRTE_ON & _MCLRE_OFF & _CP_OFF & _CPD_OFF & _BOREN_ON & _IESO_ON & _FCMEN_ON & _LVP_OFF & _WRT_OFF

    I also tried defining the config1 register to set it up to use the external crystal: DEFINE CONFIG1 $EFC2

    Nothing works. The internal 8 MHz works just fine and the program executes as expected.

    Honestly I've had more consternation trying to figure out the configuration process and getting that to work. That aspect of this software needs attention.

  2. #2
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: how to use external crystal?

    1. define OSC 20 does not set the oscillator, it simply informs PBP of the oscillator's intended frequency so it can adjust it's timing.
    2. Your chip has a fail safe monitor in case the oscillator fails, so if it fails it switches to internal osc. It appears OSCON sets the FSOSC's frequency, not the Primary OSC .
    I would try shutting off the fail safe clock monitor, I would guess then it won't run at all. You may have a dead crystal, too much capacitance on the crystal or a chip with a damaged oscillator. If you have an oscilloscope you could test . . . HTH
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: how to use external crystal?

    Deleted...........
    Last edited by towlerg; - 5th March 2015 at 03:03.

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


    Did you find this post helpful? Yes | No

    Default Re: how to use external crystal?

    tbarania, How are you loading the program into the PIC? If you are using a bootloader the " __config1 _FOSC_HS & _WDTE_OFF & _PWRTE_ON & _MCLRE_OFF & _CP_OFF & _CPD_OFF & _BOREN_ON & _IESO_ON & _FCMEN_ON & _LVP_OFF & _WRT_OFF" statement is NOT being executed.
    Dave Purola,
    N8NTA
    EN82fn

  5. #5
    Join Date
    May 2013
    Location
    australia
    Posts
    2,118


    Did you find this post helpful? Yes | No

    Default Re: how to use external crystal?

    I have a bunch of 20MHZ low profile xtals that are happiest with _FOSC_XT an 22pF caps , had me guessing for a bit

  6. #6
    Join Date
    Oct 2014
    Posts
    17


    Did you find this post helpful? Yes | No

    Default Re: how to use external crystal?

    I've tried

    #config
    __config1 _FOSC_HS & _WDTE_OFF & _PWRTE_ON & _MCLRE_OFF & _CP_OFF & _CPD_OFF & _BOREN_ON & _IESO_ON & _FCMEN_ON & _LVP_OFF & _WRT_OFF
    #endconfig

    at the top the basic program. I compile and load the hex file into MPLAB and program the chip using the PICSTART Plus. I leave the configuration bits "set in code" since I'm assuming that is what the above is supposed to take care of. Apparently it doesn't, rather the PIC reverts to the 4MHz internal oscillator. I also set the OSCCON to %01101000 which is supposed to use bits FOSC 0-2 to set the oscillator choice.

    I also tried defining the config1 register to set it up to use the external crystal: DEFINE CONFIG1 $EFC2 Maybe defining is not the right approach and I need to do some sort of assembly code snippet.

    I can select the 8MHz internal oscillator by setting OSCCON, so I don't know why it won't let me select an external crystal.

  7. #7
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: how to use external crystal?

    I wonder if #config/#endconfig is case sensitive like DEFINE? I know to say define osc 8 won't work but DEFINE OSC 8 does.

    The manual shows how to do some conditional compiles but the CONFIG item is in caps.
    Last edited by AvionicsMaster1; - 8th March 2015 at 01:03. Reason: clarification

  8. #8
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: how to use external crystal?

    Quote Originally Posted by AvionicsMaster1 View Post
    I wonder if #config/#endconfig is case sensitive like DEFINE? I know to say define osc 8 won't work but DEFINE OSC 8 does.

    The manual shows how to do some conditional compiles but the CONFIG item is in caps.
    Pretty sure define OSC 8 works too
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  9. #9
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: how to use external crystal?

    I'm sure there are many variations and I appreciate you adding one. My point was that the config statement

    #config
    __config1 _FOSC_HS & _WDTE_OFF & _PWRTE_ON & _MCLRE_OFF & _CP_OFF & _CPD_OFF & _BOREN_ON & _IESO_ON & _FCMEN_ON & _LVP_OFF & _WRT_OFF
    #endconfig
    doesn't look like the one in the manual. There are space at the beginning of the line __config and after each & that are not in the config statement above. I realize the config statement is ASM and therefore only the fuse is case sensitive but I thought it at least worth the effort.

    The manual also shows #CONFIG/#ENDCONFIG in caps. Just sayin'.

  10. #10
    Join Date
    May 2013
    Location
    australia
    Posts
    2,118


    Did you find this post helpful? Yes | No

    Default Re: how to use external crystal?

    for pbp3
    #CONFIG
    __config _CONFIG1, _HS_OSC & _WDT_ON & _PWRTE_OFF & _MCLRE_ON & _CP_OFF & _CPD_OFF & _BOR_ON & _IESO_ON & _FCMEN_ON & _LVP_OFF & _DEBUG_OFF
    __config _CONFIG2, _BOR40V & _WRT_OFF
    #ENDCONFIG


    for pbp 2.6
    ASM
    __config _CONFIG1, _HS_OSC & _WDT_OFF & _PWRTE_ON & _MCLRE_OFF & _CP_OFF & _CPD_OFF & _BOR_ON & _IESO_ON & _FCMEN_ON & _LVP_OFF & _DEBUG_OFF
    __config _CONFIG2, _BOR40V & _WRT_OFF
    ENDASM

    I tried #CONFIG/#ENDCONFIG and #config/#endconfig and both work therefore its not case sensitive


    this is just wrong for a PIC16F886
    #config
    __config1 _FOSC_HS & _WDTE_OFF & _PWRTE_ON & _MCLRE_OFF & _CP_OFF & _CPD_OFF & _BOREN_ON & _IESO_ON & _FCMEN_ON & _LVP_OFF & _WRT_OFF
    #endconfig
    ps
    I'm surprised it can compile
    Last edited by richard; - 9th March 2015 at 00:28. Reason: ps OPPS MAKE IT HS_OSC

  11. #11
    Join Date
    Oct 2014
    Posts
    17


    Did you find this post helpful? Yes | No

    Default Re: how to use external crystal?

    Thanks for this. I'm using pbp3 so I copied and pasted and it compiled. The program still doesn't seem to time correctly tho, which I describe below.
    -- How did you know this was the correct configuration? I've read many threads, tried many different suggestions including some that use @ DEVICE. I've looked in the manual and went by its examples. The manual comes close but it has a couple spaces before the CONFIG, which it shows in caps and yours is lowercase. This is what I get when I type it in:

    #CONFIG
    __config _CONFIG1, _HS_OSC & _WDT_OFF & _PWRTE_ON & _MCLRE_OFF & _CP_OFF & _CPD_OFF & _BOR_ON & _IESO_ON & _FCMEN_ON & _LVP_OFF & _DEBUG_OFF
    __config _CONFIG2, _BOR40V & _WRT_OFF
    #endconfig

    Note that CONFIG is uppercase and endconfig is lowercase, tho when I cut and pasted the code they were both uppercase. Go figure.

    How did you know your code would work? Trial and error? Is there a book you can recommend? I spent hours and hours getting nowhere.

    ----------------------------------

    To test the timing I toggle a bit and look at it with a scope. This is the code:
    portb.7 = 0
    PAUSEUS 100
    portb.7 = 1
    PAUSEUS 100
    portb.7 = 0
    pauseus 100
    portb.7 = 1
    PAUSEUS 100
    portb.7 = 0
    pauseus 100
    portb.7 = 1
    pauseus 100
    portb.7 = 0

    I have OSCCON set to select the external crystal and define the oscillator as 20:
    OSCCON = %01111110 'runs at 20 MHz set in configuration bits

    define OSC 20

    (again the word define is lowercase in pbp but copies and pastes as uppercase, tho I show it ias it appears on pbp)

    I expect
    portb.7 to toggle at 100usec high, 100usec low. Instead it is 250usec hi/lo. It's as if the pic is running at 8MHz but doing the timing calculations at 20MHz.

    What am I missing?

  12. #12
    Join Date
    May 2013
    Location
    australia
    Posts
    2,118


    Did you find this post helpful? Yes | No

    Default Re: how to use external crystal?

    in your pbp3 folders you have a directory "DEVICE_REFERENCE"
    there is a file in there for every pic chip that pbp can pgm , that file lists the correct config syntax for each chip
    or just download the meCONGIG.EXE utility from the melabs web site

    you should google "read modify write error" and search this forum for tips also


    portb.7 = 0
    PAUSEUS 100
    portb.7 = 1
    PAUSEUS 100
    portb.7 = 0
    is just asking for trouble @20mhz

    portb = 0
    PAUSEUS 100
    portb = 128
    PAUSEUS 100
    portb = 0

    is much more likely to work

  13. #13
    Join Date
    May 2013
    Location
    australia
    Posts
    2,118


    Did you find this post helpful? Yes | No

    Default Re: how to use external crystal?

    (again the word define is lowercase in pbp but copies and pastes as uppercase, tho I show it ias it appears on pbp)
    don't trust copy and paste for case sensitive defines

  14. #14
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: how to use external crystal?

    Quote Originally Posted by tbarania View Post

    (again the word define is lowercase in pbp but copies and pastes as uppercase, tho I show it ias it appears on pbp)


    What am I missing?
    Micro Code Studio is changing what you see, whereas what you copy paste is what you have. To fix this, open MCS and click the tab marked view, then click Editor Options,in Options click the tab Highlighter Options, at the bottom you will see Reserved Word Formatting, click the checkbox marked "DEFAULT" and click OK to close the box.
    Last edited by Archangel; - 9th March 2015 at 15:07.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  15. #15
    Join Date
    Oct 2014
    Posts
    17


    Did you find this post helpful? Yes | No

    Default Re: how to use external crystal?

    Thanks for your reply.

    1. Changing to portb =128 doesn't have an impact on anything.

    2. I don't seem to have the file "Device Reference". I'm running version 5.0.0.5 compiler version 3.0.7.4. I can't find that file on the disk either.

    3. When I change to "define OSC 8" instead of "OSC 20" then the timing works correctly. This would imply the pic is running on its internal 8MHz clock and is ignoring the OSCCON's setting to use the external crystal. It's as if the configuration "fuses" are just that, fuses. Once set they can't be reset. Or maybe the pic is defective.

    4. I tried a new pic but it gave the same results.

    5. MPLAB shows the correct configuration bits. HS oscillator is indeed selected.

    6. I changed OSCCON to 01101110 to set the internal oscillator to 4 MHz. It did indeed change the clock to 4 MHz as observed on the scope. Bit 0 of OSCCON is supposed to select the external clock source but it is not.

    7. On the off chance bit 0 of OSCCON should be a 1 to select the external crystal I changed it to a 1 but the result is the same. It's as if that bit is being ignored.


    This is what I have at the beginning of the code:


    #CONFIG
    __config _CONFIG1, _HS_OSC & _WDT_OFF & _PWRTE_ON & _MCLRE_OFF & _CP_OFF & _CPD_OFF & _BOR_ON & _IESO_ON & _FCMEN_ON & _LVP_OFF & _DEBUG_OFF
    __config _CONFIG2, _BOR40V & _WRT_OFF
    #ENDCONFIG




    OSCCON = %01101110 'runs at 20 MHz set in configuration bits

    DEFINE OSC 20 '20 MHz CLOCK FREQUENCY
    define HSER_RCSTA 90h 'enable the serial port receiver
    define HSER_TXSTA 24h 'set up the serial port, enable transmit for fast clock. TXSTA 00100100
    define HSER_BAUD 19200 'select the baud rate, run fast
    define HSER_CLROERR 1 'automatically clear the buffer overrun error

    define ADC_BITS 10 '10 bits
    define ADC_SAMPLEUS 50 '50usec sampling time
    DEFINE ADC_CLOCK 3 'set clock source to RC


    volts var word 'power supply volts
    amps var word 'power supply amps
    tempr var word 'temperature
    ticks var word 'radiation ticks, made up of timer 1's counter bytes
    command var byte 'the command byte
    action var byte 'the action byte, what to do
    stattus var byte 'contains the power supply status information
    dungate var byte 'status flag to indicate the count has been recorded & counter cleared


    GATE var portb.4 'label for the gate input
    TRIG var portc.0 'label for the ticks input
    TEMPRP VAR portc.1 'temperature pulsewidth input
    ONOFF var portc.3 'dc/dc on/off bit. On = 1
    beat var portb.7 'heartbeat monitor


    ADCON0 = %11000000 'set ADC clock to RC
    ADCON1 = %10000000 'right justify the result in ARESH:ADRESL registers. Vref=Vdd
    ANSEL = %00000011 'set AN0 and AN1 as analog
    ANSELH = %00000000 'set AN8 and higher to digital
    TRISA = %11111111 'set up port A as all inputs
    TRISB = %01111111 'set up port B as all inputs except for RB7 which is a heartbeat monitor output
    TRISC = %10110111 'set up port C where 1 = input

  16. #16
    Join Date
    Jan 2013
    Location
    Texas USA
    Posts
    229


    Did you find this post helpful? Yes | No

    Default Re: how to use external crystal?

    The "Device Reference" is not a file, it is a subdirectory under your PBP3 directory.

    If you installed PBP3 under your root directory then this would be "C:\PBP3\DEVICE_REFERENCE".
    If it is installed in the default location then it should be here: "C:\Program Files\PBP3\DEVICE_REFERENCE".
    The "file" would be the PIC device file located in the "DEVICE_REFERENCE" subdirectory with a ".INFO" extension.
    For the 16F886 this would be "PIC16F886.INFO"

    Also, just curious when you use MPLAB and the PICKSTART PRO programmer, after programming the PIC have you tried reading back from the PIC and checking if the config bits are set?
    Regards,
    TABSoft

  17. #17
    Join Date
    Oct 2014
    Posts
    17


    Did you find this post helpful? Yes | No

    Default Re: how to use external crystal?

    I don't have any "device.reference" subdirectory associated with pbp3. Maybe I need to uninstall and reinstall the software.

    When I read the device after programming it doesn't list the config memory location 2007. All the registers read 0 so not sure if osccon is being set correctly.


    Also, I get a ASM warning: found directive in column 1. (__config)
    When I indent 1 space it goes away. Not sure if that matters.


    I'm at a loss on what to try next. It seems like it is ignoring config and osccon and just operating at default conditions. I can select the internal oscillator frequency with osccon but I can 't get it to run in external crystal mode. I am in trouble if I can't get this to work.




    This is the beginning of the .asm listing if that gives any information: (also, how do I make a scrolling code window within this reply?)


    ; PICBASIC PRO(TM) Compiler 3.0.7.4, (c) 1998, 2013 microEngineering Labs, Inc. All Rights Reserved.
    MPASMWIN_USED EQU 1

    #define PBP_PATH C:\PBP3\




    NOLIST
    ifdef PM_USED
    LIST
    include 'M16F88x.INC' ; PM header
    XALL
    NOLIST
    else
    LIST
    LIST p = 16F886, r = dec, w = -302, c = 255
    INCLUDE "P16F886.INC" ; MPASM Header
    NOLIST
    endif
    LIST


    PBP_HARDWAREDEF macro
    endm


    __config _CONFIG1, _HS_OSC & _WDT_OFF & _PWRTE_ON & _MCLRE_OFF & _CP_OFF & _CPD_OFF & _BOR_ON & _IESO_ON & _FCMEN_ON & _LVP_OFF & _DEBUG_OFF
    __config _CONFIG2, _BOR40V & _WRT_OFF



    ; Define statements.
    ; C:\PBP3\DEVICES\PIC16F886.PBPINC 00172 DEFINE CODE_SIZE 8
    #define CODE_SIZE 8
    ; C:\USERS\TBARANIA\DOCUMENTS\MY DOCUMENTS\WEATHER STATION TOWER\7725_RADIATION SENSOR_GEIGER\GEIGER.PBP 00028 define OSC 20 '20 MHz CLOCK FREQUENCY
    #define OSC 20

  18. #18
    Join Date
    May 2013
    Location
    australia
    Posts
    2,118


    Did you find this post helpful? Yes | No

    Default Re: how to use external crystal?

    Also, I get a ASM warning: found directive in column 1. (__config)
    When I indent 1 space it goes away. Not sure if that matters.
    it matters mpasm tries to make anything sent directly to it (#config/ASM) in column 1 a label that's not what you want

    (1) space before __config and (1) space between __config and _config1 is whats required

    my bad ,it gets difficult to show formatting when the forum eats up the white space on your posts. I should remember ,config fuse syntax questions get asked about 1000 times per year

  19. #19
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: how to use external crystal?

    On page 100 of the manual it shows listing the config fuses in a different format than you've been using. Could be worth trying.

    In the above you've got #define OSC 20 and you need to get rid of the pound sign. I'm assuming that would be the same for the code-size statement also.

    You could also do most of the above with the CONFIG1=xxxxxxxx and CONFIG2=xxxxxxxx. Something else to try maybe.

    Just a few thoughts that may be horribly bad.

  20. #20
    Join Date
    Oct 2011
    Location
    Pennsylvania
    Posts
    13


    Did you find this post helpful? Yes | No

    Default Re: how to use external crystal?

    What happens if you turn _IESO_ON to _IESO_OFF ? In CONFIG of course. Is there a way to detect if the crystal oscillates?

  21. #21
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: how to use external crystal?

    I found this and thought it might help http://ww1.microchip.com/downloads/e...efinitions.pdf. It might be of interest.

  22. #22
    Join Date
    Oct 2014
    Posts
    17


    Did you find this post helpful? Yes | No

    Default Re: how to use external crystal?

    Thanks for everyone's suggestions. In the end nothing works. It might very well be that the configuration setting s are correct but unless OSCCON selects the external crystal as its source it doesn't matter. I can change the internal oscillator and the program works fine and responds to the changes. For example, if I select 4MHZ in OSCCON and set OSC 4 it works fine and the timing is correct. Same for 8MHz. It uses the internal oscillator regardless of the setting of OSCCON bit 0.

    I tried commenting out the #config part and used the Configure Bits in MPLAB to set the HS oscillator with the same negative results. On a different project that method worked using a PIC16F88, so I know it can and should work. I never got the config bits right on the F88 project but since I can set them in MPLAB it didn't matter.

    I've tried multiple ways of setting things per your suggestions but nothing works. I tried a new chip with no luck.

  23. #23
    Join Date
    May 2013
    Location
    australia
    Posts
    2,118


    Did you find this post helpful? Yes | No

    Default Re: how to use external crystal?

    have you tried loading the hex file into mplab and programing chip from mplab ?
    verify write from mplab - read of chip

    and

    and manually blank chip and verify blankness from mplab - read of chip

    mplab can be a real pig when it decides your chip can't be used with your programmer
    just try an pgm a pic12f1822 with a pickit2 using mplab (any version) it just refuses yet the pickit2 gui has no issues at all . it could send a man to atmel

  24. #24
    Join Date
    Oct 2014
    Posts
    17


    Did you find this post helpful? Yes | No

    Default Re: how to use external crystal?

    While driving home it finally dawned on me that this might be the problem, from the data sheet:

    "Fail-Safe Clock Monitor (FSCM) designed to detect a failure of the external clock source and switch detect a failure of the external clock source (LP,
    XT, HS, EC or RC modes) and switch
    automatically to the internal oscillator."


    It may be that the external crystal isn't firing up and that is detected as a failure and the internal clock is automatically switched to. I will investigate and report back. This would explain why it seems that OSCCON doesn't work right.

  25. #25
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: how to use external crystal?

    Quote Originally Posted by tbarania View Post
    While driving home it finally dawned on me that this might be the problem, from the data sheet:

    "Fail-Safe Clock Monitor (FSCM) designed to detect a failure of the external clock source and switch detect a failure of the external clock source (LP,
    XT, HS, EC or RC modes) and switch
    automatically to the internal oscillator."


    It may be that the external crystal isn't firing up and that is detected as a failure and the internal clock is automatically switched to. I will investigate and report back. This would explain why it seems that OSCCON doesn't work right.
    B I N G O That is where Pista1 & I were trying to take you
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  26. #26
    Join Date
    Aug 2003
    Location
    Australia
    Posts
    983


    Did you find this post helpful? Yes | No

    Default Re: how to use external crystal?

    I’ve been following this, but had nothing to add, so doing so silently.
    You said you have a scope you should see it with a 10x probe direct to the crystal.

    Any varicap across the crystal and you can change the speed of a pic output so a Human can see (maybe not 100us)
    There might be a value to cause it to oscillate at startup, but will affect the accuracy greatly if left in place.

    If you wet a finger and touch each crystal leg and get it to start you might just need a slightly different value for the parallel caps.

  27. #27
    Join Date
    Aug 2003
    Location
    Australia
    Posts
    983


    Did you find this post helpful? Yes | No

    Default Re: how to use external crystal?

    I don’t think you actually say you’re using caps, or even a bare crystal. TTL module is even a possibility,
    but if it’s a bare two pin crystal and assuming something like 22pF ceramics,
    if it’s a protoboard, I recently had an experience where the clock wouldn’t start because the ground
    pins of the caps were wound together, and the two disc ceramics face to face close together.

Similar Threads

  1. 1 x external crystal oscillator for multiple PICs
    By harryweb in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 27th November 2013, 14:05
  2. Help using this crystal?
    By Kamikaze47 in forum General
    Replies: 5
    Last Post: - 14th November 2009, 14:48
  3. 16f877A and tmr1 external crystal question
    By comwarrior in forum General
    Replies: 3
    Last Post: - 13th July 2009, 00:40
  4. Pic or Crystal
    By jetpr in forum General
    Replies: 2
    Last Post: - 16th September 2008, 01:56
  5. Crystal
    By leonel in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 12th April 2005, 16:05

Tags for this Thread

Posting Permissions

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