EMRFD Message Archive 14507

Message Date From Subject
14507 2018-01-14 10:55:15 Rod KM6SN interrupt driven encoder software for ATMEGA328
Hi All,

Some time ago I wrote software for an ATMEGA328 to run a mechanical
encoder using interrupts. I have used the software successfully on over
6 projects, and it works like a dream.

I recently published the code on github, at

https://github.com/rodKM6SN/encoder-interrupt


The code will run on an ATMEGA328 with and I2C 1602 LCD; of course, it
can be modified to run a parallel LCD.

I suggest NOT moving the encoder sin and cos from their respective I/O
registers.

There is a readme.docx that gives an overview. There is a crucial update
to that file, but for some reason I do not understand, I have not been
able to update the readme.docx file on github.

A copy of the updated readme.docx file is attached here (it adds a
comment about 100nf capacitors on the encoder leads)

The code is a hacked subset of a large project, so there are "leftovers"
therein that are not important.

Rod KM6SN



[Non-text portions of this message have been removed]