Author Topic: Microcontroller for students- Suggestions please!  (Read 16848 times)

0 Members and 1 Guest are viewing this topic.

Offline Trigger

  • Regular Contributor
  • *
  • Posts: 78
Re: Microcontroller for students- Suggestions please!
« Reply #25 on: April 30, 2011, 07:33:19 pm »
Arduino hides too much from the programmer with their light fluffy C like wiring language.

Instead of all of the pinMode(), digitalWrite(), etc, you need to understand how to set the chip register bits to control the ports.  The ATMega328P has features that the Arduino IDE doesn't even touch.  The Arduino environment also severely limits your chip choices.  It doesn't make sense to use an ATMega328p when an ATtiny13 does the job.

You'll never use the chip to it's full potential unless you learn how to manipulate the registers directly and C is the industry standard. 
I definitely agree with you there. If the person is happy using Arduino and doesn't plan to progress to other micros then fair enough but if you do change and all your experience is with the Arduino setup, where you have all the functions for the hardware written, it will be quite a leap to then have to manipulate all the registers yourself.

I'm trying to move from the Microchip architecture to Arm and it's making my head spin all the options you have.
With Microchip there's primarily one IDE, a couple of compilers and the standard development tools (and their clones) where as Arm there seems to be a 101 options for each part of the process. I'm getting there..... slowly.

I'm using an IAR toolchain for ARM, but that's the company standard.  It's a huge jump to go from something like an 8 bit PIC to a 32 bit ARM, especially if the ARM chip in question has a large feature set which means a huge number of registers to look up for development.
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11712
  • Country: my
  • reassessing directives...
Re: Microcontroller for students- Suggestions please!
« Reply #26 on: May 01, 2011, 07:37:17 am »
i read this thread later from the other one. yes you are correct about your point about hiding registers etc. arduino->microchip, microchip->arm, arm->spartan whatever = headache? learning curve? thats the normal circumtances i guess. but some people want to stick within their "comfort zone", any more progress, or further knowledge development is not in that "zone" anymore. and/but we cannot blame them. different people with different needs. that was my whole point.

btw: i forgot one more point. why dont assembly? if all you want is registers manipulation? and what favorite you talking about? everybody's favorite (artist) is arduino? ???
and for the pop quiz: whats the difference between a "language" and a "library"?... your catch! :D
Don't even bother learning assembly until you understand microcontroller programming in general and settle on your favorite.
« Last Edit: May 01, 2011, 07:50:51 am by Mechatrommer »
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline Trigger

  • Regular Contributor
  • *
  • Posts: 78
Re: Microcontroller for students- Suggestions please!
« Reply #27 on: May 01, 2011, 02:58:15 pm »
i read this thread later from the other one. yes you are correct about your point about hiding registers etc. arduino->microchip, microchip->arm, arm->spartan whatever = headache? learning curve? thats the normal circumtances i guess. but some people want to stick within their "comfort zone", any more progress, or further knowledge development is not in that "zone" anymore. and/but we cannot blame them. different people with different needs. that was my whole point.

btw: i forgot one more point. why dont assembly? if all you want is registers manipulation? and what favorite you talking about? everybody's favorite (artist) is arduino? ???
and for the pop quiz: whats the difference between a "language" and a "library"?... your catch! :D
Don't even bother learning assembly until you understand microcontroller programming in general and settle on your favorite.


That can be answered from a person's goals in learning.  If one desires to learn from the practical standpoint and get on with building cool things then spending time on assembly at first is a delaying effort.  It's best to wait until they settle into an architecture that is comfortable ("favorite") and then they can spend the time learning how to manipulate things in greater detail with assembly to compliment their skills.

Then again if someone is learning from the theory standpoint, or computer science, then learning assembly is a good fit to the bottom up philosophy of education.

Assembly is a very useful skill, but it depends on a persons goals as to when they should learn it.
 

Offline jasonh

  • Contributor
  • Posts: 47
Re: Microcontroller for students- Suggestions please!
« Reply #28 on: May 01, 2011, 10:02:58 pm »
Being new to this I have just had a bit of a look around about port manipulation as my understanding is that arduino is using  C and that the code you write is compiled by the gcc compiler.   Given that I wondered why you could not do things directly.
  
   As it turns out there is no reason why you need to use the higher level libraries that make life easier for you 99% of the time.

   if pinMode or digitalWrite turn out to be to much overhead for you, or if you just want to see how it is done you can do it exaclty as you would using avr studio.

   Having said that, from my pc development I prefer to use a higher level math library most of the time and only go to the low level when absolutely necessary.   That seems to be the case here.   Easy to use libraries with the option to go as low level as you need when ever you want to?

   Perhaps it should be made clearer that arduino is not a language that looks like C - it is C and you can go  low level.

   I am new to the environment so I am prepared to be shown up as wrong but thats what I have found.

   Trigger,   I am wondering if you have used arduino  much as some of what you are saying could look correct to a casual user but does not seem binding as to it's restrictions?



« Last Edit: May 01, 2011, 10:05:41 pm by jasonh »
 

Offline Trigger

  • Regular Contributor
  • *
  • Posts: 78
Re: Microcontroller for students- Suggestions please!
« Reply #29 on: May 02, 2011, 12:23:30 am »
I have a few Arduino boards laying around and I do use them if I need to put something together quickly.

Maybe I've been trying to go about explaining my point the wrong way.  I never said it was impossible to go low level on the Arduino though.

Ok, let me try to explain it this way.

As a hobbyist the Arduino is probably going to cover about 90% of what you want to do, not counting the advanced stuff for the sake of simplicity in explanation.  You can make your own boards but if you're using the Arduino libraries you're pretty much stuck with the AVR chips they support. (yes you could port the library but that's beyond the scope of this and if you can port it then you obviously know the core C and registers bit so it's a moot point)

As an EE/CE professional or someone on the path to be one, start with C and register manipulation.  This way you have a huge variety of tools available to you from the start.  I think a lot of the fun of a project is doing the research to find the microcontroller that best fits the project, or better yet a number of possible ones.  That of course gives you the chance to get different microcontrollers (and free dev kits if you're good at social engineering the sales guys) and experiment with them.  I geek out like a lot of engineers when I get that new dev board in hand and start playing with it.  If you're going to be or aspire to be an engineer then why not start by investing the time to learn that core professional skill that you can apply throughout your career, and put on your resume.

So understand that I look at the question from a professional's viewpoint, not a hobbyist.

Though on a very loosely related note if you've only learned Arduino you won't be able to participate in the badge hacking at DEFCON! (The badges have used Freescale micros the past few years)  Joe's probably going to design an Arduino based badge one year just to spite me if he knew I said that.
 

Offline jasonh

  • Contributor
  • Posts: 47
Re: Microcontroller for students- Suggestions please!
« Reply #30 on: May 02, 2011, 01:10:15 am »
Trigger,  yes I would agree with you.  If you are starting out a career in this area then arduino should not be your only tool, but it could still be useful for mucking around with.   I am in tune with what you are meaning.

   

   It is in the marketing with arduino, they market it as a simple way to get in to this area but I was trying to make it clear that you still have a lot of freedom to go low level with the chips that they support.

   I agree that they would primarily be used at a hobby level but it wouldn't surprise me one bit to find they are at the heart of some small quantity/niche  commercial products.

   Slightly to the side of this, when I joined the board from looking at the blogs, I thought this board was a lot about hobbyists, although I get your specific points when addressing questions like the OP.  I guessed that the content Dave was delivering wasn't aimed at already established EE's.

   What I don't get is stuff like BoredAtWork says about it in this thread  i.e. 'The whole Arduino environment is made for hand holding artists and similar people who "won't get it"'  or 'So with AVRs you have on one child toys catering for the idiots (Arduino)'

   This may be my wrong perception of what this forum is about but I didnt join because I am an EE.  I am no idiot as either, with my background this already seems quite intuitive.  I have done a lot of bitshifting in the past in the computing space.

   You pick the right tool for the job and sometimes that could be the idiots tool but I have seen many an 'idiot' sitting waiting for the expert to finish :)

    I only look at the forums to see that the beginners section has the second highest number of posts behind general,  and I would think most of them will never have a career in EE.   So while I see comment like BoredAtWork may be more appropriate at a forum for professional engineers I don't see how it fit's in with the audience here?

   Anyway, my 2c.



   

   
   
 

Offline Tony R

  • Regular Contributor
  • *
  • Posts: 117
  • Country: 00
Re: Microcontroller for students- Suggestions please!
« Reply #31 on: May 04, 2011, 04:16:15 pm »
It seems that people assumed that this was for university level, but could it be for high school? I would assume that if it was a university level class your prof would know off hand what he wanted to teach.

with that said, if this is some high school class the PIC offers some great features... and they are easy to get free samples from.

If this is a university class, ARM is the way to go.
Tony R.
Computer Engineering Student
Focus: Embedded Assembly Programming, Realtime Systems,  IEEE Student Member
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11712
  • Country: my
  • reassessing directives...
Re: Microcontroller for students- Suggestions please!
« Reply #32 on: May 04, 2011, 11:34:26 pm »
If this is a university class, ARM is the way to go.
i had friend(s) back in U whose mentally a bit lower than high school people.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline McPeteTopic starter

  • Regular Contributor
  • *
  • Posts: 163
  • Country: au
  • Layout Designer, AKA eCAD monkey
Re: Microcontroller for students- Suggestions please!
« Reply #33 on: May 08, 2011, 10:51:02 am »
Hey all,

The Microstick looks great- I'll be passing that along tomorrow.

As I said, I'm studying at a TAFE (Technical And Further Education) College, at an associate level. TAFE, sadly, gets stuff-all funding and as a result has limited and aged resources (staff included :P ). My plan is to get my bachelor's after my Adv. Diploma, but that's a way off yet... 

I did an electronics class in high school- that was mostly electronic literacy (reading colour codes, basic electrical theory) and basic assembly skills. Maybe things have changed in four years, but I doubt many schools in this country would be set up to teach anything so lofty as microcontrollers.
 

Offline Trigger

  • Regular Contributor
  • *
  • Posts: 78
Re: Microcontroller for students- Suggestions please!
« Reply #34 on: May 08, 2011, 09:45:14 pm »
If this is a university class, ARM is the way to go.
i had friend(s) back in U whose mentally a bit lower than high school people.


Agreed, and ARM is not the end-all-be-all of microcontrollers.
 

Offline Bloch

  • Supporter
  • ****
  • Posts: 456
  • Country: dk
Re: Microcontroller for students- Suggestions please!
« Reply #35 on: June 07, 2011, 09:12:41 pm »
Quote
Young players  ::)

Then a newbee want to learn his first programing language. Then there is only one and that Pascal

Quote
Pascal as a small and efficient language intended to encourage good programming practices using structured programming and data structuring

Quote
Initially, Pascal was largely, but not exclusively, intended to teach students structured programming.[4] A generation of students used Pascal as an introductory language in undergraduate courses. Variants of Pascal have also frequently been used for everything from research projects to PC games and embedded systems

Then the students are ready to do "bad"  :) and "unsafe"  :o programs then please move to C or that they fancy.

So i will point to http://www.mikroe.com/eng/categories/view/2/compilers/ as in good/free

They can use PIC / PIC24 / PIC32 / AVR / 8032 That they select I dont thinks matters that much !

But one commes to mind PICKIT 2 / 3 cheap ok for newbee

Lars


 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4301
  • Country: us
Re: Microcontroller for students- Suggestions please!
« Reply #36 on: June 13, 2011, 09:13:28 am »
So I don't get it.

What's wrong with using Arduino hardware because it's cheap, readily available, reasonably usable, and populated with a relatively popular and usable microcontroller, and then having your class program it in Assembler or C as appropriate to the other content and aims of the class?  All things considered, it's just an AVR chip with a power supply, USB/Serial converter, and a bootloader.  You can stick to the Arduino IDE if you decide to teach C (ignoring the arduino libraries), or use something else.  (The bootloader is a big help; you won't need programmers PLUS development boards.)  For example, people have set up Eclipse, Netbeans, Visual Studio, and Geany (??) to work with Arduino.  If  you don't need the Arduino SW handholding, it would be considerably easier to set up.  (OTOH, Arduino has no debugger support...)

Likewise, why argue about the merits of AVRStudio 5 when there are so many development boards out there that will work fine with AVR Studio 4 ?

You could put together a simplified development environment for LaunchPad, too.  (But there have been LONG delays actually getting launchpads.)  I would say that the MSP430 is probably closer to the 6811 than most other modern microcontrollers.  TI has several other reasonably-priced development boards for the 430...

 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10214
  • Country: nz
Re: Microcontroller for students- Suggestions please!
« Reply #37 on: June 13, 2011, 09:49:43 am »
Personally, id give them a commonly available atmega and get them to build the dev board themselves, then they can write the demo code and tools too. Then pick out the best of what they produce and use it for next years students.

There's nothing like making your own stuff to learn on. i'm not really a fan of premade demo boards.
I'd probably just teach C, ASM would be an optional course.

But again, that's just me.
« Last Edit: June 13, 2011, 09:54:53 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf