Pages: [1]   Go Down
Author Topic: C or Embedded C  (Read 1185 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 72
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I originally posted this question as a response on another post. but after thinking it through i believe it should be it's own topic.

I see several books entitled c programing for microcontrollers or embedded systems and the like, none of which cover the Arduino platform.  Then I see bools like C Primer Plus or C++ Primer Plus, which get great ratings and are quite thick might I add.  I guess my question is would getting a straight c/c++ programing book be overkill, taking me in directions not relevant to microcontrollers, or should I be waiting for a book entitled C Programing for Microcontrollers with the Arduino?  
 
I don't want to spent $50 to $100 on a book that won't do the job.
 
Thanks
 
P.S. I think I speak for several newbs like myself when I say why has no one written that last book I mentioned? smiley-wink
Logged

0
Offline Offline
Faraday Member
**
Karma: 7
Posts: 2526
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It's the same language, no matter if you are using it on a microcontroller or on a supercomputer.  The big difference is the libraries that are available.  Of course, to a beginner differentiating between a call to a function in a library and an actual part of the language can be a bit confusing.  (e.g. "no, printf() is not part of the C language.  Really.")

The books that target microcontrollers / embedded systems are probably better suited to Arduino development, but I don't have anything specific to recommend.

-j
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 72
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks kg4wsv.

Would anyone know a good book for the beginner?  I hate to be a pain but it seems the hardest question to get an answer to is what is a good book/books for a beginner in programing embedded c/c++ that is compatible w/ Arduino.

Thanks  
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 113
Building our robotic overlords
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I can recommend C++ Primer Plus - it was the textbook for a programming class I took last year.  And for straight C the concensus pick is the second edition C Programming Language by Kernighan and Ritchie (the ANSI K&R) which is a model text for clarity of language and presentation.
Logged

New Zealand
Offline Offline
God Member
*****
Karma: 0
Posts: 999
Arduino pebbles
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
And for straight C the concensus pick is the second edition C Programming Language by Kernighan and Ritchie (the ANSI K&R) which is a model text for clarity of language and presentation.
I have to admit I've never really understood the enthusiasm for K&R around here. While it may be a "model text for clarity of language and presentation" I'm not convinced that's entirely useful for people who are learning from a more non-technical background.

I finally managed to find the title of the textbook required by my university back around 2001: C Programming: A Modern Approach. While I was pretty much self-taught by that stage I do remember being impressed by the book at the time. (Of course the mists of time may be clouding my recollection. :-) )

So personally, for people with non-technical backgrounds (and even for others) I wouldn't really recommend K&R, but would suggest considering this book or other similar more "teaching" orientated books.

--Phil.
Logged

Denver, CO
Offline Offline
Jr. Member
**
Karma: 0
Posts: 85
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

For my crash course in Arduino programming I plunged into the Oreilly book C in a Nutshell followed by K&R second edition. And believe it or not C for Dummies was a little helpful. Essentially though, that is a hard track to follow because of the implementation of the Arduino structure being a mash up of C and a little C++ with some other stuff to take the hard edges off. The printf() example is a case in how hard it can be to separate an essential part of C for a computer as opposed to Arduino C which does not have this command. Really the reference here on the website (and my reediting and reorg of the basic info in my notebook) is about the best reference for the Arduino language. You could also look at Igoe's Making Things Talk which is Arduino-centric but may not be all that introductory or terrible helpful unless you plan on using xPorts or xBees. I am going to try to rewrite my notebook from the ground up over the next 6 months but until then that doesnt help you much.

Best,
brian
Logged

London
Offline Offline
Faraday Member
**
Karma: 8
Posts: 6240
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I have to admit I've never really understood the enthusiasm for K&R around here. While it may be a "model text for clarity of language and presentation" I'm not convinced that's entirely useful for people who are learning from a more non-technical background.

I finally managed to find the title of the textbook required by my university back around 2001: C Programming: A Modern Approach. While I was pretty much self-taught by that stage I do remember being impressed by the book at the time. (Of course the mists of time may be clouding my recollection. :-) )

So personally, for people with non-technical backgrounds (and even for others) I wouldn't really recommend K&R, but would suggest considering this book or other similar more "teaching" orientated books.

--Phil.
I have to put my hand up and admit that K&R was my recommendation early on when I started on this forum. I hadn't realised that a good many people are much more interested in getting a sketch to do something interesting than understanding the finer points of programming languages. I would not recommend K&R to people without a technical background, but for those that are interested in software engineering in general and the C language in particular, it's a damn fine technical book.  

For those with a little bit of technical background that are interested in learning more about C,  there is a flash based audio-visual seminar on the fundamentals of the C language available for free download here:
http://mindview.net/CDs/ThinkingInC/beta3

The course was written by Bruce Eckel, a highly respected trainer on Object oriented programming. (His books on thinking in C++ and Java are classics)

The C course does is not directly target embedded programming and the first few chapters on setting up a compiler and getting some printf examples running can be skipped. But the chapters on data type, program flow and functions are quite good.

« Last Edit: March 17, 2008, 04:42:52 am by mem » Logged

Pages: [1]   Go Up
Jump to: