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.

Microcontroller Questions

Status
Not open for further replies.
I'm starting to work on some microprocessors/microcontrollers and I'm a compete noob so no big words please.

I'm writing some programs using c++, having read some basic PIC programming I have realized that c++ isn't exactly compatible with a large number of microcontrollers, namely I've never needed to code for PICs before. I'm a noob in programming too, so that's why I made this oversight. Having said that in currently stumped on the following questions:

1.) What type of high level languages are common for microcontroller programming? Basic, what else

2.) C++ is that realistically only an option for chips like Intel and AMD for personal computers?

3.) What about java? Are there any microprocessors that exist that run on Java? Given that Java is a run time language, how is that a problem for real time applications? Apart from the fact that it might lag. I'm thinking more from the perspective of java being write popular.

4.) Is there an easy easy way of converting c++ to other languages? Like Basic? I'm guessing no but doesn't hurt to ask!

5.) Bugs - say I use a smartphone as my microcontroller, these are somewhat buggy/unstable (possibly due to higher complexity), are less powerful microcontrollers more reliable? Consequently more preferable? Why have smartphones not made it into more general applications? I know chucking a smart phone to control your toaster is a bit overkill but I'm sure there's a million other things for which a smartphone is overkill but due to being able to code in c++ and is a ready made general purpose computer, it's just easier to use a smartphone rather than designing your own circuits from scratch?
 
Supercalifragilisticexpialidocous.. That's the big word out of the way..

1) I believe there is C, Basic, Pascal, Forth, C++, modulo, flowchart.... loads
2) C++ comes with a large memory overhead.... Anything smaller than 4k of ram really shouldn't use it..
3) Microsoft do a C# ( type of java ) It runs on a tinyCLR operating system... Only the ARM micro at the moment..
4) No.... Its a ball-ache..
5) De bugging comes with the turf... Most micro's have debugging facilities and make it easier...

The Arduino platform is programed with a sort of C++.. Its not a full implementation of C++ but it helps you get into micro's if you know C++.
 
Last edited:
I guess the most important point here is that C is not the same thing as C++. C is simple and is used extensively in microcontrolles, along with direct assembler programming.
C++ however is what I´d call "C, but with added classes, inheritance and dynamic memory allocation", which as Ian noted has large memory overhead, so it is rarely used for small micros.

As for Java, there are some micros that incorporate a Java virtual machine, aka java interpreter that allows you to run such code, but I have no idea why anyone would want to use it.
 
Have a look at oshonsoft.com basic. It has a simulator environment and a graphic view of the chips special function registers etc. which help when debugging. Fairly cheap as well. I started with it.
 
Yep!! What KISS said....

Actually.... regarding number 5.... I have an old touchpad2 that NEVER gets used anymore... I'm thinking of converting it to a media station for use in my car..... I can get all my songs on it... I'm sure loads can be done with old smartphones....
 
Last edited:
Status
Not open for further replies.

Latest threads

Back
Top