![]() |
Serial Driver and 2K6 Encoder Driver Not compatible
Has anyone else had this problem?
The 2k6 encoder driver works fine on its own. The 2k6 serial driver works fine on its own. Combining them would be easy enough, right? We have combined them with the interrupt handler below. When what should be interrupt 1 fires (Dig In 1), the Encoder 2 count goes up. (When E2 is positive, E1 is -1. When E2 is negative, E1 is 0) When what is supposed to be Encoder 2 (dig in 2) fires, the Encoder 4 count changes, and the same pattern happens on E3 that happed on E1. Also, no matter what the tick delta is, E4 always fluctuates in the same direction (backwards in relation to the bot. Code:
#pragma interruptlow InterruptHandlerLow save=PROD,section("MATH_DATA"),section(".tmpdata") |
Re: Serial Driver and 2K6 Encoder Driver Not compatible
seeing the printf's in the interrupt made me dizzy..
I put the rx and tx checks last. That may help you. I'm not sure what is causing the problem. Maybe more information would help unearth the problem? Like, the header definitions for the encoder driver. |
Re: Serial Driver and 2K6 Encoder Driver Not compatible
Quote:
The encoder header is unmodified, pulled from this workspace. http://kevin.org/frc/frc_encoder.zip |
Re: Serial Driver and 2K6 Encoder Driver Not compatible
Quote:
-Kevin |
Re: Serial Driver and 2K6 Encoder Driver Not compatible
I guess the build has tired me out.
I'm not quite sure why I was trying to merge the encoder driver with the serial driver. It comes that way... :ahh: |
Re: Serial Driver and 2K6 Encoder Driver Not compatible
Quote:
-Kevin |
Re: Serial Driver and 2K6 Encoder Driver Not compatible
I'll make that modification. Thanks for the info.
|
| All times are GMT -5. The time now is 12:52. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi