Go to Post overly agressive play, sudden torque gains, and signs of robot acne will cause immediate suspicion, and may be used as justification for a complete tear-down inspection - dlavery [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 24-02-2008, 11:24
SL8's Avatar
SL8 SL8 is offline
...
AKA: Jesus
FRC #0647 (Cyber Wolf Corps)
Team Role: Programmer
 
Join Date: Dec 2007
Rookie Year: 2008
Location: Killeen, Texas (Fort Hood)
Posts: 352
SL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud of
Send a message via Yahoo to SL8
How to TRansferring easyc to mplab

During our 10 hr window today i transferred my easyC program into mplab. It was long and tedious, and I'm still working on taking care of " Set PWM". Other than that, everything else has just involved converting everything through notepad to a .c or .h file and then cutting and pasting in the appropiate file of the default code. ( I replaced default_routine with operator control.) I did this because I am tired of dragging blocks, and I think I can handle MPlab. Out of curiosity, does anyone know an easier way to do this? Also, I am willing to walk anyone through this process if you would like, just pm me
.
__________________


  #2   Spotlight this post!  
Unread 24-02-2008, 12:59
David Bliss David Bliss is offline
Registered User
FRC #0904
 
Join Date: Jan 2008
Rookie Year: 2004
Location: Michigan
Posts: 4
David Bliss is an unknown quantity at this point
Send a message via AIM to David Bliss
Re: How to TRansferring easyc to mplab

You probably want to look into WPILib. Some of the samples should look somewhat familiar. If you don't use WPILib, you eventually try to mix oil and water. That becomes particularly obvious with the various sensors; unless I'm mistaken, all the functions easyC uses to work with sensors just plain don't exist in the default code, nor in Kevin's code.

There are plenty of threads out there on using WPILib. I haven't looked for one that covers using WPILib with MPLab, because I personally prefer to go with Eclipse. If there's no thread already, you should get an answer soon enough from someone if you post in WPILib's subforum.

Good luck.
  #3   Spotlight this post!  
Unread 24-02-2008, 13:21
SL8's Avatar
SL8 SL8 is offline
...
AKA: Jesus
FRC #0647 (Cyber Wolf Corps)
Team Role: Programmer
 
Join Date: Dec 2007
Rookie Year: 2008
Location: Killeen, Texas (Fort Hood)
Posts: 352
SL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud of
Send a message via Yahoo to SL8
Re: How to TRansferring easyc to mplab

My issue is not that the transferred code does not work. I edited the default code header and source code files so heavily it could hardly be considered anything but an amalmagation of code. I was simply wondering if there was an easier way to convert it all. In truth the work it took to edit it all together was probably more than if I had just written it all in mplab to begin with. Thanks though.
__________________


  #4   Spotlight this post!  
Unread 24-02-2008, 13:25
Tim Arnold's Avatar
Tim Arnold Tim Arnold is offline
1902 UCF Mentor; 1523 MARS Alumni
FRC #1902 (Exploding Bacon)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Orlando, FL
Posts: 460
Tim Arnold has a reputation beyond reputeTim Arnold has a reputation beyond reputeTim Arnold has a reputation beyond reputeTim Arnold has a reputation beyond reputeTim Arnold has a reputation beyond reputeTim Arnold has a reputation beyond reputeTim Arnold has a reputation beyond reputeTim Arnold has a reputation beyond reputeTim Arnold has a reputation beyond reputeTim Arnold has a reputation beyond reputeTim Arnold has a reputation beyond repute
Send a message via AIM to Tim Arnold Send a message via MSN to Tim Arnold
Re: How to TRansferring easyc to mplab

AFAIK easyC generates WPLib-compliant code... so if you used its libraries, you could essentially just drop your code into mplab and it would work stock.

What David said about sensors being oil-and-water is definitely true, as WPLib/easyC uses the user processor to handle sensor routines, which is totally different than Kevin's code.
  #5   Spotlight this post!  
Unread 24-02-2008, 14:47
SL8's Avatar
SL8 SL8 is offline
...
AKA: Jesus
FRC #0647 (Cyber Wolf Corps)
Team Role: Programmer
 
Join Date: Dec 2007
Rookie Year: 2008
Location: Killeen, Texas (Fort Hood)
Posts: 352
SL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud of
Send a message via Yahoo to SL8
Re: How to TRansferring easyc to mplab

I'm sorry, forgotten to mention that I imported the API.h file into MPlab. Yes, I was using WPlib with easyC before I transferred the code.
As far as I have seen, the code works. I am seriously thinking about rewriting the whole thing from scratch in MPlab though, just to make sure.
As for the sensors, I was not aware of that, thanks. Last I checked they were working, however for the sake of caution I may write it myself during our next fix it window. The last thing I would want is for me to have to rewrite it during the practice rounds at competition. I am the only programmer, a freshman who just started learning it at the beginning of build. Again thanks for telling me about the sensors, I'll look into that.
__________________


  #6   Spotlight this post!  
Unread 24-02-2008, 14:53
Qbranch Qbranch is offline
wow college goes fast.
AKA: Alex
FRC #1024 (Kil-A-Bytes)
Team Role: Alumni
 
Join Date: Apr 2006
Rookie Year: 2006
Location: Indianapolis
Posts: 1,174
Qbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond repute
Re: How to TRansferring easyc to mplab

Quote:
Originally Posted by Tim Arnold View Post
What David said about sensors being oil-and-water is definitely true, as WPLib/easyC uses the user processor to handle sensor routines, which is totally different than Kevin's code.
I'm really confused. Are you trying to say that WPIlib/easyC run the sensors from the master processor? If so that is not true.

Kevin's (or anybody else's sensor drivers) or WPIlib/easyC's drivers for that matter all run in the same place. All WPIlib/easyC does is hide what is actually happening from you, just as C hides you from what it actually takes to multiply an integer by an integer.

-q
__________________
Electrical Engineer Illini
1024 | Programmer '06, '07, '08 | Driver '08
  #7   Spotlight this post!  
Unread 24-02-2008, 15:17
SL8's Avatar
SL8 SL8 is offline
...
AKA: Jesus
FRC #0647 (Cyber Wolf Corps)
Team Role: Programmer
 
Join Date: Dec 2007
Rookie Year: 2008
Location: Killeen, Texas (Fort Hood)
Posts: 352
SL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud of
Send a message via Yahoo to SL8
Re: How to TRansferring easyc to mplab

I had thought that too, Q but ill look into it somewhere in "all" my sparetime.
__________________


  #8   Spotlight this post!  
Unread 24-02-2008, 18:40
Tim Arnold's Avatar
Tim Arnold Tim Arnold is offline
1902 UCF Mentor; 1523 MARS Alumni
FRC #1902 (Exploding Bacon)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Orlando, FL
Posts: 460
Tim Arnold has a reputation beyond reputeTim Arnold has a reputation beyond reputeTim Arnold has a reputation beyond reputeTim Arnold has a reputation beyond reputeTim Arnold has a reputation beyond reputeTim Arnold has a reputation beyond reputeTim Arnold has a reputation beyond reputeTim Arnold has a reputation beyond reputeTim Arnold has a reputation beyond reputeTim Arnold has a reputation beyond reputeTim Arnold has a reputation beyond repute
Send a message via AIM to Tim Arnold Send a message via MSN to Tim Arnold
Re: How to TRansferring easyc to mplab

Quote:
Originally Posted by Qbranch View Post
I'm really confused. Are you trying to say that WPIlib/easyC run the sensors from the master processor? If so that is not true.

Kevin's (or anybody else's sensor drivers) or WPIlib/easyC's drivers for that matter all run in the same place. All WPIlib/easyC does is hide what is actually happening from you, just as C hides you from what it actually takes to multiply an integer by an integer.

-q
I stand corrected, I thought that the sensor processing was done on the user processor for some reason. Thanks!
  #9   Spotlight this post!  
Unread 24-02-2008, 18:42
SL8's Avatar
SL8 SL8 is offline
...
AKA: Jesus
FRC #0647 (Cyber Wolf Corps)
Team Role: Programmer
 
Join Date: Dec 2007
Rookie Year: 2008
Location: Killeen, Texas (Fort Hood)
Posts: 352
SL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud of
Send a message via Yahoo to SL8
Re: How to TRansferring easyc to mplab

So the way that I am doing the transfer is, if not the best way, a valid one?
__________________


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
Transferring code over to mplab from easyC SL8 Programming 4 25-02-2008 08:46
How to get EasyC code into MPLab rhoads2234 Programming 6 08-06-2007 14:45
Transferring EasyC for Competition Day Kingofl337 Programming 0 06-03-2006 11:38
Transferring EasyC for Competition Day Kingofl337 Programming 0 06-03-2006 11:32


All times are GMT -5. The time now is 01:48.

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