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 29th November 2007, 07:28 PM   (permalink)
3v0
Default

Nigel:

This is very real for me in that I am teaching young people to use uC's.

I understand why you feel the way you do about assembly. Anyone programming uC's needs a solid understanding of the hardware. But not when he/she/it is very green.

Quote:
Do learning assembler first, you then have the hardware understanding required if you move to a high level language.
Learn a higher level language first, you then have the understanding of programming required to learn assembler.

From a structure and style viewpoint assembler is a bad first language.

As I tried to point out in my previous post it is far easier to teach people to program first. Then teach them about uC's. Learning machine language is easier if the student already understands basic flow control etc.

Current thinking in computer education is to start intro students at an abstract level. One school I know of starts with ALICE. At another first term students do not do any programming They spend there time learning logic and problem solving. Not sure but I think their first language is JAVA.

I think this is an effort to both bring people up to where they are ready to learn programming, and maybe weed out a few that would fail if they tried.

Quote:
unless the compiler has specific commands for implementing hardware PWM you essentially copy the way you do it in assembler, and it's MUCH easier to implement if you have an understanding of assembler.
One can illustrate PWM in 10 or 12 lines of C code. The transistion to hardware PWM is all about setting up the hardware to do it. Can the student read a data sheet. As you said setting up the hardware is much the same. But the basic concept is better taught in a higher level language.
Quote:
I would suggest learning a little assembler on a 16F (so you understand PIC hardware), and probably go directly to C on the 18F
Why learn a little assembler on a 16F then move to C and the 18F? Just use the 18F start to finish.

The truth is that I do not much care what people learn first. The point is that they learn. It is great that you help people with their assembly problems. Hats off.

Perspective has a lot to do with our differing viewpoints.
3v0 is offline   Reply With Quote
Old 29th November 2007, 07:57 PM   (permalink)
Default

I think the difference here is that YOU are teaching them, so they have you to ask about the hardware, and presumably you teach them about it from a high level perspective?. This isn't an option without you there, the datasheets and application notes are all in assembler, and unless you understand a modicum of assembler a beginner is going to struggle.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline   Reply With Quote
Old 29th November 2007, 08:48 PM   (permalink)
Default

IMO there is no easy answer to this debate.
If I started with the excellent 18F series I'd have a tough time going back to the 16F or worse 12bit 12F chips like the 12F509
I did start with the dirt simple 16C54, C was not a good option for that chip and CCS C was a bugfest back then. So I learned PIC assembler and it's not that difficult at all even with the 16F bank switching and small but powerful instruction set.
Since C supports inline code it's handy to know the basics, on the other hand the job market will expect C.
That said the 18F was designed with C in mind and the free SE C18 compiler is a real bargain, the extended instuction set and wider memory (16bit) makes assembler a breeze, (no hunting around for what bank that SFR is in).
Being able to read the code produced by the compiler will certainly come in handy for some.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is offline   Reply With Quote
Old 30th November 2007, 03:06 AM   (permalink)
Default

We do need a strong background in software model of the micro. Also, there are only about 35 to 40 asm instructions to learn, and if timing is critical, asm is a must. But high level language such as C is always used in a real job. It is much easier and efficient.
The point I'm trying to make is, we should start with fundatmantal programming skill and logic. Like 3V0 said, if any one find that programming is not for him, then better move to different direction before wasting more time.
Learn asm then high level language. Because ultimately the students will have to find a job and high level language (C) is more important.
__________________
May the force be with you.


My project: Simple White Line Follower

http://au.youtube.com/watch?v=8Z_MmrdH4oc

http://i271.photobucket.com/albums/j...nefollower.jpg
Wingmax is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
Quik PIC Programming kit Krumlink General Electronics Chat 5 27th January 2008 11:27 PM
Problems switchin relay with PIC Andy1845c General Electronics Chat 5 17th November 2007 06:13 PM
High ADC sampling rate PIC, 18F needed? bananasiong Micro Controllers 24 28th October 2007 12:13 PM
Four PIC with One LCD.. meera83 Micro Controllers 13 20th September 2007 06:40 AM
Circuit design for keyfob receiver's TTL outputs for current Guerrero General Electronics Chat 6 18th April 2005 02:11 AM



All times are GMT. The time now is 12:05 PM.


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