Go to Post As long as this is a competition teams will push the limits. Those that succeed are those who can push the envelope and still stay within the lines. - Steve W [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 10-03-2007, 01:35
qnetjoe qnetjoe is offline
Registered User
AKA: Joe Daily
no team
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2003
Location: Austin
Posts: 51
qnetjoe is on a distinguished road
Send a message via AIM to qnetjoe Send a message via MSN to qnetjoe Send a message via Yahoo to qnetjoe
Encoder Help with VEX and MPLAB

Greetings,

I am trying to set up some reference encoder for my team. We are using MPLAB with Vex Controller.

Is there a way that I can get the interrupt to be triggered on the raising or falling edge of the resulting encoder square wave?

Right now my code (below) just looks to see if the signal is high (0) or low (1), but if the encoder happens to stop when the signal is high , the encoder count just runs.

Code:
if(rc_dig_int1)
{
encoder1++;
PORTBbits.RB2=0; //Set Interrupt = 0
}
Thanks
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with MPLAB burningpig Programming 9 17-01-2007 13:10
Kevin Watson and programming VEX in MPLAB Doug Leppard Programming 4 24-08-2006 21:05
Vex Programming with MPLAB and IF loader Joohoo Programming 3 27-07-2006 18:18
VEX UltraSonic and Encoder SOLD OUT... Chris_Elston Electrical 5 09-01-2006 13:22
Need Help with Encoder - Won't Count Clicks Kingofl337 Programming 5 16-02-2005 18:30


All times are GMT -5. The time now is 04:11.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi