Shop OBEX P1 Docs P2 Docs Learn Events
More Resonator Questions — Parallax Forums

More Resonator Questions

william chanwilliam chan Posts: 1,326
edited 2005-07-01 19:01 in General Discussion
Hi all geniuses,

Question 1. What happens if you set the FREQ directive to 10Mhz and install a 4Mhz resonator?
What is the actual oscillation frequency you will get?

Question 2. How to make a dual freq system by having a 50Mhz resonator that can be overidden by a 555 oscillator running at 100Khz connected to OSC1? This dual speed design is to save power when high speed is not required.

Thanks.

Comments

  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-06-29 15:00
    The FREQ directive only affects the oscillator speed of the SX-Key during RUN and similiar debugging modes (ie FREQ sets the programmable oscillator on the SX-Key) when the key is removed the FREQ directive has no effect on the SX's operating speed.

    It should be possible to provide two seperate oscillators for the SX, you would need some sort of multiplexor capable of handling the range of speeds (I think you may need to use an analog multiplexor, or a spdt switch if manual switching is acceptable).

    An alternative choice you may want to go with is a programmable oscillator, several companies such as www.icst.com offer them, including ones which can be set via a simple serial interface. I plan on using one of thier products for an experiment but I haven't used it yet, so I haven't aquired·"hands on" experience with thier products.
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2005-06-29 19:36
    You can find more information about the FREQ directive, and usage of resonators in the SX FAQ document. See the first "sticky" post in this section.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
  • william chanwilliam chan Posts: 1,326
    edited 2005-06-30 08:20
    Hi Paul,

    What if you have 2 resonators ( 50Mhz and 1Mhz ) connected in parallel.
    What freq will the SX be oscillating?

    Can I have a SPDT switch to switch between the 2 resonator to link to OSC1 while both
    resonators have the other pin permanently connected to OSC2?

    Alternatively can I use a solid state relay like the Clare TS117 for the switching?

    Thanks.

    William
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-06-30 16:07
    I wouldn't attempt to just stick two resonators in parallel, I have no clue what would result from such an arrangement. The Clare TS117 won't work because it is a SPST type SSR, you need a SPDT SSR capable of handling oscillations as fast as your speediest resonator. The Clare component does not state the maximum frequency it can transmit, but since it was designed for telecommunications (modems)·I would be skeptical of it being able to handle Mhz frequencies (especially 50 MHz).

    WRT the OSC2 line, I have successfully used a SPDT slide switch to select between an active TTL oscillator and the SX-Key OSC1 (nessesary because connectling the two simultaneously will damage the SX-Key, not applicable in your case since resonators are passive oscillators), but an active TTL oscillator does not use the OSC2 pin so it was a non-issue in the design. Guenther is more knowledgeable on this subject than I am, but I think the OSC2's can be connected without the need of a switch. My understanding is that the OSC2 pin is the drive pin for passive oscillators when the SX is running, the theory behind it is a little complex to explain briefly, but the OSC2 is "banged" with a step function, the resonator filters out all frequencies except its resonating frequency (the frequency listed on the resonator) and the filtered output is presented to the SX's OSC1 pin, so while both resonators will be "banged" only one of the resonators output are fed to the OSC1 pin which is what will determine the operating frequency of the SX.

    Post Edited (Paul Baker) : 6/30/2005 4:11:02 PM GMT
  • william chanwilliam chan Posts: 1,326
    edited 2005-07-01 13:14
    Dear Paul,

    You seem to be an expert on resonators and SSRs.
    Have you used the TS117 before?
    i have never heard of SSRs having a freq limit. Have you tested freq limits on SSRs before?
    I always think of them as a 0.3ohm wire when fully switched on.
    To emulate a SPDT SSR, I guess I may need the Clare LBA110 which has two SPST SSRs.

    I was hoping to let the SX decide it's own speed. A manual switch is just too retro...
    What is your best suggestion?

    Thanks.
    William
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-07-01 14:50
    I do not know for certain that the TS117 will not work, SSRs differ from standard relays in one critical way, SSRs rely on transistors to perform the switching operation, because of this you will have the same draw backs and limitations of using them including a natural low pass filter who's corner frequency is determined by the capacitance of the transistors (Cgs and Cgd on a Mosfet, or the capacitance of the base-emitter junction diode of a BJT). This capacitance affects how quickly the circuit can be charged and discharged, effecting the maximum frequency. Standard relays dont suffer from this problem to the same degree but you waste a lot of current activating a standard relay. There should be SSRs designed for higher speeds but I doubt a SSR designed for 56kHz data rate (even 10x oversample is only 560kHz) will be able to handle a 50MHz signal. I will take a look later to see if I can find one which definately supports 50Mhz signal.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-07-01 16:34
    Actually I cannot say whether an SSR would work, my understanding of the oscillator and how to expect the effect of·the oscillator's·transient response to a SSR being thrown into the mix is insufficient to help you. I simply don't understand it well enough to catagorically state a SSR will have no effect on the behavior of the oscillation circuit. I know this isn't what you want to hear, but while thinking it over, I realised we're in unfamiliar territory for me.

    Post Edited (Paul Baker) : 7/1/2005 4:37:18 PM GMT
  • pjvpjv Posts: 1,903
    edited 2005-07-01 18:04
    Hi William;

    Well, I am prepared to step up to the plate and state that what you are attempting (multi-speed selection using the SX oscillator) using ANY relay will categorically NOT work, PERIOD.

    The capacitance tolerance on the SX oscillator pins will be totally swamped by the addition of such a device. You need to find another way.

    That said, having external oscillator sources and selecting one or another source will work provided the clock signal remains contiguous and has no short (faster than 50 or 75 MHZ) "glitches" as that can upset the instruction pipeline and stall the proper operation.

    A continuous wave external variable frequency oscillator will work; this is what the SX key does when you connect it in "RUN" mode, and then carefully move the speed slider. Note that when the slider is moved quickly, there are discontinuities in the clock signal, and the SX will stall.

    To come up with a circuit to use the SX's external RC oscillator should be simple, but a switchable 50Mhz-to-slow is much more difficult, and will not work with a relay.

    Cheers,

    Peter (pjv)

    Post Edited (pjv) : 7/1/2005 6:07:10 PM GMT
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-07-01 19:01
    Thanks Peter, I had a feeling I was stepping into no-man's-land. I forgot about the effects of oscillator discontinuities on the operation of the SX. Ive looked a bit for a programmable oscillator capable of both 100kHz and 50MHz but didn't find one in my brief search.


    William, it has struck me that you may be approaching this issue from a hardware perspective when it can be more easily accomplished via software. Depending on the nature of the power up for the SX in its high speed mode, you can combine the SX's power-down mode with either MIWU or RTCC interrupts. The RTCC will wakeup the SX periodically so that it can do a few computations and optionally go back to sleep, the MIWU will wake up the SX when a pin change on a port B pin occurs at which point the SX can either go back to sleep or stay in its high powered mode. (The WDT interrupt can also work if you need the RTCC for another purpose, but you don't have as much control on the time period between wakeups). Using one of these methods will dramatically reduce the power consumption of the SX since the SX only consumes microamps during power down (<300uA w/o WDT, <400uA w/ WDT).

    One final complication to the hardware approach, the Oscillator setting for the SX would need to be HS1,HS2 or HS3 (so a 50MHz clock can be used), but this isn't the best choice for a 100kHz clock (likely the XT1 option) but this option is set via a fuse at program time and is not settable at run time.
Sign In or Register to comment.