Hi guys
I am using a UNO board for learning.
Can you guys teach me how to output the system clk (16Mhz) please?
Thanks.
Hi guys
I am using a UNO board for learning.
Can you guys teach me how to output the system clk (16Mhz) please?
Thanks.
I don't think that is possible on a standard I/O pin, on the UNO. Why do you want to do that?
Need to use a Programmer and set a fuse bit.
It's bit 6 of the High Fuse byte:
CKOUT(3) Bit 6 Clock output 1 (unprogrammed)
(3). The CKOUT Fuse allows the system clock to be output on PORTB0. See ”Clock Output Buffer” on page 36 for
details.
9.9 Clock Output Buffer
The device can output the system clock on the CLKO pin. To enable the output, the CKOUT Fuse has to be
programmed. This mode is suitable when the chip clock is used to drive other circuits on the system. The clock
also will be output during reset, and the normal operation of I/O pin will be overridden when the fuse is
programmed. Any clock source, including the internal RC Oscillator, can be selected when the clock is output on
CLKO. If the System Clock Prescaler is used, it is the divided system clock that is output.
Change this in boards.txt, and reburn the bootloader:
From:
uno.bootloader.high_fuses=0xde
To:
uno.bootloader.high_fuses=0x9e
Thanks, CrossRoads! I learn something every day.
Clock Output Buffer
The device can output the system clock on the CLKO pin. To enable the output, the CKOUT
Fuse has to be programmed. This mode is suitable when the chip clock is used to drive other circuits
on the system. The clock also will be output during reset, and the normal operation of I/O
pin will be overridden when the fuse is programmed. Any clock source, including the internal RC
Oscillator, can be selected when the clock is output on CLKO. If the System Clock Prescaler is
used, it is the divided system clock that is output.CLKO, Divided System Clock: The divided system clock can be output on the PB0 pin. The
divided system clock will be output if the CKOUT Fuse is programmed, regardless of the
PORTB0 and DDB0 settings. It will also be output during reset.
You need to change the bit 6 of the Fuse Low Byte, to get the system clock output at CLKO which is Arduino Uno digital pin 8
CrossRoads:
Need to use a Programmer and set a fuse bit.It's bit 6 of the High Fuse byte:
CKOUT(3) Bit 6 Clock output 1 (unprogrammed)(3). The CKOUT Fuse allows the system clock to be output on PORTB0. See ”Clock Output Buffer” on page 36 for
details.9.9 Clock Output Buffer
The device can output the system clock on the CLKO pin. To enable the output, the CKOUT Fuse has to be
programmed. This mode is suitable when the chip clock is used to drive other circuits on the system. The clock
also will be output during reset, and the normal operation of I/O pin will be overridden when the fuse is
programmed. Any clock source, including the internal RC Oscillator, can be selected when the clock is output on
CLKO. If the System Clock Prescaler is used, it is the divided system clock that is output.
Thanks, can you tell me which mannul this is please? I think I need to read more about it since I am totally new to Arduino. Thanks.
BillHo:
You need to change the bit 6 of the Fuse Low Byte, to get the system clock output at CLKO which is Arduino Uno digital pin 8
gzanta:
Thanks, can you tell me which mannul this is please? I think I need to read more about it since I am totally new to Arduino. Thanks.
It is in the data sheet.
BillHo:
It is in the data sheet.
More accurate, the datasheet of the 328 microcontroller
CrossRoads:
Change this in boards.txt, and reburn the bootloader:
From:
uno.bootloader.high_fuses=0xde
To:
uno.bootloader.high_fuses=0x9e
thanks for the reply, can I ask one more question plz?
there are low_fuses and high_fuses, what is the differences between them please?
the low_fuses is set to 0xFF, and the high_fuses is 0xDE now.
gzanta:
thanks for the reply, can I ask one more question plz?there are low_fuses and high_fuses, what is the differences between them please?
the low_fuses is set to 0xFF, and the high_fuses is 0xDE now.
http://www.ladyada.net/learn/avr/fuses.html
.