Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > General Electronics Chat


General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion?

Reply
 
LinkBack Thread Tools Display Modes
Old 5th September 2006, 06:42 PM   (permalink)
Default relationship between electronics and programming

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.
Mark S. is offline  
Old 5th September 2006, 06:55 PM   (permalink)
Default

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.
phalanx is offline  
Old 5th September 2006, 07:33 PM   (permalink)
Default

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).
dknguyen is offline  
Old 5th September 2006, 08:02 PM   (permalink)
Default

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
philba is offline  
Old 5th September 2006, 08:54 PM   (permalink)
Default

I'm a C++ GOD but it really hasnt helped me understand op-amp circuits.
__________________
1 0 1 1 0 1 0 1 1 0 1 1 0 1 0 1 1 0 1

StopGo is offline  
Old 5th September 2006, 08:58 PM   (permalink)
Default

Quote:
Originally Posted by StopGo
I'm a C++ GOD but it really hasnt helped me understand op-amp circuits.
----lmao------
dknguyen is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 11:17 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

eXTReMe Tracker