Shop OBEX P1 Docs P2 Docs Learn Events
What's the real deal with IFBD? — Parallax Forums

What's the real deal with IFBD?

ZootZoot Posts: 2,227
edited 2008-09-05 03:03 in General Discussion
I was troubleshooting a project that ran fine with internal 4MHZ osc, OK with 20MHZ, and failed with 50MHZ (likely culprit -- vicious noise on osc./supply circuitry from a motor H-bridge).

In working with different osc. layouts, settings, etc. I realized I had never contemplated IFBD. On all my own SX projects I usually put a 10K resistor between OSC1 and OSC2 and have no trouble at 20MHZ or 50MHZ.

But in reading over the datasheet, it would seem that if I do use the external resistor than I should use the IFBD device setting? Is that right? Does it really matter? I *never* see IFBD in posted code (that I can remember) in projects from JonnyMac and others.

Is this also why there is no external OSC1/OSC2 resistor on pre-fab boards like the SX Protoboard? Because the internal feedback resistor is presumed to be in use?

??

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST

1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php

Comments

  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2008-09-04 22:33
    Zoot,
    ·
    A resistor placed between XO amd XI, in combination with the internal pin capacitance, forms a low-pass filter. This filter slows down the clock edges, which significantly reduces voltage-droop and ground bounce on the power supply rail and helps to reduce jitter.· At 50MHz (10nS pulses) there may be enough attenuation from the low-pass filter that is formed that the crystal does not have enough energy to continue oscillating.· It is possible for a crystal oscillator to operate without an external resistor or with the IFBD turned off, but the oscillator will not be as stable.
    ·
    My guess is that parasitic board capacitance is your culprit more than the IFBD resistance (approximately 1 Meg) ... A 10k resistor seems a little low to me.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • ZootZoot Posts: 2,227
    edited 2008-09-04 22:57
    In this particular case, I solved my osc. problems by filtering all the noise from the motors, at the motors. But the whole thing had led me to triple-check my osc. setup, and that's when I read up on IFBD.... so to state another version of my question:

    - *if* I have an external resistor between OSC1 and OSC2 (I always do), *should* I turn off the internal resistor, or does it not matter?

    - if 10k sounds low, what sounds good? And then why does Jon publish so many SX schematics with a 10K resistor there for 20MHZ or 50MHZ projects? smile.gif And what about the datasheet which is pretty clear on the nominal value.

    - but now that I read various docs more closely, it appears that the internal resistor, if enabled, is only applicable to the internal RC oscillator (i.e., you could use the internal RC clock, but still provide your own external fb resistor). So I think that answers that. Note that the SX-Key manual does not state this explicitly, but the SX28 datasheet, anyway, does.
    SX Key Manual said...
    IFBD Disables the internal feedback resistor, i.e. an external feedback resistor is
    required between the OSC1 and OSC2 pins internal feedback resistor enabled
    SX 28 datasheet said...
    IFBD Internal crystal/resonator oscillator feedback resistor (1 MΩ:
    0 = disabled
    Internal feedback resistor disable (external feedback required)
    1= enabled Internal feedback resistor enabled (valid when IRC = 1)
    SX 28 datasheet said...

    Table 9-2: External Component Selection for Murata Ceramic Resonators (Vdd = 5.0 V)
    FOSC2:FOSC0 Frequency Resonator Part Number C1 C2 RF RS
    011 4 MHz CSA4.00MG 30 pF 1 MΩ 0 Ω
    011 4 MHz CST4.00MGW Internal (30 pF) Internal (30 pF) 1 MΩ 0 Ω
    011 4 MHz CSTCC4.00G0H6 Internal (47 pF) Internal (47 pF) 1 MΩ 0 Ω
    011 8 MHz CSA8.00MTZ 30 pF 30 pF 1 MΩ 0 Ω
    011 8 MHz CST8.00MTW Internal (30 pF) Internal (30 pF) 1 MΩ 0 Ω
    011 8 MHz CSTCC8.00MG0H6 Internal (47 pF) Internal (47 pF) 1 MΩ 0 Ω
    011 20 MHz CSA20.00MXZ040 5 pF 5 pF 1 MΩ 0 Ω
    011 20 MHz CST20.00MXW0H1 Internal (5 pF) Internal (5 pF) 1 MΩ 0 Ω
    011 20 MHz CSACV20.00MXJ040 5 pF 5 pF 22 kΩ 0 Ω
    011 20 MHz CSTCV20.00MXJ0H1 Internal (5 pF) Internal (5 pF) 22 kΩ 0 Ω
    100 33 MHz CSA33.00MXJ040 5 pF 5 pF 1 MΩ 0 Ω
    100 33 MHz CST33.00MXW040 Internal (5 pF) Internal (5 pF) 1 MΩ 0 Ω
    100 33 MHz CSACV33.00MXJ040 5 pF 5 pF 1 MΩ 0 Ω
    100 33 MHz CSTCV33.00MXJ040 Internal (15 pF) Internal (15 pF) 1 MΩ 0 Ω
    101 50 MHz CSA50.00MXZ040 15 pF 15 pF 10 kΩ 0 Ω
    101 50 MHz CST50.00MXW0H3 Internal (15 pF) Internal (15 pF) 10 kΩ 0 Ω
    101 50 MHz CSACV50.00MXJ040 15 pF 15 pF 10 kΩ 0 Ω
    101 50 MHz CSTCV50.00MXJ0H3 Internal (15 pF) Internal (15 pF) 10 kΩ 0 Ω
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php
  • JonnyMacJonnyMac Posts: 9,215
    edited 2008-09-04 23:17
    Listen, I am not that smart and have seen others (who are much smarter) use 10K -- it has always worked for me so I have not looked into any further. I've built lots of SX-based boards, usually deigned for 50MHz, and nary a problem with any one of them.
  • ZootZoot Posts: 2,227
    edited 2008-09-04 23:20
    JonnyMac said...
    I am not that smart

    Modesty becomes you, but, alas, you are smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2008-09-04 23:23
    Zoot,

    "- *if* I have an external resistor between OSC1 and OSC2 (I always do), *should* I turn off the internal resistor, or does it not matter?"

    You effectively place a 1Meg resistor in Parallel with your external resistor by leaving the IFBD option turned "on".

    As far as 10K or any other value... this largely depends on the IC that you use.· The frequency is also a factor (10MHz,20MHz, 50MHz, etc.) 10K may be just fine at 50MHz.




    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.

    Post Edited (Beau Schwabe (Parallax)) : 9/4/2008 11:30:39 PM GMT
  • william chanwilliam chan Posts: 1,326
    edited 2008-09-05 02:27
    How to switch on IFBD?

    Is it

    device ifbd

    ?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.fd.com.my
    www.mercedes.com.my
  • ZootZoot Posts: 2,227
    edited 2008-09-05 03:03
    It's always on by default. Directive is IFBD in the device line to turn it OFF. But I don't think you'd want to unless you are using the internal RC oscillator AND you want to use your own external feedback resistor between OSC1 and OSC2.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php
Sign In or Register to comment.