Go Down

Topic: Reading the clock on an Uno (Read 1 time) previous topic - next topic


I'm new to Arduino, and logic analyzers.  I have an Uno and a Saleae Logic.  I can run the blink program and see the signal on pin 13 that cycles the LED.  But I'd like to see it in relation to the clock.  I've searched around, and though that the clock pin on the Uno is 7, but there is no signal on that pin.

So how do I read the clock signal too?



Easy answer: you can't.

Difficult answer: program the 'clock output' FUSE and grab the signal on the 'CLKO' pin (see the datasheet).

I also wonder how accurate that will be. Sampling a 16MHz signal with a logic analyzer that can only do 24Ms/s.
• Upload doesn't work? Do a loop-back test.
• There's absolutely NO excuse for not having an ISP!
• Your AVR needs a brain surgery? Use the online FUSE calculator.
My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...
• Microsoft is not the answer. It is the question, and the answer is NO!


Arduino has no build in clock, you could program a timer to give a pulse on a pin or do it manually

try this (not tested)
Code: [Select]

void setup()
 pinMode(13, OUTPUT);
 pinMode(7, OUTPUT);

int state = HIGH;

void loop()
 if (state == HIGH)
   state = LOW;
   state = HIGH;
 digitalWrite(7, state);
 digitalWrite(13, state);

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)


Thanks for the responses.

So I basically can only measure pins relative to each other, not to a baseline.  At least I know I wasn't missing something.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131