Which programming languages are used in electronics field?

The list is likely to be endless, but these are what I expect to be the most common of the lot:C/C++, MATLAB & SIMULINK, (core-specific) ASM, VHDL/Verilog/SystemC, SPICE, Java, Erlang, Smalltalk, Haskell, LabView, UNIX shells, Fortran, C#/.net

Thoughts of programing in electrical and electronic engineering in general

There is an option to choose the lower levels in which performance is essential. Electronics code is often unattractive spaghetti code that mixes assembly, as well as C++, with libraries written in different languages. The most efficient latency is typically provided by the shorter length of instruction. When you have a system-on-a chip that has FPGA arrays, you can add HDL(hardware language descriptors) in the process.

Sometimes, it is necessary to obscure your code to make the final product more secure. There are specific coding methods that are designed for applications with high security.

A few (elderly) electronic engineers could be able to work without having one single language, however I wouldn’t recommend it for an engineer who is young. At a minimum according to my personal view, knowledge of scripting is necessary (your basics loops). A basic understanding of programming should be a plus because these concepts can be used in the majority of languages:

  • Variables and types (IEEE floating point number strings) and conversions
  • loops(while is for) loops (while, for), choices (if-else and switch) and sequential programming. concurrent programming
  • arrays and matrixes
  • Very simple (stupid) algorithms for performing simple tasks, for example “bubble sorting”
  • Learn how to utilize an interactive script-based system (command prompt)

The simple 20% can accomplish 80% of programming tasks. The remaining can be learned over time.

Languages and their likely uses

The C that is used in a lot of microcontrollers isn’t ANSI-C compatible there are lack of timing libraries, function restrictions, etc. Pure C is usually sufficient (even for 4M lines code for a big project) however, more sophisticated software can benefit from the advanced structures of C++ or the ease of one-liner programming brought by the advanced OOP(object directed programming) such as C# or MATLAB.

Assembler (machine-dependent) utilized with a variety of embedded software. Very few engineers are using the assembler, however it is an essential component of circuit debugging (try to determine whether it’s a hardware or software problem).

Erlang used in telecomms switch equipment

Smalltalk -CNC machines, CAD, etc. A bizarre language like this one. Take a look!

VHDL/Verilog/SystemC utilized in chip hardware level description. A tool can synthesize the circuit using this. Verilog is a popular language throughout America. US, VHDL is preferred by academia as well as some EU firms, SystemC is also gaining ground

Never heard of Haskell utilized, however I’ve heard it is being sought for defense and aerospace sectors, as well as things such as advanced compilers.

The application of Ada shouldn’t be overlooked for older systems or older mainframes. However, it is currently being replaced by C as well as Java. The reason for this is that the electronic components of an enormous system – for example, a wind turbines installed in an off-site location must be guaranteed for at minimum 25 years. Often, the database point has old computers that haven’t so much been re-used since a while. So why put at risk the possibility of disrupting an established system?

Python is more of an exercise for robotics however, it is an extremely versatile language that is growing rapidly.

SPICE/PSPICE, and various variants circuit simulation. While it is not an actual programming language itself, it is employed to simulate electronic components of various levels of complexity.

MATLAB along with NI LabView are used by many engineers for simplifying complex simulations and for interfacing with instruments. NI LabView in particular can be helpful to speed up prototyping by demonstrating an idea at a speed 10 times faster than competitors.

Some of the code, specifically parts of complex synthesizers and simulators can write in Fortran. This isn’t atypical however, and despite its age it continues to receive regular updates. I’ve not written any programming for Fortran myself, however I had to recompile it.

Let’s admit it: you cannot avoid Linux in one way or another. It’s on the form of a terminal or router, an android cellphone, MacOS and so on. Unix-like systems share a few things in common. Knowing how to navigate a shell that’s not GUI maybe with a touch more PERL scripting, can be an absolute lifesaver. Be careful not to get too carried away however. I once revoked an insurance policy for a rather costly piece of machinery simply by trying to enter SU mode.

Case study: An embedded project

A program that would put in Zigbee sensors to track the various temperatures of a home and communicate point-to-point with each sensor, and then report the information to the central point. The sensor’s ‘neural-network’ behavior was programmed using the Python Pygame library. The data was centralised by an operating system that was equipped with an USB xbee module and running an MATLAB-compliant application. The sensors themselves were several lower-end Freescale (ex-Motorola) Series 68k microchips which were programmed using pure C.

Leave a Comment