|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: The 8.2 (or 8.3) Battery Voltage Bug
I have some information that may be relevant. There is a problem with the silicon in the PIC chip that involves the interrupts not properly restoring register values upon return. I'm not sure if this could cause the problems you're all reporting, but the possibility exists - it may be this problem that the new libraries are supposed to fix.
You can read about this and other errors in the silicon of this line of chips here: http://ww1.microchip.com/downloads/e...doc/80221b.pdf |
|
#2
|
||||
|
||||
|
Re: The 8.2 (or 8.3) Battery Voltage Bug
Quote:
|
|
#3
|
|||
|
|||
|
Re: The 8.2 (or 8.3) Battery Voltage Bug
The new libraries didnt fix are problem. And the only interupts used are with Kevin's code.
|
|
#4
|
|||
|
|||
|
Re: The 8.2 (or 8.3) Battery Voltage Bug
We had this problem too - our workaround was to stop using structures. It seemed that even having a simple struct of a few integers would cause rampant corruption and crashing. I'd suggest that as something to try if you're at your wit's end...
|
|
#5
|
||||
|
||||
|
Re: The 8.2 (or 8.3) Battery Voltage Bug
Quote:
|
|
#6
|
||||
|
||||
|
Re: The 8.2 (or 8.3) Battery Voltage Bug
Quote:
-Kevin |
|
#7
|
||||
|
||||
|
Re: The 8.2 (or 8.3) Battery Voltage Bug
We were using a struct too, in our auto routines....
Has everyone here with this problem used a struct? It'd be funny if it was something as simple as that, but just checking... |
|
#8
|
||||
|
||||
|
Re: The 8.2 (or 8.3) Battery Voltage Bug
Quote:
|
|
#9
|
|||||
|
|||||
|
Re: The 8.2 (or 8.3) Battery Voltage Bug
Quote:
Code:
#pragma interruptlow InterruptHandlerLow save=PROD,section("MATH_DATA"),section(".tmpdata")
![]() EDIT: What version of the compiler is everyone using? Last edited by Eldarion : 06-03-2006 at 13:36. Reason: Added a question |
|
#10
|
||||
|
||||
|
Re: The 8.2 (or 8.3) Battery Voltage Bug
Quote:
-Kevin |
|
#11
|
||||
|
||||
|
Re: The 8.2 (or 8.3) Battery Voltage Bug
Quote:
So far, the IFI folks think that ADC_Int_Handler() is too long, but I'm not sure I agree (since I'm not seeing the RLOD, and it works flawlessly on my 2004 RC). Oh, and to answer your question, I'm using mcc18 v2.40. (Is an update available to us?) |
|
#12
|
||||
|
||||
|
Re: The 8.2 (or 8.3) Battery Voltage Bug
Yes, we are using v 2.40 as well, this is the version that was supplied in the kit. Did we miss an update? I don't recall seeing anything come across the board...
Perhaps that is the root of our issues, From the IFI Website: NOTE: To Compile 2004, 2005 or 2006 code, use MPLAB ver 7.20 and C18 Compiler ver 2.40 (newer versions can not be used) Kevin...you didnt give us base code compiled with 2.44 did you...? Even if so, we do appreciate all the hard work you do to provide us with the code each year, so Thank You! ![]() |
|
#13
|
||||
|
||||
|
Re: The 8.2 (or 8.3) Battery Voltage Bug
Quote:
Quote:
Quote:
-Kevin |
|
#14
|
|||
|
|||
|
Re: The 8.2 (or 8.3) Battery Voltage Bug
I'm using 2.40 and I haven't seen any of the problems stated here.. The real test will come on Thursday, when I see if any of these problems have appeared since we put it in the box...
I'm going to check tonight to see if we have a spare 2005/2004 RC that we can bring, but as of the current FIRST rules, they are not allowed. Maybe someone should go post on the Q&A forums, explaining the situation.. maybe we could get the 2005 RC cleared to use until this problem is resolved (It DOES work with the field control system, we were using it at the scrimmage with no problems) It wouldn't even be a tight fit for me.. 55% usage on the 2005 controller ![]() Someone with access to a 2006 RC: Disable compiler optimizations... Project->Build Options->Project->MPLAB C18->Optimization (Dropdown), Disable. If that fixes it, then its a compiler bug (But it can be worked around!) I can tell you right now I've had all the optimizations enabled since the second week of build, and haven't seen this problem. |
|
#15
|
||||
|
||||
|
Re: The 8.2 (or 8.3) Battery Voltage Bug
Quote:
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Reading battery voltage in software | RbtGal1351 | Programming | 17 | 21-10-2007 13:07 |
| How to obtain battery voltage from within EasyC | DavidSJohnson | Programming | 2 | 14-02-2006 00:05 |
| battery voltage compensation | Rickertsen2 | Programming | 5 | 17-10-2005 22:12 |
| RC Circuits | Melissa Nute | Math and Science | 3 | 25-01-2004 05:02 |
| Battery Chargers | Neal Probert | Electrical | 46 | 16-02-2003 22:31 |