PDA

View Full Version : Can I use an Absolute rotary encoder 12bit resolution with a PIC18F4550 ?



evildrome
- 21st April 2017, 14:30
http://uk.farnell.com/broadcom-limited/aeat-6012-a06/encoder-magnetic-12bit-12000rpm/dp/2467468


As title...

Has anyone successfully read from a 12bit absolute encoder using a PIC18F or similar?

I'd love to get this to work as I have two immediate applications and the price of the thing is very reasonable.


I'm not new to coding but am new to coding on embedded devices.

Thanks,

Wilson Logan.

pedja089
- 21st April 2017, 15:13
You can use it with any PIC. Just use shiftin
Position var word
ReadSensor:
pinCS=0
SHIFTIN DataPin, ClockPin, 6,[Position\12]
pinCS=1
RETURN
Maybe pause is needed, depending on oscillator speed.
That is it...

evildrome
- 24th April 2017, 21:07
Thanks!,

That's a lot simpler than I imagined it would be.

Cheers,

Wilson.