Only getting encoder events in one direction

2 posts in this topic

Hi all,

I'm at the beginning of writing a C application on MIOS8. The hardware is composed of a Core '452, a DIN and two voti.nl encoders attached to it (http://www.voti.nl/shop/catalog.html?SW-ROT-01). I'm using input pins 0/1 and 2/3.

I'm using the skeleton application as a starting point (sdcc_skeleton_v1_1). MIOS on the chip is upgraded to version 1.9h.

If I don't configure any encoders, I can see button events coming through DIN_NotifyToggle:

[16083.144] Button: 00 pressed
[16083.153] Button: 01 pressed
[16083.162] Button: 00 depressed
[16083.171] Button: 01 depressed
[16083.239] Button: 00 pressed
[16083.248] Button: 01 pressed

... and so on. But if I add an encoder table for a single encoder, like

#include <cmios.h>
#include <pic18fregs.h>
#include <debug_msg.h>


, I receive encoder events only for clockwise rotations (negative increments).

If i change the encoder type to DETENTED/3/4/5, i get no events at all.

Same exact thing happens with the other encoder, and even if I enable both (MIOS_ENC_ENTRY(1, 2, MIOS_ENC_MODE_DETENTED2)).

I don't think there's a hardware problem because it seems to me that the input pins are working fine. Also, using different pins or using a second DIN didn't help.

What did go wrong?...



Best regards,



Edited by ris8_allo_zen0
fix title

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now