View Single Post
  #54   Spotlight this post!  
Unread 06-01-2005, 18:39
stephenthe1 stephenthe1 is offline
Registered User
#1008
 
Join Date: Dec 2004
Location: Ohio
Posts: 113
stephenthe1 is on a distinguished road
Re: encoder vs. motor

beware, long question...

ok, I have a couple questions.
1: in Kevin's encoder template, he first uses the Get_Left_Encoder_Count function, and assigns its value to the "count" variable. then he uses the Get_Right_Encoder_Count function and assigns its return value to the "count" variable also. Then he runs the Set_Left_Encoder_Count function, and uses the "count" variable to assign the value of "count" to Left_Encoder_Count. then he uses the "count" variable to assign the value of "count" to Right_Encoder_Count. I don't understand how he can do this without confusing the value of "count" between the left and right encoders. any help would be appreciated.

2:when setting up digitals as low priority interrupts, what do I use to reference the different pins (1-6, or interrupts 2-7). I know the first one is INTCON3bits.INT2IP = 0. but I need confirmation that that one is correct, and what the other five are. I know that interrupts 3-6 (4-7) are ganged together. I would prefer to know how to address each one individually
if that can be done easily, if not, I can set them all as low priority interrupts. I think it'd be better to do the other way though, because I need to learn how to address each one individually.

3: similarly to question two, I need to know the names of the pins to set the "edge select" option. also, the names to clear the interrupt flag and to enable the interrupts. I found some of the info in the "interrupts for dummies tutorial," but I don't know how to address each one specifically. I can't be in the dark or guessing on any of this, because interrupts are very finicky.

thank you,
Stephen

Last edited by stephenthe1 : 06-01-2005 at 19:06.