Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

relationship between electronics and programming

Status
Not open for further replies.

Mark S.

New Member
I am just taking my first steps in electronics but have a bit of a background in programming c++ and various other computer languages.

I am wondering will this knowledge be of any benefit to me in the study of electronics. Are there any paralells between a program written in a computer language and an electronic circuit.

Any information gratefully accepted

Thanks

Mark S.
 
C++ is too high level to truely appreciate what is actually happening in a piece of silicon. Programs written in assembly will force you to understand the inner workings of a processor and how its various sections interact with each other.

Hardware Description Languages (HDL) like VHDL and Verilog give you a means of describing actual hardware in a software environment. Typically the end result is loaded into a CPLD or FPGA so you can immediately realize your design.
 
You can use C/C++ though to program circuits that you have built that contain processors or microcontrollers to do more complicated tasks (since it's a huge pain to program high level stuff using a low level language like assembler).
 
Having written 10Ks of lines of macros (not assembler code, macros), it's not hard to apply high level techniques to masm. it makes writing masm a lot easier. forget sub-classing and inheritance and such, though.

probably the biggest thing to discover is that electronic circuits are inherently parallel systems while much code is inherently sequential. I've done many many years of systems software design where asyncronous behavior is common but even then, I find it easy to slip into a sequential way of thinking.

If you are focussing on microcontrollers, you will also discover how resource constrained they are compared to a modern PC or above. small amounts of RAM, limited program sizes (though changing rapidily), low level interfaces and so on will challenge the way you think about programming.

another area that was a suprise to me is how noise and other effects can make your circuits behave differently from the theory. in (non-systems) software, programs are highly deterministic - same input = same output, every time. In circuits, you may not know all the sources of input (noise) and thus not be able to easily predict the output. Once your start thinking about those sorts of things, the circuits become easier to understand and design.

If you are looking at linear circuits, it'd play with a simulator (ltspice from linear tech is good) to get a better feeling for how things work.

Any way, welcome to the club and have fun.
Phil
 
I'm a C++ GOD but it really hasnt helped me understand op-amp circuits.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top