![]() |
Combining ADC, Serial, and Camera_s codes
Our team's desired code makes use of
1. The camera (stripped down version, needs the updated serial code) 2. The gyro (which needs the updated adc driver) 3. Two shaft encoders (for speed, interrupts 3 and 4). Since all of these involve changing InterruptHandlerLow() user_routines_fast.c, this is a bit involved. I have the camera and gyro working fine with each other, but attempting to add in the encoder code gives us the red-light-o-death, even if I don't hook up the encoder or call one of the encoder reading functions. I thought I've got all the code properly installed in InterruptHandlerLow(), but apparently that's not the case. Here's the relevant part of my user_routines_fast.c: Code:
#pragma codeAny ideas what to try next? |
Re: Combining ADC, Serial, and Camera_s codes
Why are you using interrupts 3 and 4 instead of 1 and 2? They are already set up for you in Kevin Watson's encoder code.
You might be missing somthing: Quote:
|
Re: Combining ADC, Serial, and Camera_s codes
1 Attachment(s)
Quote:
-Kevin |
Re: Combining ADC, Serial, and Camera_s codes
Quote:
|
Re: Combining ADC, Serial, and Camera_s codes
Quote:
Now, encoders 3 through 6 work fine (indeed, I can run all four of them, each generating 1600 pulses/sec, and it keeps up) in tandem with the gyro and camera. But if try to use encoder 1, I get the red-light-o-death as soon as something triggers it. And if I try to enable encoder 2, it doesn't build: C:\FIRST 2006\FRC 21 Jan 2006\encoder.c:131:Error [1205] unknown member 'INT3IP' in '__tag_223' C:\FIRST 2006\FRC 21 Jan 2006\encoder.c:131:Error [1131] type mismatch in assignment I noticed this thread, but I've confirmed that my p18f8722.h (in c:\mcc18\h) file is the exact one from the installation CD, and there are no others on the system. Are there two versions of this .h floating around? In any case, I've put the code online (with team-strategy specific stuff removed, but this version shows the problem) at this link. I can probably run with just encoders 3-6, but wanted to run speed control on 1 and 2. Any ideas? |
Re: Combining ADC, Serial, and Camera_s codes
2 Attachment(s)
Quote:
-Kevin |
Re: Combining ADC, Serial, and Camera_s codes
Quote:
|
| All times are GMT -5. The time now is 01:03. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi