Shop OBEX P1 Docs P2 Docs Learn Events
serious counter issues — Parallax Forums

serious counter issues

aznyazny Posts: 1
edited 2007-04-13 07:47 in Propeller 1
Hi;

we are encountering a potentially serious counter issue. We have built a standard, run of the mill 8 MHz oscillator with the output stage being a simple '04 inverter to convert the sinewave to a square wave. The oscillator works and is stable to +/-10Hz drift over a 10 minute period. We have verified this on a standard HP counter. We have also confirmed this using an ATmega128 development board as well. However, when hooking up the same oscillator to the propeller board we get a continously increasing drift-- so far, 200Hz for 10min and it does not seem to level off to any asymptotic value, it just keeps going and going and going. we then hook the oscillator back to the HP or ATmega and viola!! back to steady +/-10HZ drift. Things we've checked already and seem to be working fine:

(1) square wave output with sharp edges (<50mV overshoot ringing)
(2) 2.5V amplitude tied to MAX60XX 2.5V reference ( we originally had it to a 3V reference and thought maybe there wasn't enough head room between the propellers 3.3V and oscillators 3V)
(3) output impedance looking into inverter ~1-3 Ohms
(4) use 1K series resistor on output of inverter to limit current to microprocessor
(5) oscillator has on-board 1uF decoupling caps right at power input to IC's

any ideas as to what to look for, test, program??

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-04-12 21:53
    Where did you hook it to the Propeller? ... What pin?

    Are you trying to use this oscillator as the system clock or is it connected to an I/O pin. Could you be running software that makes that pin an output?

    Post Edited (Mike Green) : 4/12/2007 9:59:28 PM GMT
  • cgraceycgracey Posts: 14,133
    edited 2007-04-12 22:00
    Azny,

    It sounds like you are using the Propeller to measure the frequency of your 8MHz oscillator, which is known to be very stable. You are seeing measurement drift over time, which seems to be the result of the Propeller's sense of time slowly changing. Is this correct? Could you post the Propeller code which is taking the measurement? Maybe it's not error-tight. If I had to guess what is happening, it would seem that the Propeller's crystal frequency is drifting slowly, once you start the Propeller. I don't know why this would happen, but all timing (assuming you're using a crystal) is going to be derived from that reference. The PLL (if you are using it) will exactly track the crystal's frequency and phase. So, please explain a little more and I will try to solve your problem. Thanks.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Chip Gracey
    Parallax, Inc.

    Post Edited (Chip Gracey (Parallax)) : 4/12/2007 10:08:11 PM GMT
  • cgraceycgracey Posts: 14,133
    edited 2007-04-12 22:36
    Azny,

    Perhaps the problem is due to the Propeller's built-in·crystal loading caps which are more sensitive to temperature than external caps would be.

    When you start up the Propeller, the die slowly heats up a little bit and this alters the effective C value of those loading caps, which could be·effecting·a slight frequency shift. One definitive test·would be to slightly heat or cool the Propeller while it's running your measurement·program. You could just touch your finger to it, or blow on it, to effect a small temperature change. If you see a sudden change in measurement, as a result, this is probably the issue. A change of 200Hz at 8MHz is only a 25ppm drift, though, and for most applications, this is trivial and to be accommodated. Afterall, your 8MHz crystal has an initial error that is at least·this. I think as soon as you move your 8MHz oscillator into an application where you don't have a steady ambient temperature and power supply, you could see the same things happening with it. Nonetheless, you could still select XTAL2 (lowest internal load-cap selection)·and use external C0G-type loading caps to reduce the effective overal temperature coefficient. You would also need to place a 1K resistor between XO and your crystal to cut the drive down. I hope this helps.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Chip Gracey
    Parallax, Inc.

    Post Edited (Chip Gracey (Parallax)) : 4/12/2007 11:15:18 PM GMT
  • SkogsgurraSkogsgurra Posts: 231
    edited 2007-04-13 06:50
    For extreme accuracy, I would use an external crystal oscillator. Possibly a temperature compensated or even stabilized one.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    2aak4z7.jpg
  • SkogsgurraSkogsgurra Posts: 231
    edited 2007-04-13 06:53
    Hey! Why do I get this picture in the post? I have shown it once - and now it seems to have turned sticky. How do I put it in the left field? Like eveyone else have?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    2aak4z7.jpg
  • Beau SchwabeBeau Schwabe Posts: 6,559
    edited 2007-04-13 07:09
    Skogsgurra,

    Under your "Edit Profile" tab remove your image from your signature.

    Under your "Edit Options" tab insert your image under the Avatar.

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

    IC Layout Engineer
    Parallax, Inc.
  • OzStampOzStamp Posts: 377
    edited 2007-04-13 07:47
    Hi

    Have you considered trying an external oscilator block.
    Like one of those units that hs the same footprint as a 8 pin dip socket

    Connect to the X1 terminal only.

    Rgds

    Ronald Nollet·· Australia
Sign In or Register to comment.