TOP Contributors

  1. MIKROE (2758 codes)
  2. Alcides Ramos (374 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (139201 times)
  2. FAT32 Library (71716 times)
  3. Network Ethernet Library (57091 times)
  4. USB Device Library (47415 times)
  5. Network WiFi Library (43035 times)
  6. FT800 Library (42397 times)
  7. GSM click (29819 times)
  8. mikroSDK (27978 times)
  9. PID Library (26874 times)
  10. microSD click (26168 times)
Libstock prefers package manager

Package Manager

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]

< Back
mikroSDK Library

Clock Gen click

Rating:

5

Author: MIKROE

Last Updated: 2020-05-25

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Clock generator

Downloaded: 2800 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.

No Abuse Reported

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".

  • mikroSDK Library 2.0.0.0
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

Clock Gen Click

Clock Gen Click

Native view of the Clock Gen Click board.

View full image
Clock Gen Click

Clock Gen Click

Front and back view of the Clock Gen Click board.

View full image

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 device
  • uint8_t clockgen_generic_read ( uint8_t reg_adr ) - Function for I2C read from device
  • void clockgen_set_frequency ( uint8_t clk_num, uint8_t pll_num, uint32_t freq ) - Function for setting frequency to device
  • void clockgen_set_params ( uint8_t clk_pll_num, clockgen_params_t *param_group ) - Function for setting parameters to specific clock or pll
  • void clockgen_setup_multisyinth ( uint8_t clk_num, uint32_t divider, uint32_t num, uint32_t denom, uint8_t factor ) - Function for setting OMD
  • void clockgen_setup_pll ( uint8_t pll, uint8_t mult, uint32_t num, uint32_t denom ) - Function for setting FMD

Examples description

The application is composed of three sections :

  • System Initialization - Initialization of I2C module
  • Application Initialization - Configures device to default function that enables clock 0 and disables all others
  • Application Task - Changes 4 different frequency i span of 5 seconds
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 device
  • uint8_t clockgen_generic_read ( uint8_t reg_adr ) - Function for I2C read from device
  • void clockgen_set_frequency ( uint8_t clk_num, uint8_t pll_num, uint32_t freq ) - Function for setting frequency to device
  • void clockgen_set_params ( uint8_t clk_pll_num, clockgen_params_t *param_group ) - Function for setting parameters to specific clock or pll
  • void clockgen_setup_multisyinth ( uint8_t clk_num, uint32_t divider, uint32_t num, uint32_t denom, uint8_t factor ) - Function for setting OMD
  • void clockgen_setup_pll ( uint8_t pll, uint8_t mult, uint32_t num, uint32_t denom ) - Function for setting FMD

Examples description

The application is composed of three sections :

  • System Initialization - Initialization of I2C module
  • Application Initialization - Configures device to default function that enables clock 0 and disables all others
  • Application Task - Changes 4 different frequency i span of 5 seconds
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:

  • I2C
  • UART

Additional notes and informations

Depending on the development board you are using, you may need USB UART clickUSB 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:

  • I2C
  • UART

Additional notes and informations

Depending on the development board you are using, you may need USB UART clickUSB 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.

ALSO FROM THIS AUTHOR

Ambient 2 click

5

This program demonstrates usage of the Ambient 2 click. It establishes I2C bus communication with OPT3001 chip, and writes ambient data in percentage on TFT display.

[Learn More]

TempHum 3 Click

0

Temp&Hum 3 Click is a smart environmental temperature and humidity sensor Click board™, packed with features which allow easy and simple integration into any design that requires accurate and reliable humidity and temperature measurements

[Learn More]

H-Bridge 3 Click

0

H-Bridge 3 Click is designed for the control of small DC motors and inductive loads, it features TLE9201SG a general purpose 6A H-Bridge perfectly suited for industrial and automotive applications. This IC meets the harsh automotive environmental conditions and it is qualified in accordance with the AEC-Q100 standard, also has set of features such as the short circuit and over-temperature protection, under-voltage protection, detailed SPI diagnosis or simple error flag and fully 3.3/5.5V compatible logic inputs.

[Learn More]