clockgen2 2.0.0.0
|
Clock Gen 2 click is an accurate square wave generator that can generate a clock signal in the range from 260kHz to 66.6MHz.
We provide a library for the ClockGen2 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.
This library contains API for ClockGen2 Click driver.
- Initialization function.void clockgen2_cfg_setup ( clockgen2_cfg_t *cfg );
CLOCKGEN2_RETVAL clockgen2_init ( clockgen2_t *ctx, clockgen2_cfg_t *cfg );
void clockgen2_default_cfg ( clockgen2_t *ctx );
- Function used for enabling/disabling auto settings preservation.void clockgen2_output_enable ( clockgen2_t *ctx, uint8_t state );
void clockgen2_auto_setting_preserve ( clockgen2_t *ctx, uint8_t state );
void clockgen2_set_prescaler ( clockgen2_t *ctx, uint8_t val );
This application enables generation of square waved clock signal in range from 260 kHz to 66,6 MHz
The demo application is composed of two sections :
Driver initialization.
Changes the prescaler and enables/disables the clock output.
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:
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.