interface for PIC microcontroller?

Thread Starter

engkeat

Joined Aug 18, 2008
11
i am using a rotary encoder as a feedback of motor speed to PIC microcontroller(PIC-16f877A), the output of the encoder is in the form of open collector output, do i need any interface for connecting the encoder to I/O pin of the PIC? thanks for guidance, i m new to PIC
 

beenthere

Joined Apr 20, 2004
15,819
You will need to add a pullup resistor to the encoder output so it will switch between logic 0 and logic 1. Use the PIC Vcc as the source for the pullup, and a likely value to use for the resistor is about 20,000 ohms (20K).
 

SNG

Joined Feb 11, 2009
2
You will need to add a pullup resistor to the encoder output so it will switch between logic 0 and logic 1. Use the PIC Vcc as the source for the pullup, and a likely value to use for the resistor is about 20,000 ohms (20K).
Is that so simple to do? Tryed to hook up my Alps Rotary Encoder to my PIC18 with a pullup resistor but no result. Like to find more circuits how to do it and how to program it. Need it to set a value which will be also displayed on a 7 segment display...
 
Top