counter  2.0.0.0
Functions
main.c File Reference

Counter Click example. More...

#include "board.h"
#include "log.h"
#include "counter.h"

Functions

void application_init (void)
 
void application_task (void)
 
void main (void)
 

Detailed Description

Counter Click example.

Description

This application measures the speed and the position of the DC motor shafts.

The demo application is composed of two sections :

Application Init

Initializes driver and configures the click board.

Application Task

Reads data from the CNTR register and calculates the speed of the motor in Rad/s. All data is being displayed on the USB UART terminal where you can track their changes. The CNTR is a software configurable 8, 16, 24 or 32-bit up/down counter which counts the up/down pulses resulting from the quadrature clocks applied at the A and B inputs, or alternatively, in non-quadrature mode, pulses applied at the A input.

NOTE

An appropriate motor with optical encoder needs to be connected to the click board.

Author
MikroE Team

Function Documentation

◆ application_init()

void application_init ( void  )

◆ application_task()

void application_task ( void  )

◆ main()

void main ( void  )