How does it work?
Clock Gen 5 Click is based on the LTC6903, a low-power self-contained digital frequency source providing a precision frequency from 1kHz to 68MHz set through a 3-wire digital interface from Analog Devices. The LTC6903 contains an internal feedback loop that controls a high-frequency square wave (VCO) operating between 34MHz and 68MHz. It is also a resistor controlled oscillator that offers an integrated serial resistor DAC and a set of digital frequency dividers. The oscillator frequency is inversely proportional to the resistance of the DAC, where step size ranges between 0.05% and 0.1% of the frequency.
In the most frequency ranges, the output of the Clock Gen 5 Click is generated as a division of the higher internal clock frequency. This helps to minimize jitter and sub-harmonics at the output of the device. In the highest frequency ranges, the division ratio is reduced, which will result in greater cycle-to-cycle jitter as well as spurs at the internal sampling frequency. The output clock signals, available on the SMA connectors with an impedance of 50O labeled as MAIN and AUX CLOCK, before the output itself are primarily conducted through the TC7SZ125FU, a 3-state bus buffer allowing the LTC6903 to operate normally producing the required output.
Clock Gen 5 Click communicates with MCU using the 3-Wire SPI serial interface and operates at a clock frequency up to 20 MHz. The output signals are controlled by the output control bits MODE1 and MODE0, where the outputs can be disabled through these bits. When both output signals are disabled through the mode control bits, the internal oscillator is also disabled. The OE pin, routed on the RST pin of the mikroBUS™ socket, can also be used to asynchronously disable either output without shutting down the oscillator entirely.
This Click board™ is designed to operate with both 3.3V and 5V logic voltage levels selected via the VCC SEL jumper. It allows for both 3.3V and 5V capable MCUs to use the SPI communication lines properly. However, the Click board™ comes equipped with a library that contains functions and an example code that can be used, as a reference, for further development.
Specifications
Type |
Clock generator |
Applications |
Can be used for applications such as MCU clock source, clock source for a switched capacitor filter, or general replacement for a DAC/VCO combination |
On-board modules |
LTC6903 - a low-power self-contained digital frequency source providing a precision frequency from 1kHz to 68MHz set through a 3-wire digital interface from Analog Devices. |
Key Features |
Low power consumption, more reliable and vastly more versatile clocking solution, precision frequency from 1kHz to 68MHz, proprietary feedback loop, and more. |
Interface |
SPI |
Compatibility |
mikroBUS |
Click board size |
M (42.9 x 25.4 mm) |
Input Voltage |
3.3V or 5V |
Pinout diagram
This table shows how the pinout on Clock Gen 5 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Notes |
Pin |
|
Pin |
Notes |
---|
|
NC |
1 |
AN |
PWM |
16 |
NC |
|
Asynchronous Enable |
OE |
2 |
RST |
INT |
15 |
NC |
|
SPI Chip Select |
CS |
3 |
CS |
RX |
14 |
NC |
|
SPI Clock |
SCK |
4 |
SCK |
TX |
13 |
NC |
|
|
NC |
5 |
MISO |
SCL |
12 |
NC |
|
SPI Data IN |
SDI |
6 |
MOSI |
SDA |
11 |
NC |
|
Power Supply |
3.3V |
7 |
3.3V |
5V |
10 |
5V |
Power Supply |
Ground |
GND |
8 |
GND |
GND |
9 |
GND |
Ground |
Onboard settings and indicators
Label |
Name |
Default |
Description |
---|
LD1 |
PWR |
- |
Power LED Indicator |
JP1 |
VCC SEL |
Left |
Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
Clock Gen 5 Click electrical specifications
Description |
Min |
Typ |
Max |
Unit |
---|
Supply Voltage |
3.3 |
- |
5 |
V |
Frequency Rangee |
0.001 |
- |
68 |
MHz |
Operating Temperature Range |
-40 |
+25 |
+85 |
°C |
Software Support
We provide a library for the Clock Gen 5 Click on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on mikroE github account.
Library Description
The library covers all the necessary functions to control Clock Gen 5 Click board™. Library performs a standard SPI interface communication.
Key functions:
void clockgen5_out_enable ( uint8_t en_out )
- Enable output function.
void clockgen5_set_config ( uint8_t cfg )
- Set configuration function.
void clockgen5_set_freq ( float freq )
- Set frequency function.
Examples description
The application is composed of three sections :
- System Initialization - Initializes SPI, set RST and CS pin as outputs, begins to write log.
- Application Initialization - Initialization driver enables - SPI, set output configuration CLK + 180°, also write log.
- Application Task - (code snippet) This is an example that demonstrates the use of the Clock Gen 5 Click board™. In this example, we adjusts different frequencies every 3 sec. Results are being sent to the Usart Terminal where you can track their changes.
void application_task ( )
{
clockgen5_set_freq( 12000.0 );
mikrobus_logWrite( "-----------------------", _LOG_LINE );
mikrobus_logWrite( " 12.0 MHz ", _LOG_LINE );
Delay_ms( 3000 );
clockgen5_set_freq( 8000.0 );
mikrobus_logWrite( "-----------------------", _LOG_LINE );
mikrobus_logWrite( " 8.0 MHz ", _LOG_LINE );
Delay_ms( 3000 );
clockgen5_set_freq( 5500.0 );
mikrobus_logWrite( "-----------------------", _LOG_LINE );
mikrobus_logWrite( " 5.5 MHz ", _LOG_LINE );
Delay_ms( 3000 );
clockgen5_set_freq( 2700.0 );
mikrobus_logWrite( "-----------------------", _LOG_LINE );
mikrobus_logWrite( " 2.7 MHz ", _LOG_LINE );
Delay_ms( 3000 );
clockgen5_set_freq( 800.0 );
mikrobus_logWrite( "-----------------------", _LOG_LINE );
mikrobus_logWrite( " 0.8 MHz ", _LOG_LINE );
Delay_ms( 3000 );
clockgen5_set_freq( 200.0 );
mikrobus_logWrite( "-----------------------", _LOG_LINE );
mikrobus_logWrite( " 0.2 MHz ", _LOG_LINE );
Delay_ms( 3000 );
}
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
mikroSDK
This Click board™ is supported with mikroSDK - MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
For more information about mikroSDK, visit the official page.
Resources
Downloads