DIGITAL POT CONTROLLED WITH ENCODER

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 7.

Moderator: Benj

SILVESTROS9
Posts: 115
Joined: Wed Aug 03, 2016 10:45 pm
Has thanked: 24 times
Been thanked: 11 times
Contact:

DIGITAL POT CONTROLLED WITH ENCODER

Postby SILVESTROS9 » Fri Mar 20, 2020 9:00 pm

Hello to all .
I would like to control a digital pot MAX-5484 , 1024 STEPS, 50K , with a BOURNS incremental encoder PEC-11R. I made a demo code to move the wiper of pot step by step in directions up/down with a pulse. According to PEC-11R data sheet with 1 pulse wiper moves 1 step of 1024. In my case, with 1 pulse, wiper of pot moves more steps, 10 or more. I was checked the pulse , I put an RC filter to A , B outputs of encoder, but the problem remains. Is there a mistake in code or anything else? I use a PIC 16F685 . Encoder outputs A,B connected on B.6 and B.7 . CS, INC , UP/DN of digital pot connected at C.5,C.4,C.3 .
thanks in advance.
Attachments
PEC11R.pdf
(173.66 KiB) Downloaded 2 times
max-548x-digital-pot.pdf
(801.98 KiB) Downloaded 2 times
DIG_POT_CNTRL.fcfx
(11.1 KiB) Downloaded 5 times

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1106
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 454 times
Been thanked: 507 times
Contact:

Re: DIGITAL POT CONTROLLED WITH ENCODER

Postby Steve001 » Sun Mar 22, 2020 8:54 am

hi Silvestros599

Cannot look at your flowcode files at the moment unfortunaltley i would check that each test file works on its own.
Did the pot work correctly ? are you using the control pins or SPI ?

I made a LCD contrast adjust with a digital pot a while ago,

https://www.matrixtsl.com/mmforums/viewtopic.php?f=2&t=11192

and inputting text from an encoder, this was jumping also , 407charles post worked for me

https://www.matrixtsl.com/mmforums/viewtopic.php?f=54&t=17251

Hope these posts help

Steve
Success always occurs in private and failure in full view.

User avatar
Benj
Matrix Staff
Posts: 14669
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4655 times
Been thanked: 4273 times
Contact:

Re: DIGITAL POT CONTROLLED WITH ENCODER

Postby Benj » Thu Mar 26, 2020 10:02 am

Hello,

The encoders usually have 4 transition edges per click and so a single click could be generating a lot more count values then you think. The encoder component has a divide by 4 property that might help to get the count more as expected.
These users thanked the author Benj for the post (total 2):
medelec35 (Fri Mar 27, 2020 11:48 am) • chipfryer27 (Fri Mar 27, 2020 9:34 pm)
Rating: 10%