Go to Post the bang for the buck is unparalled. Where else can $6000 change an entire group of student's lives forever? - Cory [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
  #1   Spotlight this post!  
Unread 15-01-2005, 11:19
chantilly_team chantilly_team is offline
Registered User
#0612
 
Join Date: Oct 2004
Location: Virginia
Posts: 28
chantilly_team is an unknown quantity at this point
Programming Problem: Extremely Frustrating

We were programming fine, everything was going well. Then we started getting an error. The program light on the robot controller would switch between red and green blinking very fast. Somehow, we don't know how, we were able to fix it. Then we got the same problem again, and now we are stuck. The two similarities between the two cases was that a person tried to download the new code into the robot while the program light was green and not yellow. I have searched many forums relating to this issue and this is what I have done so far to try and fix it:

1. We tried the hold down reset and program, release reset, release program, download, reset method

2. We have tried the hold down reset and program, release program, release reset, download, reset method

3. We have checked our batteries.

4. We have checked the connections

5. We have checked the wires

We have also checked the radio signals. The joystick controller signal says transmit, but the robot controller signal says stand by. I think our problem is that the program won't run until the robot RC signal says receive. That is what i think the problem is. Can anyone tell us how to fix it? Also, can anyone suggest what else the problem might be and how we can fix it. Thanks.

Team 612
  #2   Spotlight this post!  
Unread 15-01-2005, 12:36
chantilly_team chantilly_team is offline
Registered User
#0612
 
Join Date: Oct 2004
Location: Virginia
Posts: 28
chantilly_team is an unknown quantity at this point
Re: Programming Problem: Extremely Frustrating

We were finally able to download, however the only thing that seems to work is the FRC_Default code. When we build the new FRC code, without ANY changes it will not work correctly. Our code from last year will not work. The only thing working is the FRC_Default Code. Can anyone explain to us why this is happening?

once again thanks,

~Team 612
  #3   Spotlight this post!  
Unread 15-01-2005, 12:51
neilsonster's Avatar
neilsonster neilsonster is offline
Registered User
AKA: Andrew Neilson
FRC #0772 (Sabre Bytes)
Team Role: College Student
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Waterloo, ON, Canada
Posts: 188
neilsonster is a name known to allneilsonster is a name known to allneilsonster is a name known to allneilsonster is a name known to allneilsonster is a name known to allneilsonster is a name known to all
Send a message via MSN to neilsonster
Re: Programming Problem: Extremely Frustrating

I'm not sure what could be wrong... but have you loaded the new firmware onto your controller? Available here. Maybe that can help *shrugs*.
  #4   Spotlight this post!  
Unread 15-01-2005, 13:37
Tom Bottiglieri Tom Bottiglieri is offline
Registered User
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Jan 2004
Rookie Year: 2003
Location: San Francisco, CA
Posts: 3,186
Tom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond repute
Re: Programming Problem: Extremely Frustrating

Unplug all radios and tether.

Download the latest firmware.

Download the default code.

Plug in the OI via Tether.

Reset

Try downloading your code.
  #5   Spotlight this post!  
Unread 15-01-2005, 13:45
gnormhurst's Avatar
gnormhurst gnormhurst is offline
Norm Hurst
AKA: gnorm
#0381 (The Tornadoes)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Trenton, NJ
Posts: 138
gnormhurst will become famous soon enoughgnormhurst will become famous soon enough
Re: Programming Problem: Extremely Frustrating

Does the default code work?

If you can back out to very simple, "known good" conditions, and it still doesn't work, you may want to call IFI. I had trouble with the IF loader last year and they were very helpful.

But first try to eliminate as many suspect things as possible, things that IFI cannot vouch for, which means your code and any extra connections. Back off to the default code. Unhook all unnecessary wires until the only wires you have are those required to test download and running.

Get the new firmware and make sure you have the new compiler 2.40. Apparently last year's compiler does not support stuff in the new firmware.
__________________
Trenton Tornadoes 381
2004 Philadelphia Regional Winners
2006 Xerox Creativity Award
---
My corner of the USPTO.
My favorite error message from gcc: main is usually a function
My favorite error message from Windows: There is not enough disk space available to delete this file.
  #6   Spotlight this post!  
Unread 15-01-2005, 15:28
chantilly_team chantilly_team is offline
Registered User
#0612
 
Join Date: Oct 2004
Location: Virginia
Posts: 28
chantilly_team is an unknown quantity at this point
Re: Programming Problem: Extremely Frustrating

We just did the firmware. Also the default works fine. We built the original code with no changes at all and sent it to the machine, and it did not work.

-downloaded firmware

-default code works fine

-compiled unedited code and did not work

-we also had it working fine and were editing and getting it to work, until we put this line of code in:

printf("potval: %d", Get_Analog_Value(rc_ana_01));
note: I know that is not the right method/variable, but we did the right one, i am just on a different computer with internet to type this and can't remember it

so as i said until we put that printf in it was working fine, then when we took the printf out it didn't work

thanks for the help and keep it coming
  #7   Spotlight this post!  
Unread 15-01-2005, 15:39
IMDWalrus's Avatar
IMDWalrus IMDWalrus is offline
This is a line...
AKA: Paul
FRC #0818 (Genesis '02)
Team Role: Alumni
 
Join Date: Mar 2003
Rookie Year: 2003
Location: Michigan
Posts: 617
IMDWalrus is a splendid one to beholdIMDWalrus is a splendid one to beholdIMDWalrus is a splendid one to beholdIMDWalrus is a splendid one to beholdIMDWalrus is a splendid one to beholdIMDWalrus is a splendid one to beholdIMDWalrus is a splendid one to behold
Send a message via AIM to IMDWalrus
Re: Programming Problem: Extremely Frustrating

Quote:
Originally Posted by chantilly_team
so as i said until we put that printf in it was working fine, then when we took the printf out it didn't work
Is there any chance you could use Dashboard instead of printf statements?
  #8   Spotlight this post!  
Unread 15-01-2005, 16:19
Jay Lundy Jay Lundy is offline
Programmer/Driver 2001-2004
FRC #0254 (The Cheesy Poofs)
Team Role: Alumni
 
Join Date: Jun 2001
Rookie Year: 2001
Location: Berkeley, CA
Posts: 320
Jay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to all
Re: Programming Problem: Extremely Frustrating

Last year we had the same problem (program light flashes red/green quickly). Our problem was we had a printf before we called Initialize_Serial_Comms().

It was a tough bug to track down, because every time we uploaded the program it worked until we reset the robot. Once we reset it started doing the red/green flashing.
  #9   Spotlight this post!  
Unread 15-01-2005, 18:24
Ryan M. Ryan M. is offline
Programming User
FRC #1317 (Digital Fusion)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Ohio
Posts: 1,508
Ryan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud of
Re: Programming Problem: Extremely Frustrating

Quote:
Originally Posted by chantilly_team
so as i said until we put that printf in it was working fine, then when we took the printf out it didn't work

thanks for the help and keep it coming
Does it not compile, or does it compile fine (no errors), but just doesn't download? If it's the first, then it's probably something like the printf library isn't ok for some reason/you have to included it, but if it's the second (which I think you're saying it is), then... leave it overnight in a cold work building with no power, reset it the next time you see it, and pray. Time solves all problems. But, it may seriously just a weird hardware error which will be fine after it gets a chance to cool down.
__________________

  #10   Spotlight this post!  
Unread 16-01-2005, 10:18
chantilly_team chantilly_team is offline
Registered User
#0612
 
Join Date: Oct 2004
Location: Virginia
Posts: 28
chantilly_team is an unknown quantity at this point
Cool Re: Programming Problem: Extremely Frustrating

The code compiles fine without any error. But after downloading the code into the Robot controller, all the lights on it start blinking rapidly. Even if compile the default code(without any changes in it) and then download it, it has the same problem. But it responds perfectly when we download the "FRC_default.hex" into it, instead of "FRCcode.hex" We tried shutting it off and turning on after few hours, it doesnt work. We are having this problem for the past whole week. Any kind of help is appreciated.
Chantilly team member.
  #11   Spotlight this post!  
Unread 16-01-2005, 10:56
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,810
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Programming Problem: Extremely Frustrating

Quote:
Originally Posted by chantilly_team
The code compiles fine without any error. But after downloading the code into the Robot controller, all the lights on it start blinking rapidly. Even if compile the default code(without any changes in it) and then download it, it has the same problem. But it responds perfectly when we download the "FRC_default.hex" into it, instead of "FRCcode.hex" We tried shutting it off and turning on after few hours, it doesnt work. We are having this problem for the past whole week. Any kind of help is appreciated.
Chantilly team member.
I suspect the compiler because from the symptoms it sounds like compiling the default code does not produce an identical .hex file.
A couple of possible reasons this could be happening are:
  • The wrong PIC has been specified and the compiler is producing a .hex for a different model
  • The complier is the wrong one
  • The linker file is incorrect
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #12   Spotlight this post!  
Unread 16-01-2005, 11:04
chantilly_team chantilly_team is offline
Registered User
#0612
 
Join Date: Oct 2004
Location: Virginia
Posts: 28
chantilly_team is an unknown quantity at this point
Re: Programming Problem: Extremely Frustrating

Quote:
Originally Posted by Mark McLeod
I suspect the compiler because from the symptoms it sounds like compiling the default code does not produce an identical .hex file.
A couple of possible reasons this could be happening are:
  • The wrong PIC has been specified and the compiler is producing a .hex for a different model
  • The complier is the wrong one
  • The linker file is incorrect
What is "PIC" . We also suspect there is a problem with compiler. But we downloaded and installed the new compiler C18 version 2.40 . We tried to installing it and then compiling it, but the problem does not go away. Also what is "linker file". please specify .
Thanks,
Chantilly team member.
  #13   Spotlight this post!  
Unread 16-01-2005, 11:27
jparkteach's Avatar
jparkteach jparkteach is offline
Registered User
FRC #2070 (Ridgefield Robotics)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2001
Location: New York City, NY
Posts: 63
jparkteach is a splendid one to beholdjparkteach is a splendid one to beholdjparkteach is a splendid one to beholdjparkteach is a splendid one to beholdjparkteach is a splendid one to beholdjparkteach is a splendid one to behold
Send a message via AIM to jparkteach
Re: Programming Problem: Extremely Frustrating

Quote:
Originally Posted by chantilly_team
What is "PIC" . We also suspect there is a problem with compiler. But we downloaded and installed the new compiler C18 version 2.40 . We tried to installing it and then compiling it, but the problem does not go away. Also what is "linker file". please specify .
Thanks,
Chantilly team member.
When you installed the new compiler, did you make sure all the options were checked? I assume you installed the new version of MPLA IDE 7.0 before installing the compiler, right?
  #14   Spotlight this post!  
Unread 16-01-2005, 11:32
chantilly_team chantilly_team is offline
Registered User
#0612
 
Join Date: Oct 2004
Location: Virginia
Posts: 28
chantilly_team is an unknown quantity at this point
Re: Programming Problem: Extremely Frustrating

Is the newer version of MPLAB IDE included in the First CD ? Is that version 7.0 ? I installed it from CD, but I think I have version 6.x . Do I have to uninstall the earlier version before installing the previous version of both the IDE and the compiler ?
Thanks,
Chantilly team member.
  #15   Spotlight this post!  
Unread 16-01-2005, 13:59
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,810
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Programming Problem: Extremely Frustrating

Quote:
Originally Posted by chantilly_team
Is the newer version of MPLAB IDE included in the First CD ? Is that version 7.0 ? I installed it from CD, but I think I have version 6.x . Do I have to uninstall the earlier version before installing the previous version of both the IDE and the compiler ?
Thanks,
Chantilly team member.
The MPLAB most of us are using is not the one that came on the kit CD. It's free to the general public. Pick it up from here: http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName =en019469&part=SW007002

The version doesn't really matter, but later on when you have questions it'll be easier if we're all using the same copy.

If you reinstall any of these, make sure to uninstall the old versions first.

The computer we are programming on the RC is a Microchip PIC18F8520, one of hundreds of types available.

The linker file gives directions on how the physical space on the RC is divided up. Don’t worry about it since I doubt it’s causing your problem now. It’s the file 18f8520user.lkr in the FrcCode_1_7_2005 default project folder.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 16-01-2005 at 14:19.
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
Programming - Getting Started Mark McLeod Programming 80 16-04-2008 23:37
Banner Sensor Programming Problem 2Crisis Programming 4 24-02-2004 13:40
C programming problem... wasabi824 Programming 5 08-02-2004 01:04
multi-bank programming problem GregC Programming 3 14-02-2003 16:13
programming problem gthakore Programming 16 20-04-2002 12:21


All times are GMT -5. The time now is 10:06.

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