counter 2.0.0.0
|
Counter Click example. More...
Functions | |
void | application_init (void) |
void | application_task (void) |
int | main (void) |
Counter Click example.
This application measures the speed and the position of the DC motor shafts.
The demo application is composed of two sections :
Initializes driver and configures the click board.
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.
An appropriate motor with optical encoder needs to be connected to the click board.
void application_init | ( | void | ) |
Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG
void application_task | ( | void | ) |
int main | ( | void | ) |