pll  2.0.0.0
Main Page

PLL click

PLL click is a frequency multiplier which uses the Phase-Locked Loop (PLL) techniques to provide a high-frequency clock output from a cheap, standard fundamental mode crystal oscillator.

click Product page


Click library

  • Author : MikroE Team
  • Date : Dec 2019.
  • Type : GPIO type

Software Support

We provide a library for the Pll Click 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 form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.

Library Description

This library contains API for Pll Click driver.

Standard key functions :

Example key functions :

Examples Description

This app sets PLL signals.

The demo application is composed of two sections :

Application Init

Initializes device.

void application_init ( void )
{
log_cfg_t log_cfg;
pll_cfg_t cfg;
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, "---- Application Init ----" );
// Click initialization.
pll_cfg_setup( &cfg );
PLL_MAP_MIKROBUS( cfg, MIKROBUS_1 );
pll_init( &pll, &cfg );
}

Application Task

Every 2 seconds, the PLL increases the input clock from min (x2) to max (x8) level.

void application_task ( void )
{
log_printf( &logger, " PLL level: x2\r\n\n" );
pll_set_pll_2x( &pll );
Delay_ms( 2000 );
log_printf( &logger, " PLL level: x3\r\n\n" );
pll_set_pll_3x( &pll );
Delay_ms( 2000 );
log_printf( &logger, " PLL level: x3.125\r\n\n" );
Delay_ms( 2000 );
log_printf( &logger, " PLL level: x4\r\n\n" );
pll_set_pll_4x( &pll );
Delay_ms( 2000 );
log_printf( &logger, " PLL level: x5\r\n\n" );
pll_set_pll_5x( &pll );
Delay_ms( 2000 );
log_printf( &logger, " PLL level: x5.3125\r\n\n" );
Delay_ms( 2000 );
log_printf( &logger, " PLL level: x6\r\n\n" );
pll_set_pll_6x( &pll );
Delay_ms( 2000 );
log_printf( &logger, " PLL level: x6.25\r\n\n" );
Delay_ms( 2000 );
log_printf( &logger, " PLL level: x8\r\n\n" );
pll_set_pll_8x( &pll );
Delay_ms( 2000 );
}

The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.

Other mikroE Libraries used in the example:

  • MikroSDK.Board
  • MikroSDK.Log
  • Click.Pll

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.


pll_set_pll_4x
void pll_set_pll_4x(pll_t *ctx)
Functions for settings PLL x4.
pll_set_pll_5_3125x
void pll_set_pll_5_3125x(pll_t *ctx)
Functions for settings PLL clock x5.3125.
pll_set_pll_6_25x
void pll_set_pll_6_25x(pll_t *ctx)
Functions for settings PLL clock x6.25.
pll_set_pll_8x
void pll_set_pll_8x(pll_t *ctx)
Functions for settings PLL x6.
PLL_CLOCK_ENABLE
#define PLL_CLOCK_ENABLE
Definition: pll.h:79
pll_set_pll_2x
void pll_set_pll_2x(pll_t *ctx)
Functions for settings PLL x2.
pll_set_clock_output
void pll_set_clock_output(pll_t *ctx, uint8_t mode)
Functions for settings clock output.
application_task
void application_task(void)
Definition: main.c:57
pll_set_pll_5x
void pll_set_pll_5x(pll_t *ctx)
Functions for settings PLL x5.
pll_cfg_t
Click configuration structure definition.
Definition: pll.h:108
pll_set_pll_3_125x
void pll_set_pll_3_125x(pll_t *ctx)
Functions for settings PLL clock x3.125.
pll_init
err_t pll_init(pll_t *ctx, pll_cfg_t *cfg)
Initialization function.
PLL_MAP_MIKROBUS
#define PLL_MAP_MIKROBUS(cfg, mikrobus)
Definition: pll.h:61
pll_t
Click ctx object definition.
Definition: pll.h:94
pll_set_pll_3x
void pll_set_pll_3x(pll_t *ctx)
Functions for settings PLL x3.
pll_set_pll_6x
void pll_set_pll_6x(pll_t *ctx)
Functions for settings PLL x6.
application_init
void application_init(void)
Definition: main.c:32
pll_cfg_setup
void pll_cfg_setup(pll_cfg_t *cfg)
Config Object Initialization function.