Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

What language is important for EE to know.

  1. May 31, 2012 #1
    I have read many websites with different answers but most point to C and C++? I would really like the advice of someone in the field Thank you.
  2. jcsd
  3. May 31, 2012 #2


    User Avatar

    Staff: Mentor

    That certainly depends on what kind of work you want to do as an EE. Can you give us more information on your interests and where you are in school now?
  4. May 31, 2012 #3
  5. Jun 1, 2012 #4
    You learn one, the others are easy. I have not done programming since early 80s when I was programming in Pascal and Assembly. I learned Altera AHDL in like 3 weeks in 2005 and programmed complex Altera with state machine and all. They "talk" the same way!!! All the modular programming and all.
  6. Jun 1, 2012 #5
    As yungman said, learn one and others are easy. I recommend to start with C because it's simple and there are so many materials about it.

    Another language is similar to C but it's quite different in syntax.
    Anyway, if you know the programming concept and how to make flowchart, it would be easy to learn another language.
  7. Jun 1, 2012 #6


    User Avatar
    Gold Member

    It is obvious you are asking about what "programming" languages are important for an EE to know. But I want to add that I think you will gain by learning a "foreign" language also. If you are not bilingual now, then just think about the meaning of and importance of the process of Globalization. A highly qualified EE graduate who knows several programming languages will find a certain set of job opportunities available. But that same person who also speaks Spanish or Mandarin Chinese, for example, would have a far greater set of job opportunities open to her.
  8. Jun 1, 2012 #7
    But learning a different language ( as in other countries) is much harder. I am a Chinese, I've been here almost 40 years and I yet to master English!!!
  9. Jun 1, 2012 #8
    Yep, learn to easier one first. I remember learning the first language Fortran took me a while. But even when I was learning Assembly and Pascal, they were quite easy already.
  10. Jun 1, 2012 #9
    C probably has more general purpose use and easier to learn for a first language than C++. Most of C is included in C++. Also, its more common to use C at a lower hardware level than C++.

    I wish I had learned C first, then learned more about operating systems, compilers, and computer architecture before I went to C++. Instead, I learned C++ as one of my first EE courses ever, and so a lot of the high-level abstract object-oriented parts of the learning were a mystery. I knew how to use C++ and its rules, but that was only 1 portion of how a program comes together.
  11. Jun 1, 2012 #10


    User Avatar
    Gold Member

    I never learned the C or C+ stuff....

    But I did learn the programming for digital systems. If, then, else...state machines, counters, charts, led outputs......pretty similiar stuff....just specific to the type of program you are using.

    LIBRARY ieee;
    USE ieee.std_logic_1164.all;
    USE ieee.std_logic_arith.all;
    USE ieee.std_logic_signed.all;

    ENTITY bcd_converter_f IS
    PORT( clk: IN std_logic;
    q:IN std_logic_vector(7 DOWNTO 0);--cars
    led: OUT std_logic_vector (6 DOWNTO 0);--Led, leftmost, middle, and rightmost bit
    en_l,en_m,en_r:OUT std_logic);

    END bcd_converter_f;
    ARCHITECTURE a0 OF bcd_converter_f IS
    TYPE state_type IS (r,m,l);
    SIGNAL state_reg,state_next:state_type;

    SIGNAL r_reg,r_next: std_logic_vector (3 DOWNTO 0);
    SIGNAL m_reg,m_next: std_logic_vector (3 DOWNTO 0);
    SIGNAL l_reg,l_next: std_logic_vector (3 DOWNTO 0);
    SIGNAL dec_reg,dec_next,x: std_logic_vector (7 DOWNTO 0);
    SIGNAL led_all:std_logic_vector(3 DOWNTO 0);

    SIGNAL d,reset:std_logic;
    PROCESS (clk,q,dec_reg,x)
    IF (clk'EVENT AND clk='1') THEN

    IF q/=x THEN

    ELSIF q=x AND dec_reg/="00000000" AND dec_next=dec_reg THEN
    END IF;
    END IF;

    etc....etc....etc.......There's more...but you get the point.

    Simulate what you want on the computer for inputs and outputs.....then burns a chip to connect your wiring up to. I forget the name of this.........

    And yes....takes a while to learn. Probably a thousand trial and errors.......because the simulator will always spit back your mistakes....but it does point them out to you.
  12. Jun 1, 2012 #11
    I agree that C and VHDL (or verilog if you're in the US--is this still the case?) would be useful. I don't agree, however, that learning one of them makes the other easy to learn. The inherent parallelism in HDL can be confusing for someone who's already used to a sequential language such as C or C++. Also, playing around with a HDL simulator is only half the story; the crucial, but not always obvious, part is often understanding how the code is implemented in the actual hardware. This is where the rubber duck hits the road (did I get that expression right, yungman?). Oh well, those are my 2 cents.

    Speaking of....language....Psparky your... use of..... ellipses drives...me nuts. Are you 12 years old?
  13. Jun 1, 2012 #12


    User Avatar
    Gold Member

    Thanks.....my 13th birthday is coming up..........

    Oh ya.....VHDL....that's it! But ya...you will definitely make every mistake in the book possible along the way......Unfortunately, making mistakes is the best way to learn.

    When I learned VHDL I barely had a clue of C+...............I was forced to learn VHDL because I had digital design for senior design.
  14. Jun 1, 2012 #13
    Most embedded micro-based systems use C/C++; rarely does the typical embedded programmer completely develop in assembly for portability reasons.

    Knowing ladder logic and general scripting can provide a pretty good foundation as well.

    The best advice I could give though is to read as much as you can about the different languages and see what interests you and what the applications for the various languages are. Depending on how they compile and how portable/readable they are will narrow their applications.
  15. Jun 1, 2012 #14
    Too bad my company used Altera at the time and I learned AHDL which is not at all popular.
  16. Jun 1, 2012 #15
    I am a sophomore in college, really don’t know what I’m going to be doing with EE degree but I know that’s what I want to do since everything is electric and unlike other sources of energy this I believe is the future. I really don’t know what I’m going to b doing exactly  and I attend UTPA
  17. Jun 1, 2012 #16
    My native language is Spanish and I grew up learning English I speak fluently in both. I have always wanted to learn a new language like French or Arabic. What do you believe would be best I do want have a few things under my belt when I graduate 
  18. Jun 1, 2012 #17
    thank you i appreciate your response!
  19. Jun 1, 2012 #18


    User Avatar
    Gold Member

    Here's the rest of that VHDL program above. It was to control a parking garage. The parking garage has two sensors and the garage only holds 250 cars. An LED readout was to display 0 to 250.....or actually would read "FULL" when at 250. To simulate the cars we just swiped a credit card through the sensors....one way or the other. I would estimate it took me around 500 hours to learn/write this program because of almost no programming experience. There's one other way to write this progam succesfully as well.......but ya....it's really cool when you see it actually work.

    PROCESS (clk)
    IF (clk'EVENT AND clk='1') THEN

    CASE state_reg IS
    WHEN r=>

    IF l_reg="0010" AND m_reg="0101" THEN
    END IF;

    WHEN m=>
    IF l_reg="0010" AND m_reg="0101" THEN
    END IF;

    WHEN l=>
    IF l_reg="0010" AND m_reg="0101" THEN
    END IF;


    END IF;


    r_next <= "0000" WHEN reset = '1' ELSE

    "0000" WHEN d='1' AND r_reg="1001" ELSE

    r_reg + 1 WHEN d='1' ELSE--1 left


    m_next<= "0000" WHEN reset = '1' ELSE

    "0000" WHEN m_reg="1001" AND r_reg="1001" AND d='1' ELSE

    m_reg + 1 WHEN r_reg="1001" AND d='1' ELSE

    m_reg ;

    l_next<= "0000" WHEN reset='1' ELSE

    l_reg + 1 WHEN m_reg="1001" AND r_reg="1001" AND d='1' ELSE

    l_reg ;

    led <= "0000001" WHEN led_all="0000" ELSE
    "1001111" WHEN led_all="0001" ELSE
    "0010010" WHEN led_all="0010" ELSE
    "0000110" WHEN led_all="0011" ELSE
    "1001100" WHEN led_all="0100" ELSE
    "0100100" WHEN led_all="0101" ELSE
    "0100000" WHEN led_all="0110" ELSE
    "0001111" WHEN led_all="0111" ELSE
    "0000000" WHEN led_all="1000" ELSE
    "0001100" WHEN led_all="1001" ELSE
    "1110001" WHEN led_all="1111" ELSE
    "1000001" WHEN led_all="1110" ELSE
    "0111000" WHEN led_all="1101";

    END a0;
  20. Jun 1, 2012 #19


    User Avatar
    Gold Member

    But to answer the original question of which one is better.....depends what type of area you might get in.

    I have not touched VHDL since college....nor am I likely to touch it again.

    But it was one heck of a challenge at one time and I certainly learned something......HOW TO THINK.

    Oh....after I learned VHDL......I went to write the program a completely different way after the first time....took me only 10 hours! But that's how things work.
    Last edited: Jun 1, 2012
  21. Jun 1, 2012 #20
    I think AHDL and VHDL are similar, just different in specifics. I thought it was quite easy with former knowledge of programming. the only tricky part is the program don't really run in sequential like the software, they are real hardware gates and have propagation delay that will cause problems that is not showing in the program. I had to debug for other people on the glitches the programs produced and causing intermittent problems. Typical example is the reset and preset of the D flip flop, people use combinatorial logic like AND, OR etc. Due to propagation delay, glitches exist that reset or set the DFF unintentionally.
  22. Jun 1, 2012 #21


    User Avatar
    Gold Member

    Wow, must be nice!

    3 years prior to writing that program I had never even turned a computer on! My freshman year in college I didn't even know what a "folder" was or how to save a file! Unbelievable, I know. So ya, for me to write that program was quite rewarding. But hey, learning is why we go to college....and learn we did.
  23. Jun 1, 2012 #22
    That's the reason I said in the first post that learn the first one is hard, learning the subsequent ones are a lot easier. I don't mean the syntax, I mean the way of thinking. When I learn Fortran in 1975, that was very shocking, we don't have computers at home!!!! Just the way the computer processing data, execute commands, the flow or the processes were so different, it was like a new world all together for me. But after that, you know what to expect, be it Assembly, Pascal, AHDL, they all flow the same way. You really need only to learn the syntax which is very easy. You know you need to define variable, constant. You know you need to write in modular form calling subroutines ( whatever they call in C), all these you learn from the first language.

    Even in AHDL where part of the module or subroutine is like D Flip Flip with input and output parameters etc. You program the same way, you learn the same way.

    A little farther, Learn the first CAD design like OrCad PCB layout was a shocker as everything was new, how to create a part, how the commands, layout the ground and power planes etc. It was quite hard. But after that, you know how the process of CAD flows. When I had to work on PADS Power PCB, it only took me a day to learn a few commands to get started, then I stumble along for a few days. In two weeks time, I was laying out as if it was Orcad!!! Sure the two are very different, every command is different, but the flow, the process is the same.

    Even farther off, I am current writing a patent application and about two weeks from filing to USPTO. The heart of the patent application is the Claim that govern and define the whole invention. I was absolutely shock.....shocked the similarity to programming. You think it's English, but in fact they have their own terms ( like commands) like "Means, Method etc." That have very specific meaning like IF/THEN/ELSE, Case etc. You learn the way they logically connect together, that you have relate back to what you define and all. You define the names( constants), function ( variable) in the body or the application and you use them in the Claims. I feel knowing computer programming help me a lot in writing the patent application.

    It's the way of thinking, not the nuts and bolts. Nuts and bolts are the easy part.
  24. Jun 1, 2012 #23


    User Avatar

    MATLAB (also used in Octave) would be good to know. even if you're not doing DSP, knowing MATLAB or Octave can be helpful in slapping together test and simulation programs.
  25. Jun 1, 2012 #24
    Until you leave school and realize no one outside your university uses Matlab.

    P.S. Scilab is a free clone if anyone is interested.
  26. Jun 2, 2012 #25


    User Avatar
    Gold Member

    All the programs listed above are great tools for learning in school. They really are fantastic.

    How many of them are going to actually carry into your workplace....besides Auto Cad?...not too many. But there are certainly some specialized fields that will use some like the C+ and the VHDL, etc.

    As an electrical engineer that makes electrical construction drawings for factories and so forth....here are the programs I use:

    AutoCad (everybody needs this)
    MS Word (got to write those scopes)
    MS Excel (gotta crunch those numbers)
    AGI 32 (Advanced Lighting simulator....takes a couple days to learn like most programs)
    Etap (it's a super program for plotting current and voltage curves for large motor start ups and for breaker setting times. Clients want these for all their big breakers.)

    If you don't know something coming into work, no biggy. My boss made a great comment to a new 6 month guy out of school yesterday. The kid wasn't real familiar with excel....he was ok with it...but was missing a lot of the details. My boss said something to the effect of.....
    "when a student comes out of college and comes here, we expect them to know absolutely nothing about electrical engineering as it pertains to work. But we do expect them to at least know MS word and MS excel". My boss is a really nice guy...but he was just saying.

    Even if you know absolutely none of the programs I listed above...no biggy. They really only take a short time to learn.

    Remember kids....commencement means "the beginning"......not "the end".
    Last edited: Jun 2, 2012
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook