AVR Embedded programming

Go To Last Post
8 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

Does someone have a link (books or videos, videos is preferable) for Embedded programming for AVR (Including C language itself for Embedded)? 

I am looking for something comprehensive from the beginning to advanced level.  

 

Thanks in advanced

Last Edited: Sun. Nov 24, 2019 - 01:39 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

there are a lot of video tutorials on YouTube for AVR programming and also for the C language.

For example

https://www.youtube.com/watch?v=... (Atmel Programming Tutorial 1 - 1st Programming and Blink a LED)

Tutorial 2 and 3 are also available...

Cheers,

michaeL

In the beginning was the Word, and the Word was with God, and the Word was God.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

I know that there are a lot of video tutorials on Youtube, the problem with them that they are very basic and most of the time repeat themselves by different users.

I am looking for something more serious, one course that covers Embedded C with a point of view of AVR microcontrollers.

 

For example I did not find in Youtube something that talking about size of datatypes, pointers, etc.

I am looking for one comprehensive tutorial.

 

 Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As for all embedded projects there are some variations which depend on the exact device and toolchain.

For example, the size of a pointer will be 16bits for an all(?) AVR devices, but may be 32bit on an ARM architecure.

The size of a self-defined struct may vary with the compiler (if is not specified as 'packed'). So, I think it is better to get aware of issues which you have consider.

Coming back to the previous example: insert code which checks your assumed sizes of certain datatypes if your program depends on it.

Maybe you are looking for something like this:

https://www.elektor.de/avr-buch-pdf (in German)

 

In the beginning was the Word, and the Word was with God, and the Word was God.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For a bare-bones start, at least take a look at:

C Programming for Microcontrollers Featuring ATMEL's AVR Butterfly 

You can just peruse & capture some useful info...you don't absolutely need to use the butterfly or the old studio.

 

The Xmega book by Huang was pretty decent

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Tue. Nov 26, 2019 - 12:16 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

skotti wrote:
For example, the size of a pointer will be 16bits for an all(?) AVR devices, ...
FSF AVR GCC - 16b for data space, 24b for program space

IAR EWAVR - dependent on memory model

XMEGA DMAC has 24-bits for data space.

 

https://gcc.gnu.org/wiki/avr-gcc#Address_Spaces (__memx)

http://ftp.iar.se/WWWfiles/AVR/webic/doc/EWAVR_CompilerGuide.pdf

[middle of page 287]

Pointer types

via https://www.iar.com/support/user-guides/#!?tab=userGuides via https://www.iar.com/iar-embedded-workbench/#!?architecture=AVR

https://gcc.gnu.org/wiki/avr-gcc#Types

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There used to be a number of books by guys like Joe Pardue and Chuck Baird (RIP) but the internet age with videos and online wikis and blogs and so on have rather put good old fashioned books out of fashion for learning :-(

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I learnt quite a lot about the basics from this:

AVR in Assembly and C