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: 2020-05-25
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Clock generator
Downloaded: 2782 times
Not followed.
License: MIT license
Clock Gen Click offers an ideal replacement for crystals, crystal oscillators, VCXOs, phase-locked loops (PLLs), and fanout buffers in cost-sensitive applications.
Do you want to subscribe in order to receive notifications regarding "Clock Gen click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Clock Gen click" changes.
Do you want to report abuse regarding "Clock Gen click".
Library Description
Library provides functions for communicating with device via I2C module, and many functions for user to easly set frequency of device.
Key functions:
void clockgen_generic_write ( uint8_t reg_adr, uint8_t write_data )
- Function for I2C write to deviceuint8_t clockgen_generic_read ( uint8_t reg_adr )
- Function for I2C read from devicevoid clockgen_set_frequency ( uint8_t clk_num, uint8_t pll_num, uint32_t freq )
- Function for setting frequency to devicevoid clockgen_set_params ( uint8_t clk_pll_num, clockgen_params_t *param_group )
- Function for setting parameters to specific clock or pllvoid clockgen_setup_multisyinth ( uint8_t clk_num, uint32_t divider, uint32_t num, uint32_t denom, uint8_t factor )
- Function for setting OMDvoid clockgen_setup_pll ( uint8_t pll, uint8_t mult, uint32_t num, uint32_t denom )
- Function for setting FMDExamples description
The application is composed of three sections :
void application_task ( )
{
clockgen_set_frequency( CLOCKGEN_CLOCK_0, CLOCKGEN_PLLA, 1 );
Delay_ms( 5000 );
clockgen_set_frequency( CLOCKGEN_CLOCK_0, CLOCKGEN_PLLA, 3 );
Delay_ms( 5000 );
clockgen_set_frequency( CLOCKGEN_CLOCK_0, CLOCKGEN_PLLA, 10 );
Delay_ms( 5000 );
clockgen_set_frequency( CLOCKGEN_CLOCK_0, CLOCKGEN_PLLA, 5 );
Delay_ms( 5000 );
}
The full application code, and ready to use projects can be found on our LibStock page.
Library Description
Library provides functions for communicating with device via I2C module, and many functions for user to easly set frequency of device.
Key functions:
void clockgen_generic_write ( uint8_t reg_adr, uint8_t write_data )
- Function for I2C write to deviceuint8_t clockgen_generic_read ( uint8_t reg_adr )
- Function for I2C read from devicevoid clockgen_set_frequency ( uint8_t clk_num, uint8_t pll_num, uint32_t freq )
- Function for setting frequency to devicevoid clockgen_set_params ( uint8_t clk_pll_num, clockgen_params_t *param_group )
- Function for setting parameters to specific clock or pllvoid clockgen_setup_multisyinth ( uint8_t clk_num, uint32_t divider, uint32_t num, uint32_t denom, uint8_t factor )
- Function for setting OMDvoid clockgen_setup_pll ( uint8_t pll, uint8_t mult, uint32_t num, uint32_t denom )
- Function for setting FMDExamples description
The application is composed of three sections :
void application_task ( )
{
clockgen_set_frequency( CLOCKGEN_CLOCK_0, CLOCKGEN_PLLA, 1 );
Delay_ms( 5000 );
clockgen_set_frequency( CLOCKGEN_CLOCK_0, CLOCKGEN_PLLA, 3 );
Delay_ms( 5000 );
clockgen_set_frequency( CLOCKGEN_CLOCK_0, CLOCKGEN_PLLA, 10 );
Delay_ms( 5000 );
clockgen_set_frequency( CLOCKGEN_CLOCK_0, CLOCKGEN_PLLA, 5 );
Delay_ms( 5000 );
}
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.
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.