Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   PIC controllers and c++??? (http://www.chiefdelphi.com/forums/showthread.php?t=27608)

K0r34nB0y 07-04-2004 17:48

PIC controllers and c++???
 
Look at this
I won't even pretend to know what I'm talking about here but wouldn't this compile the same and make it possible to program a robot in c++? Opinions?

Ryan M. 07-04-2004 18:09

Re: PIC controllers and c++???
 
Quote:

Originally Posted by K0r34nB0y
Look at this
I won't even pretend to know what I'm talking about here but wouldn't this compile the same and make it possible to program a robot in c++? Opinions?

It would be great if it works. It should, but that requires actual testing of some programs. :) Great find.

K0r34nB0y 07-04-2004 18:22

Re: PIC controllers and c++???
 
I was lookin through, and it looks like it only supports PIC12's and PIC16's. I think the RC is a PIC18 so I'm not sure if it works. Anyone know for sure?

dez250 07-04-2004 18:25

Re: PIC controllers and c++???
 
i just checked out the specs for that program, it shows support for the PIC 12 and 16 series only as of now. I know we use the PIC 18F8520 unit. Though i do have a linux PIC Loader that was designed for the IFI FRC, and i also was told that MPLAB runs in Linux. Heres the Linux IFI PIC-Loader.

Astronouth7303 07-04-2004 21:26

Re: PIC controllers and c++???
 
Full OOP on an integrated processor? Cool.
I'm not sure if it's really practical or just the engineer impulse. :cool:

But what's the diference between the procs?

Kamikaze 07-04-2004 22:12

Re: PIC controllers and c++???
 
Quote:

Originally Posted by dez250
and i also was told that MPLAB runs in Linux.

Running MPLAB on Linux is problematic. Wine seems to be okay with the installer up to the point where it checks to see if Internet Explorer is installed. Since Internet Explorer isn't native to *nix and wine doesn't like it, wine doesn't work with MPLAB.

The other option is using a virtual machine like VMWare (currently setting this up), Xen or whatever.

Marc P. 12-04-2004 14:05

Re: PIC controllers and c++???
 
Actually, MPLAB IDE does not run under linux via WINE. However, the compiler itself and the linker (c:\mcc18\bin\mcc18.exe) do run perfectly under WINE! I'm using Quanta as the main development suite, and created buttons mapped to scripts to compile and link all files. I've even mapped a button to the linux loader Mike posted above in Quanta, so all development and downloading capability is in one application, rather than having to launch the IFI loader after compiling.

I haven't been able to test yet (since robot is in crate on way to Atlanta), but I'm assured by the documemtation on the sourceforge site that it's operable, and am happy at the prospect of the ability to program under linux :D

jdong 24-04-2004 15:10

Re: PIC controllers and c++???
 
C++ would be much less efficient on such a controller though.

Astronouth7303 24-04-2004 20:57

Re: PIC controllers and c++???
 
Yes, it's called OOP overhaed. And it really sucks for this sort of thing.

Ryan M. 25-04-2004 07:31

Re: PIC controllers and c++???
 
It isn't necesarilaly less efficient. It depends on the compiler. Plus, if you don't use things like runtime polymorphism, you basically have C with classes. And the classes get reduced to hex code that does pretty much the same as equilivant C code.

jdong 25-04-2004 10:05

Re: PIC controllers and c++???
 
Quote:

Originally Posted by Texan
It isn't necesarilaly less efficient. It depends on the compiler. Plus, if you don't use things like runtime polymorphism, you basically have C with classes. And the classes get reduced to hex code that does pretty much the same as equilivant C code.


C++ encourages using classes, which in turn encourages use of functions... All I'm saying is that a school-taught C++ programmer would want to encapsulate everything in classes and functions, which adds significant overhead on our little controller...


On the other hand, inline functions are a great feature of C++, would enhance performance.

Tom Bottiglieri 25-04-2004 10:38

Re: PIC controllers and c++???
 
I have never actually used C++ in too much detail, but I do know a little about it. Could someone give me a run down on whats different between C and C++?

fred 25-04-2004 14:57

Re: PIC controllers and c++???
 
Quote:

Originally Posted by ToMMan b182
I have never actually used C++ in too much detail, but I do know a little about it. Could someone give me a run down on whats different between C and C++?

I am not positive of all the differences since this was my first year using either language for like, 3 years. I talked to a guy from FIRST and he said that they had really looked at using C++, but they decided that using C would be easier for the students in the long run and that C++ was as good for doing the task that we do in FIRST. i.e. programming robots.

Max Lobovsky 25-04-2004 23:16

Re: PIC controllers and c++???
 
I too do not pretend to know what im saying, but i do know that, at least in the early days, C++ compilers would actually convert the C++ code entirely into C code and then use an already existing C compiler to compile that. The point is that it is entirely possible, and i think likely, that you could find or at least modify a compiler to do this for you.

Astronouth7303 26-04-2004 07:34

Re: PIC controllers and c++???
 
Quote:

Originally Posted by ToMMan b182
I have never actually used C++ in too much detail, but I do know a little about it. Could someone give me a run down on whats different between C and C++?

3 words: Object Oriented Programming.


All times are GMT -5. The time now is 22:47.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi