Go to Post Last I checked, this was a competition... just checked again, yup still has Competition in the name. - Andrew Schreiber [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 26-01-2008, 13:24
iPilipino's Avatar
iPilipino iPilipino is offline
Registered User
FRC #2347 (C-Bots)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Copiague, NY
Posts: 24
iPilipino is an unknown quantity at this point
Code Error when I try to program it

I am new to programming, but Mark McLeod from Team 358 helped me learn the basics yesterday.

Now my problem is that when I try to program the robot today, and download the program into the board, and I press the program button on the FRC Robot Controller Board to get the Program State LED solid orange, the Code Error LED on the Operator Interface was showing solid red. And on the computer screen, it said that I have to get the Program State LED solid orange when it already is.

We had this problem yesterday too when Mark was helping us with it. So we used his computer to program it which worked.

But since I am trying to put more commands on the programming, I wanted to download the program I wrote to the robot controller.
__________________
"The things that come to those who wait may be the things left by those that got there first."
  #2   Spotlight this post!  
Unread 26-01-2008, 13:53
RyanW RyanW is offline
Registered User
FRC #0449 (Blair Robot Project)
Team Role: Programmer
 
Join Date: Feb 2007
Rookie Year: 2007
Location: MD
Posts: 40
RyanW has a spectacular aura aboutRyanW has a spectacular aura about
Re: Code Error when I try to program it

Don't worry about the LED on the Operator Interface (OI). The OI doesn't have the actual code from the robot on it, so it lights up the Code Error LED if the robot should be running (according to the OI) but is not sending signals back. Thus, when downloading code, the code error LED should be red, since the robot has no working code. As long as the program status LED on the robot is solid orange, you should be fine - you don't even need the OI to download.
  #3   Spotlight this post!  
Unread 26-01-2008, 17:17
Clay Pennington's Avatar
Clay Pennington Clay Pennington is offline
Registered User
FRC #1165 (team paradise)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Phoenix,AZ
Posts: 6
Clay Pennington is an unknown quantity at this point
Re: Code Error when I try to program it

what you need to do is pull out the .hex file so that it will download to the robot we had the same problem but u NEED to use the .hex file on the ifi loader to have it transfer to the robot mesage us if you need any more help if it does not work ok.

your friends @,
team 1165

  #4   Spotlight this post!  
Unread 26-01-2008, 17:33
whytheheckme's Avatar
whytheheckme whytheheckme is offline
Registered User
AKA: Jacob Komar
no team
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Providence, RI
Posts: 1,320
whytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond repute
Send a message via ICQ to whytheheckme Send a message via AIM to whytheheckme Send a message via MSN to whytheheckme Send a message via Yahoo to whytheheckme
Re: Code Error when I try to program it

Heres my $.02

If you are using the IFILoader that comes with easyC, you HAVE to download the program FROM easyC. This is at least the experience I had yesterday. Simply using a .hex file with the loader doesn't work.

Also, I can't get my RC to go into program mode without the OI connected. Any thoughts here?
  #5   Spotlight this post!  
Unread 26-01-2008, 20:35
adamm adamm is offline
Registered User
AKA: Michael Adam
FRC #1671 (The Bird Brains)
Team Role: Mentor
 
Join Date: Mar 2007
Rookie Year: 2002
Location: Fresno, CA
Posts: 29
adamm is just really niceadamm is just really niceadamm is just really niceadamm is just really niceadamm is just really nice
Re: Code Error when I try to program it

The Code error light on the OI only lights up for two major events, if you indeed have a code error within you code OR you are in program state.

Now, if you upload your code AND the light remains orange, it means that the code was incomplete. I got this error alot last year, our USB to RS-232 (Serial) adapter was loose and the cable was not connected properly.

Also be sure you have the most updated version of the IFI Loader. (If you installed the programs from the discs included in this years KOP, then you do.) We were had problems until we noticed that we had an outdated version of the uploader.

One more thing to check is the computer you are using. I have notice that certian computers encounter problems when trying to download; they either detect the connection wrong or will stop uploading part way through. This happened with one of our team's coach's laptop.

Now, I am fairly sure that you CAN upload the code to the robot when no OI is connected. I know that the User Processor requires the OI to be connected.

I dont see how you HAVE to use EasyC to upload EasyC files, a HEX file is a HEX file.

Have you tried connecting the computer to the dashboard port on the OI and using the Dashboard program on IFI's website? It gives you error codes and reasons for the Error Light.
__________________
Michael Adam
Director, Central Valley Robotics

FLL and FLL Jr. Affiliate Partner, Central California (2009-Present)
Member, Central Valley Regional Planning Committee (2012-Present)
Volunteer of the Year, Central Valley Regional (2015)
FRC Control System Advisor (2013-Present)
FRC Scorekeeper (2015-Present)
Mentor, Team 1671 (2009-Present)
Member, Team 1671 (2005-2009)
  #6   Spotlight this post!  
Unread 26-01-2008, 20:59
JonathanLKS JonathanLKS is offline
Code::Blocks
FRC #0610 (The Coyotes)
Team Role: Leadership
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Toronto
Posts: 36
JonathanLKS will become famous soon enough
Send a message via MSN to JonathanLKS
Re: Code Error when I try to program it

Are you using a USB to Serial converter? We've found some USB to Serial Converters will either die or fail to upload one way or another. If your using the latest IFI Loader, and your code was able to be uploaded when using a different computer, this sounds most likely.

If your using a serial port, or you are sure your USB to Serial converter works, the only other thing I can think of that hasn't been mentioned, is sometimes the controller just won't let you load code and you have to do a master reset (happened like once during the 3 years I've been in FIRST), hold both prog and reset, then I think let go of either prog or reset (can't remeber), but the right one will leave only the green power light flashing, when it stops flashing you can let go and load code.
__________________

Team 610 [ Co-Leader | Head Programmer | Webmaster ]
We're attending: Greater Toronto Regional, San Diego Regional, Championship
  #7   Spotlight this post!  
Unread 26-01-2008, 22:08
jacobhurwitz jacobhurwitz is offline
Registered User
FRC #0449 (Blair Robot Project)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Maryland
Posts: 45
jacobhurwitz has a spectacular aura aboutjacobhurwitz has a spectacular aura aboutjacobhurwitz has a spectacular aura about
Re: Code Error when I try to program it

Quote:
Originally Posted by whytheheckme View Post
Heres my $.02

If you are using the IFILoader that comes with easyC, you HAVE to download the program FROM easyC. This is at least the experience I had yesterday. Simply using a .hex file with the loader doesn't work.

Also, I can't get my RC to go into program mode without the OI connected. Any thoughts here?
We use the IFILoader from EasyC even though we compile with MPLAB. And I don't think you need the OI connected to download.
  #8   Spotlight this post!  
Unread 28-01-2008, 16:23
iPilipino's Avatar
iPilipino iPilipino is offline
Registered User
FRC #2347 (C-Bots)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Copiague, NY
Posts: 24
iPilipino is an unknown quantity at this point
Re: Code Error when I try to program it

Ive been trying to download this program onto the board and it just wont do. It kept saying that "To enable download, hold the 'PROG' button down until the 'PROGRAM STATE' LED is solid orange. Make sure that power is on and the serial cable is connected."

The PROGRAM STATE LED is solid orange, and the power is on and the serial cable is connected.

I had the whole thing set up right but it just kept saying the above mentioned quote.

Oh and the code error LED just turns solid orange everytime I press and hold the program button to have the Program State LED solid orange.

So where is my problem here? On the computer? On the program? Or the USB to Serial connector?
__________________
"The things that come to those who wait may be the things left by those that got there first."
  #9   Spotlight this post!  
Unread 28-01-2008, 16:46
adamm adamm is offline
Registered User
AKA: Michael Adam
FRC #1671 (The Bird Brains)
Team Role: Mentor
 
Join Date: Mar 2007
Rookie Year: 2002
Location: Fresno, CA
Posts: 29
adamm is just really niceadamm is just really niceadamm is just really niceadamm is just really niceadamm is just really nice
Re: Code Error when I try to program it

Quote:
Originally Posted by iPilipino View Post
Ive been trying to download this program onto the board and it just wont do. It kept saying that "To enable download, hold the 'PROG' button down until the 'PROGRAM STATE' LED is solid orange. Make sure that power is on and the serial cable is connected."

The PROGRAM STATE LED is solid orange, and the power is on and the serial cable is connected.

I had the whole thing set up right but it just kept saying the above mentioned quote.

Oh and the code error LED just turns solid orange everytime I press and hold the program button to have the Program State LED solid orange.

So where is my problem here? On the computer? On the program? Or the USB to Serial connector?
The Code error Light on the Operator interface is supposed to turn red when you are in program mode.

Now, if the robot automaticly sets the Program State light to orange when it gets power, you still have to press it down for 4-5 seconds.

There are a few things to check, first make sure everything is wired and working properly; you could have a faulty DB9 Cable. Make sure you are plugged into the program port all the way. Now, if you are using a Serial to USB, Make sure you have the correct COM port. The Adapter will sometimes pick a different com port each time you plug it in (Ours will change COM ports randomly, I'm really not sure why).

You can check for the COM port in device manager. to get to Device manager, right click on My Computer, then click properties. I can't remember on which tab device manager is (I have vista), so click throught them to find it. in Device Manager, you should see an entry for Printer and COM ports (Or something similar to that). Open the List. You should see you adapter listed with the COM port listed after it.
__________________
Michael Adam
Director, Central Valley Robotics

FLL and FLL Jr. Affiliate Partner, Central California (2009-Present)
Member, Central Valley Regional Planning Committee (2012-Present)
Volunteer of the Year, Central Valley Regional (2015)
FRC Control System Advisor (2013-Present)
FRC Scorekeeper (2015-Present)
Mentor, Team 1671 (2009-Present)
Member, Team 1671 (2005-2009)
  #10   Spotlight this post!  
Unread 28-01-2008, 17:02
iPilipino's Avatar
iPilipino iPilipino is offline
Registered User
FRC #2347 (C-Bots)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Copiague, NY
Posts: 24
iPilipino is an unknown quantity at this point
Re: Code Error when I try to program it

Quote:
Originally Posted by adamm View Post
The Code error Light on the Operator interface is supposed to turn red when you are in program mode.

Now, if the robot automaticly sets the Program State light to orange when it gets power, you still have to press it down for 4-5 seconds.

There are a few things to check, first make sure everything is wired and working properly; you could have a faulty DB9 Cable. Make sure you are plugged into the program port all the way. Now, if you are using a Serial to USB, Make sure you have the correct COM port. The Adapter will sometimes pick a different com port each time you plug it in (Ours will change COM ports randomly, I'm really not sure why).

You can check for the COM port in device manager. to get to Device manager, right click on My Computer, then click properties. I can't remember on which tab device manager is (I have vista), so click throught them to find it. in Device Manager, you should see an entry for Printer and COM ports (Or something similar to that). Open the List. You should see you adapter listed with the COM port listed after it.

the COM port isnt a problem because I figured that i have to use a certain COM port. So I got that working.

Going to the device manager is a problem because I am using a school computer to program it and it has SO MANY restrictions.

Maybe we do have a faulty DB9 because when Mark McLeod went to my school to help us with programming, he used his own laptop that doesnt need a DB9 to connect. It had its own built-in port. So maybe the DB9 is the problem. Im not 100% sure about that though, so if you guys got other ideas to help me upload the program in the controller, then please just let me know. I tried every single thing that you guys said and it still didnt work. Maybe it is the DB9 because thats the only thing we havent tried (I mean using a different one).
__________________
"The things that come to those who wait may be the things left by those that got there first."
  #11   Spotlight this post!  
Unread 28-01-2008, 21:45
Jim E Jim E is offline
Registered User
FRC #1523 (M.A.R.S.)
Team Role: Mentor
 
Join Date: Jun 2006
Rookie Year: 2005
Location: Lantana, FL
Posts: 188
Jim E has a reputation beyond reputeJim E has a reputation beyond reputeJim E has a reputation beyond reputeJim E has a reputation beyond reputeJim E has a reputation beyond reputeJim E has a reputation beyond reputeJim E has a reputation beyond reputeJim E has a reputation beyond reputeJim E has a reputation beyond reputeJim E has a reputation beyond reputeJim E has a reputation beyond repute
Re: Code Error when I try to program it

If you can, find another laptop with regular serial ports. It doesn't have to be powerful, we used a PII our first couple years. Make sure you use the new black cables in the KOP. Run IFI loader 1.10 *.hex files using a Flash Stick to verify correct operation.

It may be the restrictions the school district is placing on your user account. Industry and schools get a little carried away with security because some hackers love a challenge. Restricting serial ports is not unheard of.

It might also be interrupt errors within the laptop your using. Sometimes other devices use the same interrupts. This problem existed more with Win98, WinME, and some Win2K installations. XP doesn't care.

Also check the settings of the serial port. I think the settings are 115K baud, 8 data bits, 0 stop bits, no parity. Check the IFI Programming tips manual to be sure.

Download into the robot the default.hex file from FIRST. This should ALWAYS work if no changes have been made to it.

If the above does work, then you have a program error in your code. That Dreaded red light of death ( or orange in your case because it happened so fast) does appear quick if there is a While loop error in Initialization.

I hope this helps.
__________________
Team MARS = 1.523 AU from the SUN!

Jim E.
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
Error in code light on, trouble finding error Bryan Herbst Programming 16 12-10-2007 21:59
Error when compiling paulcd2000 Programming 2 21-01-2007 14:05
Code error on RC after downloading "bells and whistles" version of Kevins camera code DanDon Programming 6 10-01-2006 18:07
InterruptVectorLow error when we compile Redneck Programming 5 02-02-2005 22:57
Error when tried to delete thread... Matt Attallah CD Forum Support 4 18-01-2004 21:37


All times are GMT -5. The time now is 19:09.

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