Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 5th February 2008, 01:20 PM   (permalink)
Default

The subject of computer science doesn't have much to do with computer hardware, according to Wiki, people were thinking about changing its name to something else. Computer engineering on the other hand is all to do with the hardware.
colin mac is offline   Reply With Quote
Old 5th February 2008, 01:46 PM   (permalink)
3v0
Default

You might ask why C is still with us after 35 years when other languages from that time period have either faded into obscurity or morphed to the point where they are unrecognizable.

In part it is because C is a mid level language.

To criticize C for being hard to read is misplaced. C is very much like any other procedural language.

The one exception is the use of pointers. C pointers are not an overly complex topic but can be challenging to the ADD crowd. Pointers are there because they are a fast, efficient, way of handling data. No apologies required.

Unreadability complaints should be directed at the guy who wrote the code. Regardless of the language readability is ultimately up to the programmer.


http://www2.lv.psu.edu/ojj/courses/i...1971-1990.html
Quote:
Based in two lesser known languages of B (see 1971) and BCPL (see 1967), C signified the next major step in programming languages as it also seemed to improve on the already popular Pascal. Although there is no direct link between C and Pascal, all of the features that made Pascal so popular were there, including CASE statements and pointers. Because of the extensive use of pointers, C was made fast and powerfull at the expense of being hard to read. None the less, the improvements it had over Pascal started a major wave of change from former Pascal users...
C is a powerful language for writing tight, fast, highly tuned code in a language far more portable than assembly. C is low-level enough to write device drivers, and high-level enough to write GUI libraries.
3v0 is offline   Reply With Quote
Old 5th February 2008, 01:49 PM   (permalink)
Default

Quote:
Originally Posted by 3v0
The one exception is the use of pointers. C pointers are not an overly complex topic but can be challenging to the ADD crowd. Pointers are there because they are a fast, efficient, way of handling data. No apologies required.
Pointers are fantastic. Pointers on Pics are horrid. Four different types of pointers that aren't interchangable. That takes some time to get your head around.

I know this isn't pic specific but I just had to mention that quirk.

Mike.
P.S. What is the "ADD" crowd?
Pommie is offline   Reply With Quote
Old 5th February 2008, 01:56 PM   (permalink)
3v0
Default

Quote:
Originally Posted by Pommie
Pointers are fantastic. Pointers on Pics are horrid. Four different types of pointers that aren't interchangable. That takes some time to get your head around.

I know this isn't pic specific but I just had to mention that quirk.

Mike.
P.S. What is the "ADD" crowd?
Attention Deficit Disorder (ADD)

Mostly a bunch of hooey IMHO.
3v0 is offline   Reply With Quote
Old 11th February 2008, 03:52 PM   (permalink)
Default

http://steve-yegge.blogspot.com/2008...t-of-n00b.html
__________________
=========================
Futz's Microcontrollers & Robotics
=========================
futz is offline   Reply With Quote
Old 11th February 2008, 06:51 PM   (permalink)
Default

Yow. That guy needs to apply his coding philosophy (which I only partly agree with) to his prose. Tipping point indeed.


Torben
Torben is online now   Reply With Quote
Old 12th February 2008, 03:35 AM   (permalink)
Default

No need to take note to the billions of C related back and forth arguments on the web. All one has to do is take note of a single thread, like this one, to see how a language ought not to be the main discussion as opposed to what the language is attemping to accomplish. And I quote my first reply:

Quote:
Originally Posted by donniedj
...and the written text becomes more effort consuming than the original reason for the code. It should solve problems and not add to it.
Thank goodness the F84 evolved else there would be billions of F84 is the only way and needs no review and change discussions littering the web. Thank goodness the rise and fall times of ICs evolved else the stack of propogation delay tolerances between devices would hinder all end products to max 10MHz speed. Thank goodness the power dissipation of components evolved else we all would be carrying big bulky end products where the bulk size and mass would be attributed the the needed heat sinks and fans. Than goodness the constant evolution of science results in more powerful machines to probe and expose the inner workings of biology and chemistry that makes medicines to keep the populous from dropping dead over a common cold. Thank goodness automobiles have advanced... oh wait no such a thing since the Model T barely grow pass 25 MPG since 1900s. Thank goodness the standard computer language has advanced... oh wait no such a thing since the '70s.
donniedj is offline   Reply With Quote
Old 12th February 2008, 06:53 AM   (permalink)
Default

Quote:
Originally Posted by donniedj
No need to take note to the billions of C related back and forth arguments on the web. All one has to do is take note of a single thread, like this one, to see how a language ought not to be the main discussion as opposed to what the language is attemping to accomplish.
You know you're in trouble when you selectively quote your own post ;-)

Your first (elided) line reads:
Quote:
Originally Posted by donniedj
This is partly why I dislike C, difficult to read, susceptible to too much interpretation...
Which is certainly makes the language the main focus of the discussion and not "what the language is attempting to accomplish" n'est ce pas?

The limited power of microcontrollers leaves them stuck back in the realm of 1970's languages as surely as any CPU running at less than the several gigahertz necessary to run post-1970's languages.

I am more productive in C than I would be in assembler and accept the *potential* performance hit. C is for me far less difficult to read than the PIC assembler's obscure mnemonics (the z80 mnemonics were easier and it *was* from the 70's!!!)

That said I grudgingly accept that many of the F84 die hards on here would prefer to program in assembler and may actually believe themselves to be more productive in it :-P <sarcasm off>

P.
aussiepoof is offline   Reply With Quote
Old 12th February 2008, 09:23 AM   (permalink)
Default

Quote:
Originally Posted by aussiepoof
I am more productive in C than I would be in assembler and accept the *potential* performance hit. C is for me far less difficult to read than the PIC assembler's obscure mnemonics (the z80 mnemonics were easier and it *was* from the 70's!!!)
The mnemonics are only obscure to you, because you're used to Z80 - it really depends on what you're used to - also the RISC instruction set probably confuses you when you are used to the overly complicated Z80 instruction set. I came from a 6502 background, and had no trouble moving to PIC - but find Z80 as obscure as you find PIC!

I would suggest (and often do) if you come from a Z80 background, the AVR is probably a better choice than a PIC - but if you're using C, then it doesn't really matter.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now   Reply With Quote
Old 12th February 2008, 12:47 PM   (permalink)
3v0
Default

Quote:
Originally Posted by aussiepoof
...
The limited power of microcontrollers leaves them stuck back in the realm of 1970's languages as surely as any CPU running at less than the several gigahertz necessary to run post-1970's languages....
Well put.

The fact that we still use this 1970's language speaks to its robustness.
3v0 is offline   Reply With Quote
Old 12th February 2008, 01:30 PM   (permalink)
Default

Quote:
Originally Posted by Nigel Goodwin
The mnemonics are only obscure to you, because you're used to Z80 - it really depends on what you're used to - also the RISC instruction set probably confuses you when you are used to the overly complicated Z80 instruction set.
Hah! If only it were that easy... you see I've programmed in many assembly languages all with differing mnemonics since 1977. This includes the MIPS CPU just introduced to the PIC range as their 32-bit line which happens to be RISC :-)

So no, RISC is no issue and nor is the Harvard architecture - the beauty of having studied computer science and electronic engineering more than 20 years ago I guess ;-) Or it could be that working for a company doing work in Unix kernels for Fujitsu supercomputers, SGI, Sun etc. helped... but I digress.

Quote:
I would suggest (and often do) if you come from a Z80 background, the AVR is probably a better choice than a PIC - but if you're using C, then it doesn't really matter.
I actually much preferred the PDP-11 and Motorola 68000 mnemonics and their great degree of orthoginality.

Indeed it doesn't matter... and I have found the PIC 18F series to be very easy to use parts. I wouldn't give up the debugging abilities of the USB connections of the 18F2550/4550 series for anything!! It has radically increased my productivity in conjunction with C and the MPLAB/C18 combo.

YMMV,
P.
aussiepoof is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
Magnets and Electromagnets ElectroMaster Electronic Theory 11 27th November 2007 02:31 PM
PIC code problem Gaston Micro Controllers 9 7th March 2007 02:23 AM
Charge batteries using tel lines electroniks Electronic Projects Design/Ideas/Reviews 5 16th April 2006 06:54 PM
running sort of output lines.................... anand_jain Micro Controllers 1 11th July 2004 02:31 AM
TV- Lines in the picture Johnson777717 General Electronics Chat 2 1st April 2004 12:10 AM



All times are GMT. The time now is 09:33 AM.


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