![]() |
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
.:cool: |
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. |
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.
|
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. |
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. |
Re: How to TRansferring easyc to mplab
Quote:
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 |
Re: How to TRansferring easyc to mplab
I had thought that too, Q but ill look into it somewhere in "all" my sparetime.
|
Re: How to TRansferring easyc to mplab
Quote:
|
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?
|
| All times are GMT -5. The time now is 00:57. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi