Best programming language for an EE?

In summary, it is recommended to start with C as the primary language for small embedded systems due to its low overhead run-time footprint. Learning C++ first can be overwhelming for beginners and may not be suitable for most micro-controllers. Additionally, C has stood the test of time and is widely used in state-of-the-art systems. Arduino is a good environment for rapid prototyping, but for mass production, it would be more practical to use a PIC or similar platform. PICs do not use Basic as their primary language.
  • #1
GratefulDean
3
0
After some research it seems that C would be the best choice. But I also hear that it is better to learn C++ first, then transition to C.

I am at the beginning of my college career so am not sure where I want to end up in EE, although I have started a list of projects that I can do in the interim: gyro/light switched LED's, helmet bluetooth mic/headphone, motion/light activated camera... and have been looking at some robotic kits as well (this is why I am going EE instead of ME, I can sit in my garage, tinker and make the things I want/need).

For these projects I had planned going with Arduino but have been told that if I am wanting to go beyond hobbyist it would be better to go with PIC or similar. I understand I will need a language to program these. Also, I would like to have a leg up on the competition upon graduation.

Thanks,
Dean
 
Engineering news on Phys.org
  • #2
I would start with C, it's the primary language for small embedded systems because of it's low overhead run-time footprint. Trying to learn C++ first will turn your head to mush if you try to use it with most micro-controllers sized systems. The C++ run-time requirements on anything less than a 32 bit controller would require you to not use most the fancy OOP/POO features that can make C++ a trainwreck for neophytes.

http://www.codinghorror.com/blog/2007/03/your-code-oop-or-poo.html
 
  • #3
nsaspook said:
I would start with C, it's the primary language for small embedded systems because of it's low overhead run-time footprint. Trying to learn C++ first will turn your head to mush if you try to use it with most micro-controllers sized systems. The C++ run-time requirements on anything less than a 32 bit controller would require you to not use most the fancy OOP/POO features that can make C++ a trainwreck for neophytes.

http://www.codinghorror.com/blog/2007/03/your-code-oop-or-poo.html

I appreciate the reply. This gives me the confidence to press on. Thanks!
 
  • #4
Hello GD -- First I would start with english, -- yes a wise crack re EE's but not aimed at you, but strong communication skills are important and valuable ( your post is fine)...moving on ...

I agree is it "C" or some derivative... While not the original it is the language behind Unix today ( since early '70s) and is THE language for many state of the art systems being developed today - embedded systems, etc. So is had stood the test of time AND is current. If you become proficient in C you will be able to relate to most other languages.

Oh -- re the Arduino vs PIC etc - the advantage of arduino is rapid development, it is 2 smaller steps to go Adruino and then PIC, to just go to PIC, but both are fine. For $50 in PIC you are programming PIC - for $50 in Arduino you are making things. However if you want to make a "product" as in 100s to 1000's of something, it will most likely be in PIC type platform. ( I might still prototype in Arduino - then revise the design to PIC for production - in my field I am continually challenged with customers taking prototypes and calling them products 2c)
 
Last edited:
  • #5
Windadct said:
Hello GD -- First I would start with english, -- yes a wise crack re EE's but not aimed at you, but strong communication skills are important and valuable ( your post is fine)...moving on ...

Wise guy, eh?

Windadct said:
Oh -- re the Arduino vs PIC etc - the advantage of arduino is rapid development, it is 2 smaller steps to go Adruino and then PIC, to just go to PIC, but both are fine. For $50 in PIC you are programming PIC - for $50 in Arduino you are making things. However if you want to make a "product" as in 100s to 1000's of something, it will most likely be in PIC type platform. ( I might still prototype in Arduino - then revise the design to PIC for production - in my field I am continually challenged with customers taking prototypes and calling them products 2c)

This is a great perspective. I do think Arduino would act as an excellent "starter" environment, giving me an idea of what it takes to build something electronic. Also, one of my projects I hope to actually use. I recently bought a 1965 camper that I have gutted to the frame (I actually had to peel back the roof and one side to replace some framing). As part of the rebuild I would like to install some accent lighting along the floor that comes on at night, when someone steps up inside.

If I may ask, what exactly is your field?
 
  • #6
in my field I am continually challenged with customers taking prototypes and calling them products 2c)

I had that trouble with management...

Do PICs use Basic? That'd be a big attraction to me.Spook - I REALLY enjoyed that link. And I don't even know what object-oriented-code is.
 
Last edited:
  • #7
Hello again - I am an Area Manager for Power Electronics Company ( Basically Sales and Sales Engineering) - however in previous positions I works for an Engineering Firm that specialized in http://www.adventdesign.com/A_productdes_method.html- that was a really good education, as well as automation and industrial robotics.

IN larger power electronics ( >10 KW) there are too many "products" that are not ready for prime time... the cost and effort to develop GOOD products is just not acceptable to the customer... the paradox is that a poor product ( immature product) will not succeed in the market anyway ( too expensive, specification not fully developed, not fully tested etc)

Jim - The Basic Stamp products from Parrallax use a form of basic - available though Radio Shack. The are OK for most hobby type projects, but anything needing accurate timing (real time application) probably can not be done in basic, unless they have some special predefined functions. For most users that is not an issue.
 
  • #8
Windadct said:
...

Jim - The Basic Stamp products from Parrallax use a form of basic - available though Radio Shack. The are OK for most hobby type projects, but anything needing accurate timing (real time application) probably can not be done in basic, unless they have some special predefined functions. For most users that is not an issue.

Thanks W-A. I have used microchip Domino with their interpreted basic and it is indeed slow. I never advanced to the stage of compiling for the two little projects I did, but have considered their less expensive PIC's for hobby stuff now that I'm retired.

Looks like Arduino has caught TI's attention , they have a competing product now.
http://e2e.ti.com/group/universityprogram/educators/w/wiki/2422.beaglebone-black.aspx?DCMP=univ-beagleblack-en&HQS=univ-beagleblack-em-tool&sp_rid_pod4=ODM5Mzc3NTg5NgS2&sp_mid_pod4=41440406

It's cheap enough for hobby work yet looks quite advanced compared to what I've ever done in the way of micros.

You guys' enthusiasm is going to interest this old dog in some new tricks...
 
  • #9
Windadct said:
Hello GD -- First I would start with english, -- yes a wise crack re EE's but not aimed at you, but strong communication skills are important and valuable ( your post is fine)...moving on ...

I agree is it "C" or some derivative... While not the original it is the language behind Unix today ( since early '70s) and is THE language for many state of the art systems being developed today - embedded systems, etc. So is had stood the test of time AND is current. If you become proficient in C you will be able to relate to most other languages.

Oh -- re the Arduino vs PIC etc - the advantage of arduino is rapid development, it is 2 smaller steps to go Adruino and then PIC, to just go to PIC, but both are fine. For $50 in PIC you are programming PIC - for $50 in Arduino you are making things. However if you want to make a "product" as in 100s to 1000's of something, it will most likely be in PIC type platform. ( I might still prototype in Arduino - then revise the design to PIC for production - in my field I am continually challenged with customers taking prototypes and calling them products 2c)
Or, you know, use AVRs for the products, since that's what the Arduino uses. I've breadboarded an ATmega328 before, it's not difficult at all. You wouldn't need to change any bit of the code, as I believe the Arduino code license allows it to be used in commercial products. The Arduino IDE even has an ArduinoISP sketch that you can use to flash Arduino code, bootloader, and set fuse bits onto an appropriate ATmega. Using AVRdude, you can use Arduino ISP to flash non-Arduino code onto non-Arduino AVRs (So far, I've flashed an ATtiny85 with a simple "blink" program with little trouble).

You only need one Arduino board, which costs about $20, and then you can get blank ATmega328Ps (the chip the UNO is based around) + supporting caps, crystal, and voltage regulator for less than $5 a set from Mouser or Digikey.

For things like this, the deeper skills are far more important than superficial knowledge of one specific language or one specific uC architecture. If you spend all your time learned the specifics of PIC because it's "beyond hobbyist", what do you do if you apply for a job at a place that uses TI's TMSx products? How about Freescale's uC line? Maxim's? NXP's? Atmel's? Fairchild's? ON's? Would you be able to adapt, or would you just be a PIC code monkey?
 

1. What is the best programming language for an EE?

The best programming language for an EE (Electrical Engineer) largely depends on the specific project or task at hand. Some commonly used languages in the field of EE include C, C++, MATLAB, and Verilog. It is important to consider the requirements and specifications of the project when choosing a programming language.

2. Is there a specific programming language that is better for hardware or software projects?

Generally, both hardware and software projects in the field of EE require a combination of languages. Hardware projects may require languages like Verilog or VHDL for designing and implementing hardware systems, while software projects may utilize languages like C++ or MATLAB for data analysis and simulation. It is important to have a diverse knowledge of programming languages for both hardware and software projects.

3. Can I use a general-purpose programming language for an EE project?

Yes, general-purpose programming languages like Python, Java, and C++ can be used for EE projects. However, these languages may not have specific libraries or tools for certain hardware or software applications. It is important to consider the project requirements and choose a language that has the necessary capabilities and resources.

4. Which programming language is better for data analysis in EE?

MATLAB is a commonly used language for data analysis in EE. It has powerful built-in functions and toolboxes specifically designed for data analysis and simulation in the field of engineering. Other languages like Python or R also have data analysis capabilities and may be used depending on the project requirements.

5. Do I need to learn multiple programming languages as an EE?

It is not necessary to learn multiple languages as an EE, but having a diverse knowledge of programming languages can be beneficial. Depending on the project or task, different languages may be more suitable. It is important to have a strong foundation in at least one language and be able to adapt to different languages and tools as needed.

Similar threads

  • Programming and Computer Science
Replies
15
Views
1K
  • Computing and Technology
Replies
16
Views
1K
  • Computing and Technology
Replies
2
Views
1K
  • Electrical Engineering
Replies
5
Views
2K
Replies
1
Views
2K
  • Programming and Computer Science
2
Replies
54
Views
3K
  • Electrical Engineering
Replies
17
Views
23K
  • Programming and Computer Science
Replies
8
Views
878
  • Programming and Computer Science
Replies
1
Views
2K
  • Programming and Computer Science
Replies
11
Views
1K
Back
Top