Best programming language for an EE?

  • #1
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
 

Answers and Replies

  • #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
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
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?

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
...

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
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?
 

Suggested for: Best programming language for an EE?

Replies
10
Views
1K
Replies
2
Views
789
Replies
1
Views
1K
Replies
8
Views
987
Replies
5
Views
1K
Replies
17
Views
23K
Replies
18
Views
1K
Back
Top