Hi
I have the car radio volume turned by a rotary encoder.
I want to put in parallel two switches with 12F675 for up and down volume, from Satellite control wheel.
Can you help me with a code to simulate the encoder output?
Thanks
Hi
I have the car radio volume turned by a rotary encoder.
I want to put in parallel two switches with 12F675 for up and down volume, from Satellite control wheel.
Can you help me with a code to simulate the encoder output?
Thanks
I would pull down GP4 and 5.
Google 2 bit rotary encoder tutorial, they are also called gray code I believe.
Robert
Edit: that is a weird rotary encoder, mine had power in. Yours seem to pull down the 2 lines, bizarre.
Last edited by Demon; - 17th June 2014 at 14:33.
@Demon I guess your's has power in so the pullups can be internal?
George
I used pulldowns on both encoder outputs, I never got into using pullups on PIC inputs.
Robert
With everything tied together at your "pin to the processor from radio" connection how do you think the direction will be determined? This schematic doesn't look quite right..
You need to have separate "A' and "B" lines so as to determine the knob direction as well as control it. Quadrature...
Dave Purola,
N8NTA
EN82fn
if you look at the current in the circuit there are 4 possible states
1. 0
2. v/r3
3. v/r4
4. v/(r3+r4)paralleled
for the op's idea to work the original re must always come to rest (detent ) where the a b contacts are both o/c .
the pic must also leave the outputs in a high impedence state (ideally with pullups disabled) or the pic will interfere with the re action.
a cro image of the re pins at rest, rotating cw and rotating acw would make things easier
Bookmarks