Defines | Functions
encoder.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define ENC_COUNTA   TCNT0
#define ENC_COUNTB   TCNT3
#define INDEX   BITREAD(PORTB,0)

Functions

void encoder_init (void)
int16_t encoder_read ()
void encoder_reset ()

Detailed Description

Header for encoder setup and position acquisition. Contains gray code converter code from Peter Dannegger from Mikrocontroller.net, for glitchless encoder position evaluation

Version:
1.0
Author:
Julio Sagardoy

Definition in file encoder.h.


Define Documentation

#define ENC_COUNTA   TCNT0

Definition at line 20 of file encoder.h.

#define ENC_COUNTB   TCNT3

Definition at line 21 of file encoder.h.

#define INDEX   BITREAD(PORTB,0)

Definition at line 22 of file encoder.h.


Function Documentation

void encoder_init ( void  )

Encoder init routine.

Definition at line 77 of file encoder.c.

int16_t encoder_read ( )

Returns actual value in the counter.

Definition at line 47 of file encoder.c.

void encoder_reset ( )

Resets encoder counter to 0. Mandatory to run this after calibration, so it counts from 0.

Definition at line 38 of file encoder.c.



cob_3d_mapping_demonstrator
Author(s): Georg Arbeiter
autogenerated on Wed Aug 26 2015 11:03:46