Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

C textbook

C textbook

2006-01-03 by Dennis

Can anyone recommend a good, comprehensive book for programming in C/C++ for microprocessors/controllers?
Dennis

Re: [AVR-Chat] C textbook

2006-01-03 by Ralph Hilton

On Mon, 2 Jan 2006 20:13:42 -0600 you wrote:

>Can anyone recommend a good, comprehensive book for programming in C/C++ for microprocessors/controllers?
>Dennis

"Embedded C Programming and the Atmel AVR"

details on
http://www.prllc.com/productcart/pc/viewPrd.asp?idcategory=6&idproduct=12
--
Ralph Hilton
http://www.ralphhilton.org
C-Meter: http://www.cmeter.org
FZAOINT http://www.fzaoint.net

Re: [AVR-Chat] C textbook

2006-01-03 by James Washer

I'll sell you my (hardly used) copy for 1/2 Amazon's price (i.e. I was not impressed)

On Tue, 03 Jan 2006 13:34:45 +0100
Ralph Hilton <ralph@ralphhilton.org> wrote:
Show quoted textHide quoted text
> On Mon, 2 Jan 2006 20:13:42 -0600 you wrote:
> 
> >Can anyone recommend a good, comprehensive book for programming in C/C++ for microprocessors/controllers?
> >Dennis
> 
> "Embedded C Programming and the Atmel AVR"
> 
> details on
> http://www.prllc.com/productcart/pc/viewPrd.asp?idcategory=6&idproduct=12
> --
> Ralph Hilton
> http://www.ralphhilton.org
> C-Meter: http://www.cmeter.org
> FZAOINT http://www.fzaoint.net
> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>  
>

Re: [AVR-Chat] C textbook

2006-01-03 by Ralph Hilton

On Tue, 3 Jan 2006 13:33:39 -0800 you wrote:

>I'll sell you my (hardly used) copy for 1/2 Amazon's price (i.e. I was not impressed)

For my needs it was useful. It depends on one's background.
I started with mainframes then shifted to PCs and it provided exactly what I needed to
program AVRs in C. Add reading the datasheet for the chip one wants to use and the manual
for the compiler then what is missing?

Can you suggest a better book?

>On Tue, 03 Jan 2006 13:34:45 +0100
>Ralph Hilton <ralph@ralphhilton.org> wrote:
>
>> On Mon, 2 Jan 2006 20:13:42 -0600 you wrote:
>> 
>> >Can anyone recommend a good, comprehensive book for programming in C/C++ for microprocessors/controllers?
>> >Dennis
>> 
>> "Embedded C Programming and the Atmel AVR"
>> 
>> details on
>> http://www.prllc.com/productcart/pc/viewPrd.asp?idcategory=6&idproduct=12

--
Ralph Hilton
http://www.ralphhilton.org
C-Meter: http://www.cmeter.org
FZAOINT http://www.fzaoint.net

Re: [AVR-Chat] C textbook

2006-01-03 by James Washer

Alas, I cannot. There's a dirth of decent embedded programming books. I come for a long career of op sys internals, mostly *nix's (SVRx/BSD/Linux) so perhaps the book just wasn't what I was looking for.  It's not a bad book, just not great.

What I really want is a 2006 updated edition of "The Art of Electronics" by Horiwitz and Hill. A great book, but showing it's age (1989)

On Tue, 03 Jan 2006 22:44:35 +0100
Ralph Hilton <ralph@ralphhilton.org> wrote:
Show quoted textHide quoted text
> On Tue, 3 Jan 2006 13:33:39 -0800 you wrote:
> 
> >I'll sell you my (hardly used) copy for 1/2 Amazon's price (i.e. I was not impressed)
> 
> For my needs it was useful. It depends on one's background.
> I started with mainframes then shifted to PCs and it provided exactly what I needed to
> program AVRs in C. Add reading the datasheet for the chip one wants to use and the manual
> for the compiler then what is missing?
> 
> Can you suggest a better book?
> 
> >On Tue, 03 Jan 2006 13:34:45 +0100
> >Ralph Hilton <ralph@ralphhilton.org> wrote:
> >
> >> On Mon, 2 Jan 2006 20:13:42 -0600 you wrote:
> >> 
> >> >Can anyone recommend a good, comprehensive book for programming in C/C++ for microprocessors/controllers?
> >> >Dennis
> >> 
> >> "Embedded C Programming and the Atmel AVR"
> >> 
> >> details on
> >> http://www.prllc.com/productcart/pc/viewPrd.asp?idcategory=6&idproduct=12
> 
> --
> Ralph Hilton
> http://www.ralphhilton.org
> C-Meter: http://www.cmeter.org
> FZAOINT http://www.fzaoint.net
> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>  
>

Re: [AVR-Chat] C textbook

2006-01-04 by Dennis

So in all your roundabout ways, no one has any recommendation for anything.
Looks life an infinite loop, i.e. I wind up with a nonanswer.
Dennis
----- Original Message ----- 
Show quoted textHide quoted text
From: "James Washer" <washer@trlp.com>
To: <AVR-Chat@yahoogroups.com>
Sent: Tuesday, January 03, 2006 4:20 PM
Subject: Re: [AVR-Chat] C textbook


> Alas, I cannot. There's a dirth of decent embedded programming books. I 
> come for a long career of op sys internals, mostly *nix's (SVRx/BSD/Linux) 
> so perhaps the book just wasn't what I was looking for.  It's not a bad 
> book, just not great.
>
> What I really want is a 2006 updated edition of "The Art of Electronics" 
> by Horiwitz and Hill. A great book, but showing it's age (1989)
>
> On Tue, 03 Jan 2006 22:44:35 +0100
> Ralph Hilton <ralph@ralphhilton.org> wrote:
>
>> On Tue, 3 Jan 2006 13:33:39 -0800 you wrote:
>>
>> >I'll sell you my (hardly used) copy for 1/2 Amazon's price (i.e. I was 
>> >not impressed)
>>
>> For my needs it was useful. It depends on one's background.
>> I started with mainframes then shifted to PCs and it provided exactly 
>> what I needed to
>> program AVRs in C. Add reading the datasheet for the chip one wants to 
>> use and the manual
>> for the compiler then what is missing?
>>
>> Can you suggest a better book?
>>
>> >On Tue, 03 Jan 2006 13:34:45 +0100
>> >Ralph Hilton <ralph@ralphhilton.org> wrote:
>> >
>> >> On Mon, 2 Jan 2006 20:13:42 -0600 you wrote:
>> >>
>> >> >Can anyone recommend a good, comprehensive book for programming in 
>> >> >C/C++ for microprocessors/controllers?
>> >> >Dennis
>> >>
>> >> "Embedded C Programming and the Atmel AVR"
>> >>
>> >> details on
>> >> http://www.prllc.com/productcart/pc/viewPrd.asp?idcategory=6&idproduct=12
>>
>> --
>> Ralph Hilton
>> http://www.ralphhilton.org
>> C-Meter: http://www.cmeter.org
>> FZAOINT http://www.fzaoint.net
>>
>>
>>
>> Yahoo! Groups Links
>>
>>
>>
>>
>>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>

Re: [AVR-Chat] C textbook

2006-01-04 by Micah Stevens

Sounded like you got a recommendation to me. Although maybe you didn't like 
it. Strange way to reply to it. 

Part of the problem is that what you're looking for may not exist. A 
comprehensive C book expressly for microcontrollers? Wow.. I sure as hell 
(even if I had the knowledge) wouldn't want to write that. It's way too much 
ground to cover. That's almost as bad as saying you want a comprehensive book 
on Assembly programming for embedded processors. 

What are you really trying to do? Learn C? Get a C book.. Practical C 
programming from Oreilly is a pretty good overview. There's plenty of 700 
page tomes out there if you want more detail. 

Are you trying to learn how C relates to AVRs? Find yourself a compiler, and 
read their docs. (granted some are better than others), and experiment. 
Because each compiler will address the micro in a different way. 

If you're looking for specific techniques, there's a reason why there exists 
lists like this one, mostly because there isn't a book that tells you how to 
do this stuff in a comprehensive clear manner. It's more about experience, 
being willing to spend time experimenting and having someone to ask 
questions, which is why I'm so glad to have lists like this one to lurk on. 

I hope that helps, but it probably doesn't. And maybe I'm way off in left 
field, but I really haven't ever seen anything like what you mention. Maybe 
someone else has, but based on the responses so far, there's one specific to 
the AVR, that is 'so-so' depending on your goals. 

If you want something else, try asking a more specific question. 

-Micah 
Show quoted textHide quoted text
On Tuesday 03 January 2006 5:40 pm, Dennis wrote:
>  So in all your roundabout ways, no one has any recommendation for
> anything. Looks life an infinite loop, i.e. I wind up with a nonanswer.
>  Dennis
>  ----- Original Message -----
>  From: "James Washer" <washer@trlp.com>
>  To: <AVR-Chat@yahoogroups.com>
>  Sent: Tuesday, January 03, 2006 4:20 PM
>  Subject: Re: [AVR-Chat] C textbook
>
>  > Alas, I cannot. There's a dirth of decent embedded programming books. I
>  > come for a long career of op sys internals, mostly *nix's
>  > (SVRx/BSD/Linux) so perhaps the book just wasn't what I was looking
>  > for.  It's not a bad book, just not great.
>  >
>  > What I really want is a 2006 updated edition of "The Art of Electronics"
>  > by Horiwitz and Hill. A great book, but showing it's age (1989)
>  >
>  > On Tue, 03 Jan 2006 22:44:35 +0100
>  >
>  > Ralph Hilton <ralph@ralphhilton.org> wrote:
>  >> On Tue, 3 Jan 2006 13:33:39 -0800 you wrote:
>  >> >I'll sell you my (hardly used) copy for 1/2 Amazon's price (i.e. I was
>  >> >not impressed)
>  >>
>  >> For my needs it was useful. It depends on one's background.
>  >> I started with mainframes then shifted to PCs and it provided exactly
>  >> what I needed to
>  >> program AVRs in C. Add reading the datasheet for the chip one wants to
>  >> use and the manual
>  >> for the compiler then what is missing?
>  >>
>  >> Can you suggest a better book?
>  >>
>  >> >On Tue, 03 Jan 2006 13:34:45 +0100
>  >> >
>  >> >Ralph Hilton <ralph@ralphhilton.org> wrote:
>  >> >> On Mon, 2 Jan 2006 20:13:42 -0600 you wrote:
>  >> >> >Can anyone recommend a good, comprehensive book for programming in
>  >> >> >C/C++ for microprocessors/controllers?
>  >> >> >Dennis
>  >> >>
>  >> >> "Embedded C Programming and the Atmel AVR"
>  >> >>
>  >> >> details on
>  >> >> http://www.prllc.com/productcart/pc/viewPrd.asp?idcategory=6&idprodu
>  >> >>ct=12
>  >>
>  >> --
>  >> Ralph Hilton
>  >> http://www.ralphhilton.org
>  >> C-Meter: http://www.cmeter.org
>  >> FZAOINT http://www.fzaoint.net
>  >>
>  >>
>  >>
>  >> Yahoo! Groups Links
>  >
>  > Yahoo! Groups Links
>
> SPONSORED LINKS
> Atmel avr   Microcontrollers   Intel microprocessors
>   Pic microcontrollers
>
>
> YAHOO! GROUPS LINKS
>
>
>  Visit your group "AVR-Chat" on the web.
>  
>  To unsubscribe from this group, send an email to:
>  AVR-Chat-unsubscribe@yahoogroups.com
>  
>  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

Re: C textbook

2006-01-04 by Don Kinzer

--- In AVR-Chat@yahoogroups.com, Micah Stevens <micah@9...> wrote:
> Part of the problem is that what you're looking for may not exist. 

Another part of the problem is that embedded programming is more 
involved than, say, general C or VB or other language programming.  A 
good embedded programmer not only knows software, but understands 
hardware as well.  I have found both my EE background and graduate CS 
studies quite useful in this domain.

Don
ZBasic Microcontrollers
http://www.zbasic.net

Re: [AVR-Chat] C textbook

2006-01-04 by Dennis

The best reply yet. Much appreciate.
Dennis
Show quoted textHide quoted text
----- Original Message ----- 
From: "Micah Stevens" <micah@9250x.com>
To: <AVR-Chat@yahoogroups.com>
Sent: Tuesday, January 03, 2006 7:55 PM
Subject: Re: [AVR-Chat] C textbook



Sounded like you got a recommendation to me. Although maybe you didn't like
it. Strange way to reply to it.

Part of the problem is that what you're looking for may not exist. A
comprehensive C book expressly for microcontrollers? Wow.. I sure as hell
(even if I had the knowledge) wouldn't want to write that. It's way too much
ground to cover. That's almost as bad as saying you want a comprehensive 
book
on Assembly programming for embedded processors.

What are you really trying to do? Learn C? Get a C book.. Practical C
programming from Oreilly is a pretty good overview. There's plenty of 700
page tomes out there if you want more detail.

Are you trying to learn how C relates to AVRs? Find yourself a compiler, and
read their docs. (granted some are better than others), and experiment.
Because each compiler will address the micro in a different way.

If you're looking for specific techniques, there's a reason why there exists
lists like this one, mostly because there isn't a book that tells you how to
do this stuff in a comprehensive clear manner. It's more about experience,
being willing to spend time experimenting and having someone to ask
questions, which is why I'm so glad to have lists like this one to lurk on.

I hope that helps, but it probably doesn't. And maybe I'm way off in left
field, but I really haven't ever seen anything like what you mention. Maybe
someone else has, but based on the responses so far, there's one specific to
the AVR, that is 'so-so' depending on your goals.

If you want something else, try asking a more specific question.

-Micah

On Tuesday 03 January 2006 5:40 pm, Dennis wrote:
>  So in all your roundabout ways, no one has any recommendation for
> anything. Looks life an infinite loop, i.e. I wind up with a nonanswer.
>  Dennis
>  ----- Original Message -----
>  From: "James Washer" <washer@trlp.com>
>  To: <AVR-Chat@yahoogroups.com>
>  Sent: Tuesday, January 03, 2006 4:20 PM
>  Subject: Re: [AVR-Chat] C textbook
>
>  > Alas, I cannot. There's a dirth of decent embedded programming books. I
>  > come for a long career of op sys internals, mostly *nix's
>  > (SVRx/BSD/Linux) so perhaps the book just wasn't what I was looking
>  > for. It's not a bad book, just not great.
>  >
>  > What I really want is a 2006 updated edition of "The Art of 
> Electronics"
>  > by Horiwitz and Hill. A great book, but showing it's age (1989)
>  >
>  > On Tue, 03 Jan 2006 22:44:35 +0100
>  >
>  > Ralph Hilton <ralph@ralphhilton.org> wrote:
>  >> On Tue, 3 Jan 2006 13:33:39 -0800 you wrote:
>  >> >I'll sell you my (hardly used) copy for 1/2 Amazon's price (i.e. I 
> was
>  >> >not impressed)
>  >>
>  >> For my needs it was useful. It depends on one's background.
>  >> I started with mainframes then shifted to PCs and it provided exactly
>  >> what I needed to
>  >> program AVRs in C. Add reading the datasheet for the chip one wants to
>  >> use and the manual
>  >> for the compiler then what is missing?
>  >>
>  >> Can you suggest a better book?
>  >>
>  >> >On Tue, 03 Jan 2006 13:34:45 +0100
>  >> >
>  >> >Ralph Hilton <ralph@ralphhilton.org> wrote:
>  >> >> On Mon, 2 Jan 2006 20:13:42 -0600 you wrote:
>  >> >> >Can anyone recommend a good, comprehensive book for programming in
>  >> >> >C/C++ for microprocessors/controllers?
>  >> >> >Dennis
>  >> >>
>  >> >> "Embedded C Programming and the Atmel AVR"
>  >> >>
>  >> >> details on
>  >> >> 
> http://www.prllc.com/productcart/pc/viewPrd.asp?idcategory=6&idprodu
>  >> >>ct=12
>  >>
>  >> --
>  >> Ralph Hilton
>  >> http://www.ralphhilton.org
>  >> C-Meter: http://www.cmeter.org
>  >> FZAOINT http://www.fzaoint.net
>  >>
>  >>
>  >>
>  >> Yahoo! Groups Links
>  >
>  > Yahoo! Groups Links
>
> SPONSORED LINKS
> Atmel avr   Microcontrollers   Intel microprocessors
>   Pic microcontrollers
>
>
> YAHOO! GROUPS LINKS
>
>
> Visit your group "AVR-Chat" on the web.
>
> To unsubscribe from this group, send an email to:
> AVR-Chat-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



Yahoo! Groups Links

RE: [AVR-Chat] C textbook

2006-01-04 by stevech

My brain would break if I tried to learn C and microprocessors (in general)
concurrently!

If micros are the goal, try generic C for a non-graphical-user-interface
such as on your PC but use a crude C compiler for Windows or a cmd window -
like freeware Borland C. Get it to talk to the serial port. Then write some
assembly for a given micro so you get a feel for the underlying
architecture. At this point, move to C, but treat C like an assembler, not a
high level compiler. That last point is key - a mind-shift versus software
guys with experience in MS Windows GUI or X-Windows.

RE: [AVR-Chat] C textbook

2006-01-04 by Chuck Hackett

> From: Dennis
> 
> So in all your roundabout ways, no one has any recommendation for anything.
> Looks life an infinite loop, i.e. I wind up with a nonanswer.
> Dennis

Well, someone did suggest "Embedded C Programming and the Atmel AVR".  I have
found this book useful in getting started with AVRs.  I knew C before I started
with AVRS but I'm by no means an 'experienced' C programmer (i.e.: one who can
write a whole program without the language manual at hand).  Part of my problem
is that, in my professional life, I used C and many other languages close to C
which means that they sometimes get muddled up in my aging mind :-)

Knowing some C, I felt that "Embedded C Programming and the Atmel AVR" helped me
transition to AVRs.

But, as someone else said, C programming on embedded controllers isn't the same
as on a mainframe or a PC.  In embedded controllers you also have to have
intimate knowledge of the hardware.

My background: I'm a 1975 EE graduate (SUNY Buffalo) with a minor in computer
design but made my living doing financial data networks software development.

In your original post you asked for a "comprehensive" book on C/C++ on embedded
controllers.  That's a tall order.  IIRC this book does not cover C++ use and I
don't know if you'd consider it comprehensive, but, if you're keeping track of
votes, add on for me this book :-)

It was this list that suggested the book to me about a year ago.

You didn't indicate a processor choice in your original post but, since this is
an AVR list, I assume you're asking about that environment.

You also have to realize that (unfortunately) there isn't just one C for
microcontrollers.  As someone new to this environment I've found a significant
difference between AVR-GCC (which I use), CodeVision, ImageCraft, etc.  They all
seem to handle hardware issues a little differently - including processor
initialization, etc.

Sounds like you might be looking for one 'study guide' for the microcontroller
environment - I was looking for one too but I've come to realize that you have
to study the datasheets (for your processor of choice as well as every
peripheral you use), the manual for the compiler you choose (not easy), etc.

This list is also a big help ... and I know that if I've misstated any of this
someone will set me straight :-)  (Gently, I hope)

Cheers,

Chuck Hackett
"Good judgment comes from experience, experience comes from bad judgment"
7.5" gauge Union Pacific Northern (4-8-4) 844
http://www.whitetrout.net/Chuck

Re: [AVR-Chat] C textbook

2006-01-04 by Micah Stevens

Haha.. I learned C on a micro, and then shifted to a PC.. you can imagine what 
I think of PC programming.. I'm still in shock to this day..

-Micah 
Show quoted textHide quoted text
On Tuesday 03 January 2006 7:15 pm, stevech wrote:
>  My brain would break if I tried to learn C and microprocessors (in
> general) concurrently!
>
>  If micros are the goal, try generic C for a non-graphical-user-interface
>  such as on your PC but use a crude C compiler for Windows or a cmd window
> - like freeware Borland C. Get it to talk to the serial port. Then write
> some assembly for a given micro so you get a feel for the underlying
>  architecture. At this point, move to C, but treat C like an assembler, not
> a high level compiler. That last point is key - a mind-shift versus
> software guys with experience in MS Windows GUI or X-Windows.
>
>
>
>
>
>
> SPONSORED LINKS
> Atmel avr   Microcontrollers   Intel microprocessors
>   Pic microcontrollers
>
>
> YAHOO! GROUPS LINKS
>
>
>  Visit your group "AVR-Chat" on the web.
>  
>  To unsubscribe from this group, send an email to:
>  AVR-Chat-unsubscribe@yahoogroups.com
>  
>  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

RE: [AVR-Chat] C textbook

2006-01-04 by Zack Widup

On Tue, 3 Jan 2006, Chuck Hackett wrote:

> 
> Well, someone did suggest "Embedded C Programming and the Atmel AVR".  I
> have
> found this book useful in getting started with AVRs.  I knew C before I
> started
> with AVRS but I'm by no means an 'experienced' C programmer (i.e.: one
> who can
> write a whole program without the language manual at hand).  Part of my
> problem
> is that, in my professional life, I used C and many other languages close
> to C
> which means that they sometimes get muddled up in my aging mind :-)
> 

Haha - that has been happening to me for years writing assembler as I 
switch from one micro to another.  I still do some PIC programming and 
I've been working on a project with the 10F200. After I've done this for a 
while with PIC's, I need to refresh my memory on the mnemonics of the AVR, 
and vice versa.

The observant reader might've caught me in a recent posting noting 
"retfie" (which is the PIC mnemonic) rather than "reti" (which is the AVR 
nmemonic).

I promise I won't do it again!  :-)

Zack

Re: [AVR-Chat] C textbook

2006-01-04 by Dennis

Caught the retfie, scratched head.
What I am seeing in the original question I posed is a holistic approach to 
embedded programming. Maybe
Dijkstra is worth a reread.
Dennis
----- Original Message ----- 
Show quoted textHide quoted text
From: "Zack Widup" <w9sz@prairienet.org>
To: <AVR-Chat@yahoogroups.com>
Sent: Tuesday, January 03, 2006 11:27 PM
Subject: RE: [AVR-Chat] C textbook


> On Tue, 3 Jan 2006, Chuck Hackett wrote:
>
>>
>> Well, someone did suggest "Embedded C Programming and the Atmel AVR". I
>> have
>> found this book useful in getting started with AVRs. I knew C before I
>> started
>> with AVRS but I'm by no means an 'experienced' C programmer (i.e.: one
>> who can
>> write a whole program without the language manual at hand). Part of my
>> problem
>> is that, in my professional life, I used C and many other languages close
>> to C
>> which means that they sometimes get muddled up in my aging mind :-)
>>
>
> Haha - that has been happening to me for years writing assembler as I
> switch from one micro to another.  I still do some PIC programming and
> I've been working on a project with the 10F200. After I've done this for a
> while with PIC's, I need to refresh my memory on the mnemonics of the AVR,
> and vice versa.
>
> The observant reader might've caught me in a recent posting noting
> "retfie" (which is the PIC mnemonic) rather than "reti" (which is the AVR
> nmemonic).
>
> I promise I won't do it again!  :-)
>
> Zack
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.