|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools |
Rating:
|
Display Modes |
|
#391
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
I'm in a bit of a bind...I'm having a bit of a problem integrating the PID code available at http://www.kevin.org/frc/2005/ with this new code. I've been looking through the PID code and I have absolutely no idea where to start trying to make them work with one another. I'd greatly appreciate any help I can get here....
|
|
#392
|
|||
|
|||
|
Re: New C18 3.0+ Compatible FRC Code
Kevin.
I'm trying to get the camera code going with the new 3.0 code. I'm not receiving ACKs or NCKs so it fails at init state 3 return value 131. serial_ports.h/c looks ready to go for port2 9600 baud and interrupts. Integrated camera.c terminal.c and tracking.c without any issues. Anything obvious come to mind reagrding serial port initialization? Chad |
|
#393
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
Try setting serial port 2 to 115200 baud. Dave |
|
#394
|
|||
|
|||
|
Re: New C18 3.0+ Compatible FRC Code
I've been running into an odd problem with encoders.
Encoder 1 works perfectly fine during the teleop period, but does not give me anything during the autonomous one. Encoder 2 works in both teleop and autonomous. The initialization functions is called during both the autonomous and disabled initialization routines. I am running your latest code build, as far I as know, with MPLAB 8 and C18 3.10. While the robot is shipped already, I'd love to hear if you have any suggestions for what to try. It could be that the encoder is working, and is giving the correct signals, but is always printing a zero in my debug statement, and the code that is executing makes me believe that it is seeing a zero (as the count). But when I print out the count in the teleop mode, I get numbers that make sense. |
|
#395
|
|||
|
|||
|
New C18 3.0+ Compatible FRC Code
Kevin
Do you have access to an Explorer 16 board from Microchip?? |
|
#396
|
|||
|
|||
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
I'll try with last year's board, if I can get the time (we removed our encoders from the bot for this reason). |
|
#397
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
-Kevin |
|
#398
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
-Kevin |
|
#399
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
-Kevin |
|
#400
|
|||
|
|||
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
Another weird thing with my autonomous code, is that unless I have a DEBUG in the PWM() function body, the robot doesn't move. I'm updating the PWM function every main loop, and I noticed that unless I have that DEBUG statement there, the robot doesn't move. Once I added it, or commented it in (when testing), the robot started moving again. Any ideas? Thanks. |
|
#401
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
-Kevin |
|
#402
|
|||
|
|||
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
this was done to gain experience with the tools and processors... |
|
#403
|
|||
|
|||
|
Re: New C18 3.0+ Compatible FRC Code
There is a later theme about not allowing enough time for the circular buffer to fill. I suspect that might be what I was doing wrong.
|
|
#404
|
|||
|
|||
|
Re: New C18 3.0+ Compatible FRC Code
Just wanted to post a big THANK YOU to Kevin for his code...
|
|
#405
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
You're welcome
. Of the teams that used my code last week, did any bugs pop up?-Kevin |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Does the camera code suits to all versions of MPLAB and C18? | razer | Programming | 3 | 04-01-2007 14:50 |
| Trying to follow C18 interrupt context code... | dcbrown | Programming | 5 | 21-12-2006 09:01 |
| Error w/ FRC code | JamesBrown | Programming | 2 | 08-01-2005 16:17 |
| Programming code Fix FRC | Ferazel2001 | Programming | 6 | 08-02-2004 02:46 |
| FRC default code | hedgehogger | Programming | 2 | 21-01-2004 18:41 |