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.
DIGITAL POT CONTROLLED WITH ENCODER
Moderator: Benj
-
- Posts: 115
- Joined: Wed Aug 03, 2016 10:45 pm
- Has thanked: 24 times
- Been thanked: 11 times
- Contact:
DIGITAL POT CONTROLLED WITH ENCODER
- Attachments
-
- PEC11R.pdf
- (173.58 KiB) Downloaded 173 times
-
- max-548x-digital-pot.pdf
- (801.59 KiB) Downloaded 184 times
-
- DIG_POT_CNTRL.fcfx
- (11.1 KiB) Downloaded 199 times
- Steve001
- Valued Contributor
- Posts: 1189
- Joined: Wed Dec 31, 2008 3:37 pm
- Has thanked: 460 times
- Been thanked: 523 times
- Contact:
Re: DIGITAL POT CONTROLLED WITH ENCODER
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,
viewtopic.php?f=2&t=11192
and inputting text from an encoder, this was jumping also , 407charles post worked for me
viewtopic.php?f=54&t=17251
Hope these posts help
Steve
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,
viewtopic.php?f=2&t=11192
and inputting text from an encoder, this was jumping also , 407charles post worked for me
viewtopic.php?f=54&t=17251
Hope these posts help
Steve
Success always occurs in private and failure in full view.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: DIGITAL POT CONTROLLED WITH ENCODER
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel