We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]
Rating:
Author: MIKROE
Last Updated: 2021-01-20
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Clock generator
Downloaded: 1801 times
Not followed.
License: MIT license
Clock Gen 5 Click is a compact add-on board that contains a digital programmable oscillator solution. This board features the LTC6903, a low-power self-contained digital frequency source providing a precision frequency from 1kHz to 68MHz set through a 3-wire SPI digital interface from Analog Devices.
Do you want to subscribe in order to receive notifications regarding "Clock Gen 5 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Clock Gen 5 click" changes.
Do you want to report abuse regarding "Clock Gen 5 click".
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 :
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 );
}
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.