|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Interrupts with CMUCam
For our robot, we want to use a quadrature encoder so that we can move our manipulator to preset heights on the arm. I read the "Quadratuer Encoders" white paper, and modified the example code to work with one interrupt.
This works fine with the default code, but I noticed that on Kevin's CMUCam code, the use of serial_ports means that user_Serialdrv.c and user_Serialdrv.h must be deleted. Where, then, do I put the interrupt code, and how do I hook the encoder up to the robot controller? I read through serial_ports.c, but I didn't really see a place for an interrupt handler where I could add the encoder code... |
|
#2
|
||||
|
||||
|
Re: Interrupts with CMUCam
Look at Kevin's encoder code. It supports 8 interrupts for quadrature encoders, and is easily integrated with his camera code.
|
|
#3
|
|||
|
|||
|
Re: Interrupts with CMUCam
Thank you! This is my first year programming in C, which still makes me one of the senior programmers this year...we're not exactly a rookie team, but a few years ago we lost everyone who knew what they were doing.
The encoders work fine now, and plugging in the camera doesn't give me a code error any more! Now if I could only get the camera to work... |
|
#4
|
|||
|
|||
|
Re: Interrupts with CMUCam
Quote:
If you dont like using EasyC and would rather code by hand, you can download WPILib here and use it as you wish.. http://users.wpi.edu/~bamiller/WPILib/ |
|
#5
|
||||
|
||||
|
Re: Interrupts with CMUCam
I thought the RC only has 6 interrupts. Where are the other 2?
|
|
#6
|
||||
|
||||
|
Re: Interrupts with CMUCam
That was a typo, six is correct.
|
|
#7
|
||||
|
||||
|
Re: Interrupts with CMUCam
Oh good, I'm not going crazy.
I was expecting something like, oh well if you use the relay ports and you change this and that boom 2 more.Game On! |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Reading an encoder with interrupts | GlennGraham | FIRST Tech Challenge | 4 | 25-08-2006 12:44 |
| CMUcam Related Interrupts | phrontist | Programming | 1 | 31-01-2006 23:01 |
| Help with pots/interrupts | mtrawls | Programming | 10 | 24-02-2004 17:01 |
| help with Interrupts | thoughtful | Programming | 5 | 08-01-2004 16:07 |
| Problem with interrupts on the PIC | Mike Betts | Programming | 7 | 16-12-2003 21:26 |