Question of timing

Is there an easy way of accessing the clock oscillator on an Atmega 168 Diecimila, please? Probing around the pins (even 9 & 10) produce no trace on a 20MHz scope, even at high gain. I'd prefer not to make non reversible changes to the hardware. Yes, I'm a noob! Thanks, Martin

Well you're looking on the correct pins and if your board is working at all (ie runs code) you should see the clock on those pins.

I am assuming that your oscilloscope, probe and Arduino board are known to be good and work properly and you have programmed the fuses in the ATmega168 correctly (or at lease have not changed them from the Arduino default!)

Crystal oscillator clock signals can be difficult things to observe because they are not typical logic level signals, usually more of a distorted sine wave than a square wave.

Have you connected the oscilloscope probe ground to the board? The usb connector body, side tab of the DC socket or a small piece of wire in the GND pin in the power socket will do, and you'll get a much better measurement if you do.

What is the input impedance of your oscilloscope probe? Anything less than 10 MOhm might cause problems by changing the load on the amplifier in the oscillator which could cause it to stop. If the board keeps working properly while you probe for the clock, then this is not the problem.

What horizontal resolution/time base have you set the oscilloscope to? Somewhere in the order of 50 to 100 nsec per division is what you'll need.

What vertical resolution/voltage have you set the oscilloscope to? Around 2 to 5 V per division is what you'll need. You should see the clock on both sides of the crystal Q2, one side (pin 10) will be larger and squarer than the other. This is the output pin driving the crystal, the other pin (pin 9) is the input to the ATmega168.

Next is the trigger settings, which are more difficult to describe how to set without knowing what kind of scope you have - analogue or digital? - available trigger modes?

The basic idea is to set the trigger level to somewhere around the middle of where you expect the signal to be. In this case I'd expect something around 2.5V so start there and move it up or down a bit to see if you get anything. You want to set to either positive or negative edge triggering and starting on Auto mode might make it easier to begin with. Turn off any delayed sweep too.

Once you've found the clock, if you want to use it to drive something else you could try and take it from pin 10, the driven side of the crystal. Take care to not load the crystal too much (see above), use only high impedances and you may want to use an inverter IC (or two to get a signal the same as the clock) to buffer the signal and square it up again. But first make sure the voltage swing you see on pin 10 is enough to drive any buffer logic (ie swings below 0.8V and above 2.0V, TTL)

Another option, as described on page 34 of the ATmega168 , is to output the clock on the CLKO pin (pin 14) but this requires changing fuses.

Could the relatively high capacitive load of a passive scope probe be the problem?

It must be the probes, as suggested by CMiYC. I got Arduino to fade a led on board pin 9 and can witness the PWM quite clearly on the 'scope (old Hameg 203 analogue). When I apply probe to pin 9 or 10 (IC) the 168 stops working. Do you think I could successfully drive a CMOS 74HC390 via a capacitor without conditioning the signal first?

Sukkitinsee, I suppose! :)

Grateful thanks letaage, for your extended advice. It was indeed the probe. I can now see the trace though it's at the limit of the scope's performance and much attenuated. I can proceed now. Thanks again! ;)