jackchaos Posted November 25, 2006 Report Share Posted November 25, 2006 All my pots use the AIN and I've decided to use 1 encoder as data wheel next to my LCD.I looked at TK's clockbox example to see how he configured the application for an encoder and the only reference I found was this in main.c:// set encoder speed mode of datawheel MIOS_ENC_SpeedSet(0, DATAWHEEL_SPEED_MODE, DATAWHEEL_SPEED_DIVIDER); Is this all I need? Setting the speed for the encoder (0)? Also, I'm using a lot of buttons and I'm halfway through my second DINX4. It looks like all I have to do is wire the encoder to 2 pins like shown in this schematic (http://www.ucapps.de/mbhp/mbhp_dinx4_16enc.pdf), and identify its enc enumeration like so: |-----------------------------------| | ..... ..... ..... .oo.. | | | | | | ..... ..... ..... ..... | |-----------------------------------| On the second DINX4 this would be ENC 63 (the last one)?P.S. My project is based on the C skeleton. Quote Link to comment Share on other sites More sharing options...
mess Posted November 26, 2006 Report Share Posted November 26, 2006 Hiyou also need to add this encoder in mios_tables.inc (in the mios_wrapper subdir) _MIOS_ENC_PIN_TABLE MIOS_ENC_PIN_TABLE ;; encoders 1-16 ;; SR Pin Mode ENC_ENTRY 8, 6, MIOS_ENC_MODE_DETENTED2 ; datawheel Since you only have one encoder this encoder has number 0 (first entry in the table)Did you define DATAWHEEL_SPEED_MODE and DATAWHEEL_SPEED_DIVIDER somewhere?in the clockbox example these are defined in main.h but this file isn't included in the skeletonMichaël Quote Link to comment Share on other sites More sharing options...
jackchaos Posted November 26, 2006 Author Report Share Posted November 26, 2006 messThis explains it perfectly, thanks.I never considered these files to be editable... in fact, I never looked at them.Did you define DATAWHEEL_SPEED_MODE and DATAWHEEL_SPEED_DIVIDER somewhere?Yes. I saw that too and just didn't include it in my 1st post. Quote Link to comment Share on other sites More sharing options...
mess Posted November 27, 2006 Report Share Posted November 27, 2006 I never considered these files to be editable... in fact, I never looked at them.When I first tried to use an encoder I made the same error :) Quote Link to comment Share on other sites More sharing options...
TK. Posted November 27, 2006 Report Share Posted November 27, 2006 The C examples provide some additional infos, how to configure encoders:http://www.ucapps.de/mios_c.htmlBest Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.