CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Rotary encoders

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
LoPP
Guest







Rotary encoders
PostPosted: Wed Jul 01, 2009 10:49 am     Reply with quote

Hello,

What type of rotary encoders can we connect to a PICmicro: TTL or HTL. Can we connect it directly or via a special device?

Regards
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Jul 01, 2009 1:18 pm     Reply with quote

Here's how to find the information:

Look on Microchip's motor control web page. Look at their suggested
solutions, based on your type of motor (you didn't post your motor type):
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2125&param=en026178

Look on the Microchip Part Selector page. Set the chip type to 18F.
Then set the number of QEI (Quadrature Encoder Interface) channels to
1 minimum and 2 maximum.
http://www.microchip.com/maps/microcontroller.aspx
You will get 4 results:
Quote:

18F4431
18F2431
18F4331
18F2331
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

if it is slow enough
PostPosted: Thu Jul 02, 2009 8:30 am     Reply with quote

About a year ago I did a rotary encoder interface that just uses a couple of B port lines - inplementing the interrupt on change function - and from inside the ISR, doing "state machine" comparisons - then outputting data as a +/- integer.

This is useful for relatively low update rates applicable to a manually turned shaft - and would crap out if the encoder is on a high RPM motor shaft. Would be fine for a human with a knob in their fingers though.
Ttelmah
Guest







PostPosted: Thu Jul 02, 2009 9:36 am     Reply with quote

Some time ago, I posted some parts of a quadrature decoder code, using INT_RB, and a high speed handler for the quadrature interrupt. This handled 'edge' rates up to quite a few 10's of KHz. Was used with a 256 line encoder, at over 5000RPM OK. Was posted here, so should be findable with a search.

Best Wishes
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group