Jump to content

Encoder test app problem


Recommended Posts

My advice: don't use MPLAB as it makes everything more complicated than required ;-)

The main.asm file can be assembled directly with MPASM:

MPLAB IDE/MCHIP_Tools/mpasmwin.exe

Just click on this program (make a shortcut on your desktop) and load the main.asm file. The result will be a "main.hex" file which can be converted within the DOS shell by executing "convert.bat" (Perl must be installed) to a main.syx file.

The source files (main.asm and all *.inc and *.h files) are editable with your favourite text editor. I prefer emacs, but there are also some other usefull editors especially for Windows available on the net. Especially "code highlighting" is an important feature, so that comments can be regognized easier.

Best Regards, Thorsten.

P.S.: Ian - I've received the encoders last week - thanks again!! :)

Link to comment
Share on other sites

Ok thanks for all the reply's guys ;D

I will edit in text editor  and the MPSAM the thing.

I thought  ( from the instructions of the main .asm )

that I had to open the files this way.

(edit )  Also I figured out how to convert the hex to syx.

Very simple very nice to watch that loading going on.

Tk..........glad you like the encoders. Let me know how they work.

I can't get anything to work with mios but the lcd so far.

Guess it will only be a matter of time !

Tk...Lo said that his encoders worked regardless of being configured so in the mios.

Does detent for the Chinese ( where they were made ) mean ratchet ?

Your thoughts ?

Cheers

Ian

Link to comment
Share on other sites

yeah well my encoders are def working (SID 18F)but its kinda weird like sometimes they will only step 2 increments at a time & sometimes it depends on where you are in the menu as to if it moves 1 or 2 steps at a time!

if anyone knows whats going on or how I configure the increments

I'd like to kno

TIA

Lo

Link to comment
Share on other sites

Hi Lo,

for the adaption to your encoders you need to change:

  • mios_tables.inc: the correct encoder type (detented or non-detented
  • main.asm: set CS_MENU_USE_DETENTED_ENCODER to 1 if you are using a detented encoder for the menu
  • cs_menu.inc: the CS_MENU_EncSpeedSet function allows you to totally customize the encoder behaviour - however, changes shouldn't be necessary there

Best Regards, Thorsten.

Link to comment
Share on other sites

Hi LO,

a mixed mode (built into MIOS itself) which dynamically switches between slow and fast behaviour depending on the encoder speed is planned - maybe this will be the best compromise :)

Best Regards, Thorsten.

Link to comment
Share on other sites

sounds real nice

thanks

BTW I pulled the "clicker" out of my detented encoder (one from Ian) which was very easy to do now I have a nice smooth non detented! Original idea from Steve C! cheers mate.

Link to comment
Share on other sites

Hi LO,

I noticed that without this "clicker" the encoder doesn't send clean pulses, so that MIOS sometimes isn't able to determine the correct direction. However, I will try to add a new encoder type which reacts only on the two clean flangs (means: the quadrupled resolution will be halfed to double resolution).

Best Regards, Thorsten.

Link to comment
Share on other sites

Yeah I also notice this; although it doesnt do it all the time and when set to slow it only jumps once the wrong way then continues with the correct direction.

Would be nice to have it perfect tho!  ;)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...