Go to Post So I guess this is just another case of someone reinventing the leg? - petek [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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #16   Spotlight this post!  
Unread 14-01-2006, 13:43
Cuog's Avatar
Cuog Cuog is offline
Registered Linux User: 390661
AKA: Alex
FRC #0422
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 2004
Location: Richmond, Virginia
Posts: 852
Cuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond repute
Send a message via AIM to Cuog
Re: 2006 CMUcam2 Code

k thanks time to search,
Cuog
__________________
KK4KQO
http://voltair.us
Too many projects, too little time.
  #17   Spotlight this post!  
Unread 14-01-2006, 19:06
Makubesu's Avatar
Makubesu Makubesu is offline
Registered User
None #1768
Team Role: Programmer
 
Join Date: Oct 2005
Rookie Year: 2005
Location: Massachusetts
Posts: 9
Makubesu is an unknown quantity at this point
Send a message via AIM to Makubesu
Re: 2006 CMUcam2 Code

My team is having some problems using the camera code. When we used the code that came with the controller, we were able to get the LEDs to light up for y movement on the joystick, as well as the trigger and thumb button. When we loaded on the camera code, though, none of those did anything. We loaded on the default code provided at IFI's website, and that fixed things, but we can't use the camera with just that code. Any idea what we're doing wrong? The user_routines.c files look the same, so I don't understand why the joystick wouldn't work.
  #18   Spotlight this post!  
Unread 14-01-2006, 20:36
Cuog's Avatar
Cuog Cuog is offline
Registered Linux User: 390661
AKA: Alex
FRC #0422
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 2004
Location: Richmond, Virginia
Posts: 852
Cuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond repute
Send a message via AIM to Cuog
Re: 2006 CMUcam2 Code

in the method: Proccess_Data_From_Master_uP(), make a call to Default_Routine, then in Default_Routine comment out the pwm assignment for pwm01 and 02 and you're good to go, i spent all day trying to fix this and hit my head against the wall when i got it.
__________________
KK4KQO
http://voltair.us
Too many projects, too little time.
  #19   Spotlight this post!  
Unread 14-01-2006, 21:07
Makubesu's Avatar
Makubesu Makubesu is offline
Registered User
None #1768
Team Role: Programmer
 
Join Date: Oct 2005
Rookie Year: 2005
Location: Massachusetts
Posts: 9
Makubesu is an unknown quantity at this point
Send a message via AIM to Makubesu
Re: 2006 CMUcam2 Code

Quote:
Originally Posted by Cuog
in the method: Proccess_Data_From_Master_uP(), make a call to Default_Routine, then in Default_Routine comment out the pwm assignment for pwm01 and 02 and you're good to go, i spent all day trying to fix this and hit my head against the wall when i got it.
Oh, I see, the call to Default_Routine is actually commented out in the camera code. Why do I need to comment out the assignments for pwm01 and 02 in default routine though?
  #20   Spotlight this post!  
Unread 16-01-2006, 00:03
X-Istence X-Istence is offline
Melt the RC controller!
AKA: Bert JW Regeer
no team
Team Role: Alumni
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Montville
Posts: 151
X-Istence will become famous soon enoughX-Istence will become famous soon enough
Send a message via AIM to X-Istence Send a message via MSN to X-Istence
Re: 2006 CMUcam2 Code

Quote:
Originally Posted by Makubesu
Oh, I see, the call to Default_Routine is actually commented out in the camera code. Why do I need to comment out the assignments for pwm01 and 02 in default routine though?
Because those are standard used for the servo's, and last I checked it was not desirable for the servo's to be changed in position by the robot controller.
__________________
My Blog!
  #21   Spotlight this post!  
Unread 16-01-2006, 00:08
iBheat's Avatar
iBheat iBheat is offline
Registered User
FRC #0418 (Lasa Robotics)
Team Role: Programmer
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Austin, TX
Posts: 24
iBheat is on a distinguished road
Re: 2006 CMUcam2 Code

Quote:
Originally Posted by X-Istence
Because those are standard used for the servo's, and last I checked it was not desirable for the servo's to be changed in position by the robot controller.
If by that you mean the PWM outputs for camera servos (pan and tilt) cannot be changed then you are incorrect if you look in tracking.h you see
Code:
// By default, PWM output one is used for the pan servo.
// Change it to another value if you'd like to use PWM
// output one for another purpose.
#define PAN_SERVO pwm01

// By default, PWM output two is used for the tilt servo.
// Change it to another value if you'd like to use PWM
// output two for another purpose.
#define TILT_SERVO pwm02
That defines which PWM output is used!
  #22   Spotlight this post!  
Unread 21-01-2006, 16:07
Windward's Avatar
Windward Windward is offline
Registered User
FRC #1452
Team Role: Programmer
 
Join Date: Nov 2005
Rookie Year: 2004
Location: So Cal
Posts: 88
Windward is an unknown quantity at this point
Re: 2006 CMUcam2 Code

I don't know if this has been answered in one of the above posts or somewhere, but does the camera code (the one for MPLab) interfere with other code that we programmers add in? I can't get any of my personal code, including printfs, to work even though all the camera code works perfectly fine, including printfs. Is there something I'm supposed to edit before I can edit the default code and have it work?
  #23   Spotlight this post!  
Unread 21-01-2006, 18:02
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: 2006 CMUcam2 Code

The call to Default_Routine() is commented out in the camera code. If that's where you're putting your own programming, you now know why it doesn't seem to be doing anything.

Uncomment it and your code should run.
  #24   Spotlight this post!  
Unread 22-01-2006, 17:01
aaeamdar's Avatar
aaeamdar aaeamdar is offline
Post-A-Holic
AKA: Paul Dennis
FRC #1719 (The Umbrella Corp)
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Baltimore, MD
Posts: 231
aaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant future
Re: 2006 CMUcam2 Code

Quote:
Originally Posted by MPLAB IDE 7.2 Linker
Clean: Deleting intermediary and output files.
Clean: Deleted file "G:\Default Code\main.o".
Clean: Deleted file "G:\Default Code\user_routines.o".
Clean: Deleted file "G:\Default Code\user_routines_fast.o".
Clean: Deleted file "G:\Default Code\user_SerialDrv.o".
Clean: Deleted file "G:\Default Code\ifi_startup.o".
Clean: Deleted file "G:\Default Code\ifi_utilities.o".
Clean: Deleted file "G:\Default Code\camera.o".
Clean: Deleted file "G:\Default Code\serial_ports.o".
Clean: Deleted file "G:\Default Code\tracking.o".
Clean: Done.
Executing: "c:\mcc18\bin\mcc18.exe" -p=18F8722 "main.c" -fo="main.o" /i"C:\mcc18\h" -D_FRC_BOARD -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -nw=2066
Executing: "c:\mcc18\bin\mcc18.exe" -p=18F8722 "user_routines.c" -fo="user_routines.o" /i"C:\mcc18\h" -D_FRC_BOARD -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -nw=2066
G:\Default Code\user_routines.c:252:Warning [2058] call of function without prototype
G:\Default Code\user_routines.c:260:Warning [2058] call of function without prototype
Executing: "c:\mcc18\bin\mcc18.exe" -p=18F8722 "user_routines_fast.c" -fo="user_routines_fast.o" /i"C:\mcc18\h" -D_FRC_BOARD -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -nw=2066
Executing: "c:\mcc18\bin\mcc18.exe" -p=18F8722 "user_SerialDrv.c" -fo="user_SerialDrv.o" /i"C:\mcc18\h" -D_FRC_BOARD -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -nw=2066
Executing: "c:\mcc18\bin\mcc18.exe" -p=18F8722 "ifi_startup.c" -fo="ifi_startup.o" /i"C:\mcc18\h" -D_FRC_BOARD -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -nw=2066
Executing: "c:\mcc18\bin\mcc18.exe" -p=18F8722 "ifi_utilities.c" -fo="ifi_utilities.o" /i"C:\mcc18\h" -D_FRC_BOARD -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -nw=2066
Executing: "c:\mcc18\bin\mcc18.exe" -p=18F8722 "camera.c" -fo="camera.o" /i"C:\mcc18\h" -D_FRC_BOARD -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -nw=2066
Executing: "c:\mcc18\bin\mcc18.exe" -p=18F8722 "serial_ports.c" -fo="serial_ports.o" /i"C:\mcc18\h" -D_FRC_BOARD -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -nw=2066
Executing: "c:\mcc18\bin\mcc18.exe" -p=18F8722 "tracking.c" -fo="tracking.o" /i"C:\mcc18\h" -D_FRC_BOARD -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -nw=2066
Executing: "C:\Program Files\Microchip\MPASM Suite\MPLink.exe" /l"C:\mcc18\lib" "18f8722.lkr" "G:\Default Code\main.o" "G:\Default Code\user_routines.o" "G:\Default Code\user_routines_fast.o" "G:\Default Code\user_SerialDrv.o" "G:\Default Code\ifi_startup.o" "G:\Default Code\ifi_utilities.o" "G:\Default Code\camera.o" "G:\Default Code\serial_ports.o" "G:\Default Code\tracking.o" "G:\Default Code\FRC_library.lib" /o"FrcCode.cof"
MPLINK 3.94, Linker
Copyright (c) 2005 Microchip Technology Inc.
Error - section '.udata_user_routines.o' can not fit the section. Section '.udata_user_routines.o' length=0x00000103
Errors : 1
This code gives us the above error. Some insight: hex 103 is just above 256. Are we exceeding some miserly value of MPLAB?

Thanks, I hope I'm not repeating someone.
  #25   Spotlight this post!  
Unread 22-01-2006, 17:34
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: 2006 CMUcam2 Code

Quote:
Originally Posted by aaeamdar
This code gives us the above error. Some insight: hex 103 is just above 256. Are we exceeding some miserly value of MPLAB?

Thanks, I hope I'm not repeating someone.
Try removing user_SerialDrv.c/.h from your project.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #26   Spotlight this post!  
Unread 22-01-2006, 17:45
aaeamdar's Avatar
aaeamdar aaeamdar is offline
Post-A-Holic
AKA: Paul Dennis
FRC #1719 (The Umbrella Corp)
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Baltimore, MD
Posts: 231
aaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant future
Re: 2006 CMUcam2 Code

Quote:
Originally Posted by Kevin Watson
Try removing user_SerialDrv.c/.h from your project.

-Kevin
This worked to fix the error, and I was about to throw a Jubilee Feast when it gave me a different error, about Breaker_Tripped:

Code:
MPLINK 3.94, Linker
Copyright (c) 2005 Microchip Technology Inc.
Error - could not find definition of symbol 'Breaker_Tripped' in file 'G:\Default Code\user_routines.o'.
Errors    : 1
That's fine, I fixed that (essentially commented it out), and then, BOOM I got the same error again:

Code:
MPLINK 3.94, Linker
Copyright (c) 2005 Microchip Technology Inc.
Error - section '.udata_user_routines.o' can not fit the section. Section '.udata_user_routines.o' length=0x00000103
Errors    : 1
=(

I HATE MP BLOB
  #27   Spotlight this post!  
Unread 22-01-2006, 17:48
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: 2006 CMUcam2 Code

Quote:
Originally Posted by aaeamdar
This worked to fix the error, and I was about to throw a Jubilee Feast when it gave me a different error, about Breaker_Tripped:

Code:
MPLINK 3.94, Linker
Copyright (c) 2005 Microchip Technology Inc.
Error - could not find definition of symbol 'Breaker_Tripped' in file 'G:\Default Code\user_routines.o'.
Errors : 1
That's fine, I fixed that (essentially commented it out), and then, BOOM I got the same error again:

Code:
MPLINK 3.94, Linker
Copyright (c) 2005 Microchip Technology Inc.
Error - section '.udata_user_routines.o' can not fit the section. Section '.udata_user_routines.o' length=0x00000103
Errors : 1
=(

I HATE MP BLOB
Post the .map file.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #28   Spotlight this post!  
Unread 22-01-2006, 17:54
aaeamdar's Avatar
aaeamdar aaeamdar is offline
Post-A-Holic
AKA: Paul Dennis
FRC #1719 (The Umbrella Corp)
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Baltimore, MD
Posts: 231
aaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant future
Re: 2006 CMUcam2 Code

Quote:
Originally Posted by Kevin Watson
Post the .map file.

-Kevin

What is the .map file and where can I find it?

Thanks,
Paul
  #29   Spotlight this post!  
Unread 22-01-2006, 18:35
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: 2006 CMUcam2 Code

Quote:
Originally Posted by aaeamdar
What is the .map file and where can I find it?

Thanks,
Paul
It should be in your build directory. If not, go to Project -> Build Options... -> Project -> MPLINK Linker tab -> Check "Generate map file" check box and then build all. The <project name>.map should now be in the build directory.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #30   Spotlight this post!  
Unread 22-01-2006, 18:42
aaeamdar's Avatar
aaeamdar aaeamdar is offline
Post-A-Holic
AKA: Paul Dennis
FRC #1719 (The Umbrella Corp)
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Baltimore, MD
Posts: 231
aaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant future
Re: 2006 CMUcam2 Code

Code:
MPLINK 3.94, Linker
Linker Error Map File - Created Sun Jan 22 18:39:54 2006

*Warning* - This is only a partial map file due to a link time error.
   Only sections which were allocated prior to the error are shown below.

CODEPAGES:
    Memory      Start        End              Section    Address Size(Bytes)
 ---------  ---------  ---------            ---------  ---------  ---------
   vectors     0x0000     0x07ff                                           

      page     0x0800     0xffff           _entry_scn     0x0800     0x0006
                                  InterruptVectorHigh     0x0808     0x0006
                                   InterruptVectorLow     0x0818     0x0006
                                               .cinit     0x081e     0x004a
                                 .code_user_routines.o     0x0868     0x1270
                                     .code_vfprintf.o     0x1ad8     0x0c22
                                          .code_pow.o     0x26fa     0x0b2e
                                  .code_ifi_library.o     0x3228     0x0722
                                                 PROG     0x394a     0x06a2
                                       .code_camera.o     0x3fec     0x0634
                                          .code_exp.o     0x4620     0x05c2
                                          .code_log.o     0x4be2     0x04f6
                                     .code_tracking.o     0x50d8     0x0408
                                             UTIL_LIB     0x54e0     0x0396
                                        .code_fchop.o     0x5876     0x028e
                                 .code_ifi_utilities.o     0x5b04     0x01de
                                 .code_serial_ports.o     0x5ce2     0x0188
                                 .code_user_routines_fast.o     0x5e6a     0x015a
                                        .code_ldexp.o     0x5fc4     0x0134
                                        .code_frexp.o     0x60f8     0x0120
                                     .code_UnpkMath.o     0x6218     0x011c
                                     .code_PackMath.o     0x6334     0x011a

    idlocs     0x0000     0x0007                                           

    config     0x0000     0x000d                                           

     devid     0xfffe     0xffff                                           

    eedata     0x0000     0x03ff                                           


SHAREBANKS:

DATABANKS:
    Memory      Start        End              Section    Address Size(Bytes)
 ---------  ---------  ---------            ---------  ---------  ---------
      gpr0     0x0060     0x00ff             COPY_VAR     0x0080     0x0080

      gpr1     0x0100     0x01ff                                           

      gpr2     0x0200     0x02ff                                           

      gpr3     0x0300     0x03ff                                           

      gpr4     0x0400     0x04ff                                           

      gpr5     0x0500     0x05ff                                           

      gpr6     0x0600     0x06ff                                           

      gpr7     0x0700     0x07ff                                           

      gpr8     0x0800     0x08ff                                           

      gpr9     0x0900     0x09ff                                           

     gpr10     0x0a00     0x0aff                                           

     gpr11     0x0b00     0x0bff                                           

     gpr12     0x0c00     0x0cff                                           

     gpr13     0x0d00     0x0dff                                           

     gpr14     0x0e00     0x0eff               .stack     0x0e00     0x0100

     gpr15     0x0f00     0x0f5f                                           


ACCESSBANKS:
    Memory      Start        End              Section    Address Size(Bytes)
 ---------  ---------  ---------            ---------  ---------  ---------
 accessram     0x0000     0x005f                                           

 accesssfr     0x0f60     0x0fff        SFR_UNBANKED0     0x0f62     0x009e
Here it is.

Thanks
Closed Thread


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
Out of the Box Camera Code russell Programming 9 21-10-2009 05:28
CMUCam2 code (FRC and EDU?) Amber Programming 0 15-02-2005 22:23
Team THRUST - Kevin's Code and Camera Code Combine Chris_Elston Programming 3 31-01-2005 22:28
CMUCam2 Camera Code - Are important parts commented out? Mr. Lim Programming 4 14-01-2005 12:11
heres the code. y this not working omega Programming 16 31-03-2004 15:18


All times are GMT -5. The time now is 13:22.

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