|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
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? |
|
#2
|
||||
|
||||
|
Re: PIC controllers and c++???
Quote:
Great find. |
|
#3
|
||||
|
||||
|
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?
|
|
#4
|
|||
|
|||
|
Re: PIC controllers and c++???
C++ would be much less efficient on such a controller though.
|
|
#5
|
|||||
|
|||||
|
Re: PIC controllers and c++???
Yes, it's called OOP overhaed. And it really sucks for this sort of thing.
|
|
#6
|
||||
|
||||
|
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.
|
|
#7
|
|||
|
|||
|
Re: PIC controllers and c++???
Quote:
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. |
|
#8
|
|||
|
|||
|
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++?
|
|
#9
|
||||
|
||||
|
Re: PIC controllers and c++???
Quote:
|
|
#10
|
|||||
|
|||||
|
Re: PIC controllers and c++???
Quote:
|
|
#11
|
||||
|
||||
|
Re: PIC controllers and c++???
Quote:
1. Classes - like structs from C 2. Polymorphism (runtime and compile) - Basically this is the ability to have muptiple functions with the same name 3. Templates - generic classes 4. Exceptions - error handling mechanism |
|
#12
|
|||||
|
|||||
|
Re: PIC controllers and c++???
Polymorphism and Templates also cover Interfaces and Sub- & Super-classes.
|
|
#13
|
||||
|
||||
|
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.
|
|
#14
|
|||||
|
|||||
|
Full OOP on an integrated processor? Cool.
I'm not sure if it's really practical or just the engineer impulse. ![]() But what's the diference between the procs? |
|
#15
|
|||
|
|||
|
Re: PIC controllers and c++???
Quote:
The other option is using a virtual machine like VMWare (currently setting this up), Xen or whatever. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| initialization program and speed controllers | rosebud | Programming | 15 | 05-10-2004 03:35 |
| Cheaper speed controllers | Max Lobovsky | Kit & Additional Hardware | 8 | 09-03-2004 13:18 |
| PIC Programmers | seanwitte | Electrical | 8 | 18-04-2003 17:04 |
| speed controllers | archiver | 2000 | 5 | 24-06-2002 00:19 |
| Calibrating speed controllers and joysticks | thedillybar | Technical Discussion | 4 | 11-02-2002 13:24 |