Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: Magnus on January 12, 2009, 12:21:06 PM

Title: Can you recomend any good books on learning to program microcontrollers?
Post by: Magnus on January 12, 2009, 12:21:06 PM
I really need to learn to program using code such as that used with the AXON microcontroller. It's sink or swim and I need someone to give me a good push :D in the right direction. I need books that give lots of examples and are easy to understand.

Thanks for your time....
Title: Re: Can you recomend any good books on learning to program microcontrollers?
Post by: frodo on January 12, 2009, 12:42:14 PM
i don't know about any books but i do know a couple of methods on how to learn C. TRIAL AND ERROR and practice doing the reverse of codes written by other people and see what happens. this is how airman00 learnt how to do C.
Title: Re: Can you recomend any good books on learning to program microcontrollers?
Post by: siempre.aprendiendo on January 12, 2009, 01:23:02 PM
A very good introduction book to c & robotics with ATMEL microcontrollers is "C Programming for Microcontrollers" by  Joe Pardue
Title: Re: Can you recomend any good books on learning to program microcontrollers?
Post by: frodo on January 12, 2009, 01:24:49 PM
is it from like basic to expert levels of program this book?
Title: Re: Can you recomend any good books on learning to program microcontrollers?
Post by: siempre.aprendiendo on January 12, 2009, 01:47:17 PM
Well, not to expert.

You can download here the table of contents (http://www.smileymicros.com/download/Table%20of%20Contents.pdf)

Here (http://www.smileymicros.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=26) the web.
Title: Re: Can you recomend any good books on learning to program microcontrollers?
Post by: frodo on January 12, 2009, 01:51:31 PM
nice, looks good. do you know how much it costs in England or whether you can get it in England?
Title: Re: Can you recomend any good books on learning to program microcontrollers?
Post by: TrickyNekro on January 12, 2009, 02:24:30 PM
I didn't really like the C Programming for microcontrollers......
Truly....
Although it has many good projects it's not for total beginners... for sure....
Cause sometimes it jumps thing badly.... :(
Title: Re: Can you recomend any good books on learning to program microcontrollers?
Post by: frodo on January 12, 2009, 02:31:30 PM
aww thats a pity, seeing as i'm a totat beginner in c programming. :'(
Title: Re: Can you recomend any good books on learning to program microcontrollers?
Post by: siempre.aprendiendo on January 12, 2009, 02:46:02 PM
I think "C Programming for Microcontrollers" is a fast and practical introduction to c and programming micros. I don't know if it's not too beginer oriented, I'm a beginner programming microcontrollers, but not programming in C nor C++.

But if you a want a more structured and deeper introduction to the c programming language, this is pretty good and free :)

http://cprog.tomsweb.net/cintro.pdf

But there are a lot...

http://www.physics.drexel.edu/courses/Comp_Phys/General/C_basics/
http://www.howstuffworks.com/c.htm
http://www.cprogramming.com/tutorial.html

and more (http://www.google.es/search?q=c+programming+language+tutorial&sourceid=navclient-ff&ie=UTF-8&rls=GGGL,GGGL:2006-31,GGGL:es)
Title: Re: Can you recomend any good books on learning to program microcontrollers?
Post by: MaltiK on January 12, 2009, 03:16:37 PM
Start with the "learn c++ in 21 days" books (its important that you begin with c++) and then read the book, Programming Microcontrollers in C by Ted Van Sickle
Title: Re: Can you recomend any good books on learning to program microcontrollers?
Post by: frodo on January 12, 2009, 03:18:16 PM
why learn c++ first> i mean its only a branch of c.
Title: Re: Can you recomend any good books on learning to program microcontrollers?
Post by: MaltiK on January 12, 2009, 04:28:42 PM
Quote
Should I Learn C First?

The question inevitably arises: "Since C++ is a superset of C, should I learn C first?" Stroustrup and most other C++ programmers agree. Not only is it unnecessary to learn C first, it may be advantageous not to do so. This book attempts to meet the needs of people like you, who come to C++ without prior experience of C. In fact, this book assumes no programming experience of any kind.
Title: Re: Can you recomend any good books on learning to program microcontrollers?
Post by: siempre.aprendiendo on January 12, 2009, 04:30:35 PM
Well, c++ supports object oriented (http://en.wikipedia.org/wiki/Object_oriented_programming) and procedural (http://en.wikipedia.org/wiki/Procedural_programming) programming, but c only supports procedural (http://en.wikipedia.org/wiki/Procedural_programming) programming.

You can use c++ (almost) as if it were c, but not the other way around.

I love c++, but  is more difficult to learn, and it's not very supported by microcontrollers (on avr for example (http://www.nongnu.org/avr-libc/user-manual/FAQ.html#faq_cplusplus)). You can start with c and later if you want improve you programming skills and knowledge you could learn object oriented programming with c++ (or java, c#...)
Title: Re: Can you recomend any good books on learning to program microcontrollers?
Post by: Webbot on January 12, 2009, 08:56:13 PM
If you want to learn plain vanilla C then Kernighan and Ritchie (spelling?) has always been the reference - for the C language not necessarilly for microcontrollers.

Quote
I love c++, but  is more difficult to learn, and it's not very supported by microcontrollers (on avr for example).
You need to check out my C++ library in the member tutorials - its for AVR.

Quote
why learn c++ first> i mean its only a branch of c.
I see it as the other way around. C can only do a subset of what C++ can do - so C is a minor branch of C++.

Title: Re: Can you recomend any good books on learning to program microcontrollers?
Post by: siempre.aprendiendo on January 13, 2009, 02:08:16 PM
Quote
I love c++, but  is more difficult to learn, and it's not very supported by microcontrollers (on avr for example).
You need to check out my C++ library in the member tutorials - its for AVR.

I will check it!, thanks :)
Title: Re: Can you recomend any good books on learning to program microcontrollers?
Post by: Soeren on January 13, 2009, 02:27:22 PM
Quote
why learn c++ first> i mean its only a branch of c.
I see it as the other way around. C can only do a subset of what C++ can do - so C is a minor branch of C++.
C++ is based on the C language, with the features of OOP as the most important difference.
There's no reason to learn C++ if you just wanna program controllers and C is easier to learn, since it is in itself simpler.

You can even use BASIC, in one of the controller oriented flavours (and get around the ugliness of any kind of C), much quicker to learn if you only plan to program a few controllers in a lifetime.
Title: Re: Can you recomend any good books on learning to program microcontrollers?
Post by: siempre.aprendiendo on January 13, 2009, 02:53:57 PM

You can even use BASIC, in one of the controller oriented flavours (and get around the ugliness of any kind of C), much quicker to learn if you only plan to program a few controllers in a lifetime.


Oh, my God!, Have I read "ugliness" about C???

Beautifulness is a very relative issue ;)