recommend intermediate level book about avr programming - Page 1
Forum section: electronics / general

author: nour
author_rank: Frequent Contributor
timestamp: March 27, 2016, 09:41:22 am
content: Hi,I have been playing with avr and arduino for quite sometime and I have done some stuff with them an I want to move on with my level.Can someone recommend good book about Atmel AVR using C languageThe book that I am looking for should be at the intermediate level because I don't want to waste my time reading about loops and conditions I already know thisI want book dealing with the hardware features in more mature way rather than just discussing the basic level or the basic featuresI am software engineer so I don't have problems dealing with C or what so everEDITI have already went throughMake:AVR Programmingand this is not the level that I am looking for.thanks

author: Robartes_m
author_rank: Contributor
timestamp: March 27, 2016, 10:39:11 am
content: Hi,this one gets you up to speed programming an AVR, without too much unnecessary handholding:Make: AVR programming

author: nour
author_rank: Frequent Contributor
timestamp: March 27, 2016, 10:51:09 am
content: HiThanks for your replyI should have mentioned that I have already went through this book and I think it is not what I am looking forI consider this book as for absolute beginners (at least for me)I have read until interrupts and stopped because the level of the book is very basic and I only get to know the very basic featuresThat's means I will need to read another book to learn and understand more about the advanced featureswhich is waste of timeI don't want read several books before be able to do something usefulanyway thanks for your interaction

author: obiwanjacobi
author_rank: Super Contributor
timestamp: March 27, 2016, 10:56:59 am
content: I would suggest you read the datasheet and try out each peripheral one at a time. All you need in C is some bit level manipulation and common stuff (vars, loops etc).Something like an Arduino could be helpful.

author: dannyf
author_rank: Super Contributor
timestamp: March 27, 2016, 10:59:35 am
content: Since no one but you knows what you already know, it is hard to recommend something there for you.Generally, you don't need a book for this, especially if you are good at programming. The data sheet is more than enough, and the most authoritative source on a given chip.

author: nour
author_rank: Frequent Contributor
timestamp: March 27, 2016, 12:05:44 pm
content: Quote from: dannyf on March 27, 2016, 10:59:35 amI consider My level in programming MCU as beginner, but I need to learn other stuff more than just loops and conditions and other basic hardware featuresI want something intended for programmer and those who are already familiar with software and hardware programmingthe problem with the datasheet that it would get into very specific details and features that usually require very advanced user(hardware programmer)In software engineering If I would like to learn about something and already have some knowledge about it I would go for books talking about fundamentals which usually intended for those who already know the basic but not yet the advanced topics

author: mathsquid
author_rank: Frequent Contributor
timestamp: March 27, 2016, 12:28:51 pm
content: You might try looking through Atmel's application notes and see if there's something there that interests you.http://www.atmel.com/products/microcontrollers/avr/default.aspx?tab=documents&Asset_Type=020%20Application%20Note

author: dannyf
author_rank: Super Contributor
timestamp: March 27, 2016, 01:56:48 pm
content: QuoteThose people go to the datasheet,QuoteIt is hard to be in the embedded business without being a "hardware programmer". There really isn't a whole lot to being embedded programming: being good in the language / tools + being able to read / comprehend a datasheet.QuoteThe difficulty for others trying to help you is that they don't know what "fundamentals" you already possess and what "some knowledge" you wish to learn. One way for you to help them is to give a few examples of what you are trying to learn and what you already know.

author: westfw
author_rank: Super Contributor
timestamp: March 28, 2016, 07:21:05 am
content: It sort-of sounds like you want a book that describes the typical peripherals of a microcontroller (UART, SPI, I2C, A2D, PWM, etc) in a way that explains what they do and how to use them, without getting bogged down in elementary explanations of the usual software techniques. So that given a typical datasheet example like:Code:/* Set frame format: 8data, 2stop bit */UCSR0C = (1<<USBS0)|(3<<UCSZ00);You'd like to find a book that describes "What is a stop bit and why would I want two of them" rather than explanations of shift and bitwise Or operators.Or maybe "What's the difference between I2C, SPI, and USART, anyway?" and "It's nice that this peripheral has about a billion different possible configurations - how about some hint as to which ones are most commonly used, and why?"Sometimes you can find this in datasheets, or app notes, or in white papers from the original "inventor" of a protocol (I2C, for instance.) Once you're past the first couple of chips, the datasheet might be enough. (But those first couple of chips it would be nice to have something more ... tutorial. Lesson-like.)Unfortunately, I don't really know of any books like that. You used to find tutorials in magazines like Byte and Kilobaud, back when microcomputer users needed to know all about their HW *and* their SW, and didn't know either starting out. Nowadays, the HW and SW knowledge is more separated. :-(

author: Robartes_m
author_rank: Contributor
timestamp: March 28, 2016, 07:35:25 am
content: Quote from: nour on March 27, 2016, 10:51:09 amCool. In that case, I second (and third, and fourth) the other posters comments that the datasheet is the next step. If you know C and know how to get code into the micro, the data sheet tells you everything else you need to know about the various peripherals and features of the micro.

author: Mechatrommer
author_rank: Super Contributor
timestamp: March 28, 2016, 08:15:34 am
content: Perharps the level you are looking for is not in the avr domain. Avr per se doesnt deserve an extensive 'the next level' dedicated thick book. Other than for and loop is what? Peripherals? The datasheet, what else? The least op floating division? Data structures? Bitblit bitbang hack? oop? The best practise sw eng. Practise? Not in the avr.. widen your eyes then you'll see wider. Solution started from a problem, And its not very clear what is here.

author: nour
author_rank: Frequent Contributor
timestamp: March 28, 2016, 02:53:54 pm
content: ok, thanks for whoever contributed in the topicmay be I will try going through the datasheetthanks

author: asgard20032
author_rank: Regular Contributor
timestamp: March 28, 2016, 03:17:56 pm
content: I still think book could be valuable, at any level. But not a book on how to program avr, but more a book on programming methodology, paradigm, how to structurate code, state machine, how to use interrupt correctly, way of thinking in embedded system, common embedded system problem and solution (like debouncing, counting RPM with a timer...), design pattern like in microcontroller... other such thing like those. Book for subject already covered by datasheet is pretty pointless.

author: nour
author_rank: Frequent Contributor
timestamp: March 28, 2016, 07:02:46 pm
content: Quote from: asgard20032 on March 28, 2016, 03:17:56 pmWowI think you have said exactly what I was looking for, may be I couldn't explain it as well as you have did, or may be I misused AVR as an example, but you hit the nail directlyhope someone would be able now to recommend something

author: ade
author_rank: Unknown
timestamp: March 28, 2016, 09:31:13 pm
content: Did youreallygo through the "Make: AVR Programming" book? Not just flipping through but actually implement the examples given.Because it covers most of the topics mentioned above. Interrupts, debouncing, timers, counters, motor control, etc. And a lot more.No it's not a book on programming methodology, doesn't discuss state machines, etc., but if you are a software engineer then you should have that part covered.

author: dannyf
author_rank: Super Contributor
timestamp: March 28, 2016, 10:26:47 pm
content: "more a book on programming methodology, paradigm, how to structurate code, state machine, how to use interrupt correctly, way of thinking in embedded system, common embedded system problem and solution (like debouncing, counting RPM with a timer...), design pattern like in microcontroller... other such thing like those"None of that is hardware specific, something the OP has specifically ruled out.

author: eddie0x7c3
author_rank: Newbie
timestamp: March 29, 2016, 01:23:30 am
content: i find my self in the same boat sometimes. I want to learn more about a subject and all i get is Arduino this Arduino that.I am currently trying to get i2c up and running on a samd21 chip and i keep getting references to ASF or the WIRE library where you just call a function and it magically happens. when what i want is register level code.I suggest search for "embedded programming" and not so much AVR specific since there aremore manufactures out there and one day you might not want to know how to use more than one single line of chips.But i agree the datasheet is your friend , specially in AVR since they give you C sample code .

author: retrolefty
author_rank: Super Contributor
timestamp: March 29, 2016, 01:50:33 am
content: Quote from: eddie0x7c3 on March 29, 2016, 01:23:30 amI know it's Arduino but the WIRE library source code is distributed with the IDE download. So you can read how the WIRE library does it's 'magic register stuff' by reviewing the source code.

author: westfw
author_rank: Super Contributor
timestamp: March 29, 2016, 01:54:45 am
content: >QuoteAnd? If you ask something like "How do I connect a Holtek HT1632 LED matrix controller to my Atmega169?" and you get a response like "There's an Arduino library for that, but Arduino doesn't support the m169" then surely it would be afinestrategy to download the Arduino Library andread the source codeto figure out how it works, even if you hate everything about how "Arduino dumbs down embedded programming."It's not like you will EVER find a book that describes exactly how to connect your particular X to your particular Y using your particular level and style of coding in your particular language...

author: ade
author_rank: Unknown
timestamp: March 29, 2016, 02:03:14 am
content: QuoteYup 100% agree!I was looking into an RC radio protocol (DSM) for an STM32 project and turns out someone had already reverse engineered it for the Arduino (of course!) A quick download later I was reading the source code and it was gold.

author: eddie0x7c3
author_rank: Newbie
timestamp: March 29, 2016, 02:07:19 am
content: ive never thought about looking at the arduino libraries , i always assumed it would be full of junk having to do with the IDE and arduino specific abstraction.... i started using the "-arduino" in my google searches to NOT get results with the word arduino. But i shall take heed! I need to go look at their libraries specific the arm samd in that case!!!

author: nowlan
author_rank: Frequent Contributor
timestamp: March 29, 2016, 03:28:14 am
content: https://www.google.com/search?tbm=bks&q=atmel

author: Syntax_Error
author_rank: Regular Contributor
timestamp: March 29, 2016, 04:39:42 pm
content: Wikipedia is often a great introductory source of information regarding a topic or set of related topics. The earlier example of USART was given. This is a good example of when Wikipedia shines. I like to start there when I need a "primer" or "crash course" on something.