What language is important for EE to know.

In summary, learning multiple programming languages is important for an EE. C is the most commonly used language for programming, but it is also easy to learn. Other languages are similar to C but are quite different in syntax. If you know the programming concept and how to make flowchart, it would be easy to learn another language.
  • #1
Rudy Esparza
4
0
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.
 
Engineering news on Phys.org
  • #2
Rudy Esparza said:
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.

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?
 
  • #3
Spice
 
  • #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.
 
  • #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.
 
  • #6
Rudy Esparza said:
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.

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.
 
  • #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!
 
  • #8
ashiir said:
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.

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.
 
  • #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.
 
  • #10
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 similar 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.
 
  • #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?
 
  • #12
gnurf said:
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?

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.
 
  • #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.
 
  • #14
psparky said:
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.

Too bad my company used Altera at the time and I learned AHDL which is not at all popular.
 
  • #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
 
  • #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 
 
  • #17
thank you i appreciate your response!
 
  • #18
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;
 
  • #19
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:
  • #20
psparky said:
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.

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.
 
  • #21
yungman said:
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.

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.
 
  • #22
psparky said:
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.

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.
 
  • #23
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.
 
  • #24
rbj said:
MATLAB (also used in Octave) would be good to know.
Until you leave school and realize no one outside your university uses Matlab.

P.S. Scilab is a free clone if anyone is interested.
 
  • #25
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:
  • #26
gnurf said:
Until you leave school and realize no one outside your university uses Matlab.

wasn't my experience at all. the cost of getting MATLAB and a decent toolbox is a lot less than an EE's salary.

P.S. Scilab is a free clone if anyone is interested.

Octave is also free. didn't know that Scilab was a MATLAB clone. i thought it had different language syntax than MATLAB or Octave. but i never used Scilab, so i don't know.
 
  • #27
psparky said:
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".

C or some other programming language is a pretty standard skill to expect out of new EE grads and I would not say "not too many" carry into your workplace. I would not call a field that uses C++ or VHDL "specialized" by any means. It sounds more like your job is the exception rather than the rule. Simply think of all the EE related products and industries, and then think of how much of those devices use some kind of software. Its more rare to find hardware that isn't running code of some kind (you then have to consider programming used for development/research as well as end application programming, and then there's still a lot of other software that needs to be written).
 
Last edited:
  • #28
DragonPetter said:
C or some other programming language is a pretty standard skill to expect out of new EE grads and I would not say "not too many" carry into your workplace. I would not call a field that uses C++ or VHDL "specialized" by any means. It sounds more like your job is the exception rather than the rule. Simply think of all the EE related products and industries, and then think of how much of those devices use some kind of software. Its more rare to find hardware that isn't running code of some kind (you then have to consider programming used for development/research as well as end application programming, and then there's still a lot of other software that needs to be written).

I certainly may be the exception...but working for an electrical engineering consulting firm that makes electrical construction drawings is very common in USA.
 

1. What are the most important programming languages for electrical engineering?

The most important programming languages for electrical engineering are C, C++, Python, VHDL, and Verilog. These languages are commonly used for microcontroller programming, embedded systems design, and digital circuit design.

2. Why is C considered important for electrical engineering?

C is considered important for electrical engineering because it is a high-level language that allows for efficient code execution on microcontrollers. It also has a wide range of libraries and tools that are useful for hardware design and interfacing with electronics.

3. Is Python widely used in electrical engineering?

Yes, Python is widely used in electrical engineering, especially for data analysis and visualization. It is also commonly used for scripting and automation in hardware testing and simulation.

4. How important is Verilog for electrical engineering?

Verilog is very important for electrical engineering as it is a hardware description language (HDL) used for designing and simulating digital circuits. It is commonly used in the design of electronic devices and systems.

5. Do I need to know both VHDL and Verilog?

It is not necessary to know both VHDL and Verilog, but having knowledge of both can be beneficial as they are the two main HDLs used in electrical engineering. It is important to have a good understanding of at least one of these languages for digital circuit design and simulation.

Similar threads

  • Electrical Engineering
Replies
14
Views
1K
  • Electrical Engineering
Replies
8
Views
3K
  • Programming and Computer Science
4
Replies
107
Views
5K
  • Electrical Engineering
Replies
1
Views
1K
  • Programming and Computer Science
Replies
8
Views
875
Replies
11
Views
2K
  • Programming and Computer Science
Replies
15
Views
1K
  • STEM Academic Advising
2
Replies
60
Views
3K
  • Art, Music, History, and Linguistics
Replies
4
Views
1K
  • Electrical Engineering
Replies
8
Views
2K
Back
Top