MSP430 Encoder State Machine

This is a basic encoder state machine that can be used with the Texas Instruments EXP430G2553 Launchpad.

The program toggles LED2 (grn) when the encoder is rotated clockwise and toggles LED1 (red) when the encoder is rotated counterclockwise.

Additional code can be added to increment or decrement a timer register or other variable using an encoder. The code would be added where the if – else statements are located within the switch – case statement.

Example Here:


end post



Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.