View Single Post
  Spotlight this post!  
Unread 21-01-2006, 14:46
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Combining ADC, Serial, and Camera_s codes

Quote:
Originally Posted by kaszeta
This file mostly worked for us. We had to add in an include for encoder.h and the Port_B and Port_B_Delta variables.

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?
Thinking you only wanted support for encoders on int 3 and int 4, that's what I included in the user_routines_fast.c I attached to my posting above. Use the file attached to this posting. Also, the p18f8722.h file included with the compiler is messed up. Use the one that's attached to this posting.

-Kevin
Attached Files
File Type: h p18f8722.h (44.1 KB, 80 views)
File Type: c user_routines_fast.c (7.7 KB, 78 views)
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org

Last edited by Kevin Watson : 21-01-2006 at 15:03.