reading 4-bit hex from a rotary encoder

http://lgrws01.grayhill.com/web1/images/ProductImages/Series%2025L%20Encoder.pdf

I'm going to be using this to determine exact position of a cam driven by a motor. Quadrature feature won't tell me position, just speed and direction so I figured I could use 4-bit hex code output.

How do you read 4-bit hex code with an Arduino? Is there a library for it?

I'm using a 2560 Mega based board. Would I be using pins 14-19 and do a Serial connection?

The part you describe actually outputs position. It outputs it using 4 pins, that are to be read as a 4-bit value (0 to 15). This gives you 4-bit resolution in determining angle (360 degrees/16 = 22.5 degree resolution).

To interface with the Arduino, you will need to use 4 digital inputs. After reading the 4 inputs, you can compute the 4-bit position.

example:

pinval_1 = digitalRead(pin1);
pinval_2 = digitalRead(pin2);
pinval_3 = digitalRead(pin3);
pinval_4 = digitalRead(pin4);

int position = pinval_1 || (pinval_2 << 1) || (pinval_3 << 2) || (pinval_4 << 3);

the variable 'position' will now be a number between 0 and 15, which you can multiply by 22.5 degrees to get your position relative to a zero-position (or home-position which should read as 0000).

Does this help?

Perfectly. Thank you.