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: ***

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.

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.

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.

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.

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 had thought that too, Q but ill look into it somewhere in “all” my sparetime.

I stand corrected, I thought that the sensor processing was done on the user processor for some reason. Thanks!

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