interface for PIC microcontroller?

Discussion in 'Embedded Systems and Microcontrollers' started by engkeat, Jan 6, 2009.

  1. engkeat

    Thread Starter Member

    Aug 18, 2008
    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
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    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).
  3. SNG

    New Member

    Feb 11, 2009
    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...