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

    berkeman

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

    Bobbywhy

    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

    psparky

    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;
    BEGIN
    PROCESS (clk,q,dec_reg,x)
    BEGIN
    IF (clk'EVENT AND clk='1') THEN
    dec_reg<=dec_next;
    r_reg<=r_next;
    m_reg<=m_next;
    l_reg<=l_next;



    IF q/=x THEN
    x<=q;
    dec_next<=q;
    reset<='1';

    ELSIF q=x AND dec_reg/="00000000" AND dec_next=dec_reg THEN
    dec_next<=dec_reg-1;
    d<='1';
    reset<='0';
    ELSE
    reset<='0';
    d<='0';
    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

    psparky

    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

    psparky

    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)
    BEGIN
    IF (clk'EVENT AND clk='1') THEN
    state_reg<=state_next;



    CASE state_reg IS
    WHEN r=>
    state_next<=m;
    en_l<='0';
    en_m<='0';
    en_r<='1';

    IF l_reg="0010" AND m_reg="0101" THEN
    led_all<="1111";
    ELSE
    led_all<=r_reg;
    END IF;

    WHEN m=>
    state_next<=l;
    en_l<='0';
    en_m<='1';
    en_r<='0';
    IF l_reg="0010" AND m_reg="0101" THEN
    led_all<="1110";
    ELSE
    led_all<=m_reg;
    END IF;



    WHEN l=>
    state_next<=r;
    en_l<='1';
    en_m<='0';
    en_r<='0';
    IF l_reg="0010" AND m_reg="0101" THEN
    led_all<="1101";
    ELSE
    led_all<=l_reg;
    END IF;


    END CASE;

    END IF;

    END PROCESS;


    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


    r_reg;


    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

    psparky

    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.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: What language is important for EE to know.
  1. What do EE's do? (Replies: 5)

  2. What classes for EE? (Replies: 6)

  3. Important maths in EE? (Replies: 2)

Loading...