Welcome![Sign In][Sign Up]
Location:
Downloads SourceCode Other assembly language
Title: Encoder Download
 Description: Purpose: Contains example code to use a two-phase encoder with an ATmega2561. The encoder phases are connected to PORTF bits 0 & 1 and the switch is connected to PORTF bit 2. Timer 1 is configured to interrupt at 1024Hz. At startup, the encoder phases are read and stored as the current phase. The timer ISR reads the encoder phase and checks it against the old value. If the phase has changed the direction of rotation is obtained from a look-up table. This value is used to update the position variable.
 Downloaders recently: [More information of uploader centema]
File list (Check if you may need any files):
Encoder.c
    

CodeBus www.codebus.net