Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

what microcontrollers program in C++

Status
Not open for further replies.
Q

Quan

Guest
Hi what microcontroller programs in C++ I wanted to know for a teacher who wanted to program chips...

Any series will work as long as C++ works best for it...

Thanks
 
C++ is not suited for microcontrollers as it is too abstract and bloaty. But C is pretty popular.
 
For microcontrollers memory is at a premium. Though correctness is valued and C++ helps with correctness, if it doesn't fit, it doesn't work. Even C can produce bloated code, but there's less waste when you try to reduce memory consumption by sharing as much as you can. That is, forget protection, forget object orientation... do it right the manual way, and make it small.

If you're dealing with embedded computers, then there's a lot more memory to work with, and hence c++ may be a proper solution.

(I've never tried writing a C++ program for AVR with g++, it's possible that it would work perfectly fine, though...)
 
Quan said:
Hi what microcontroller programs in C++ I wanted to know for a teacher who wanted to program chips...

Any series will work as long as C++ works best for it...

Thanks


If you're using PIC Microcontroller, I would suggest HiTec PIC C. It'll make programming much easier once you get used to the program. You can down load student version (or PICCLITE) from HiTec site. You can do some serious programming even with student version. It works best with MPLab, also can be down loaded from Microchip.
 
boxer4 said:
For microcontrollers memory is at a premium. Though correctness is valued and C++ helps with correctness, if it doesn't fit, it doesn't work.

Not just the size of the memory, the complexity of the stack possible on a microcontroller does not jive with the way C++ destroys objects to reclaim memory. Even some C features like a pointer to a function don't jive with a microcontroller's capabilities, although the complier will still let you do it it may be inefficient.
 
regarding Programing SC12 Microcontroller

I want to program a SC 12 microcontroller for TDM usin c or C++ if anybody can help me with this ????
 
I'm going to say ARM just because they seem to have microcontrollers out there using the same core that processors use that is normally coded with C/C++, and the sheer number of cheap hardware and software development tools available.
 
c/c++ is the basic and a powerfull tool to control the operations of the designed circuit for any perpose. so it is the basically the coding control system of the circuit. after coding in c/c++ the circuit function will be directed to the mentioned point.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top