AVR C examples for atmega328p

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

Hello, i would like to share to you my github project: https://github.com/Basilisvirus/atmel-studio-7-examples-atmega328p-avrc

 

It is about atmega328p, where i made some examples, made a memory map and it is still on-going. But, i need your help. As i have noticed, (or i havent found any yet), there are no similar/or complete memory maps of any atmega (at least openSource and famous). I would like to make the first one, that i will post here and there, which will help newbies learn better. 

It would be really helpful, if someone made sure that the memory map is correct (not in detail of course), and the naming of the RAM space, the EEPROM space etc (shown on the first line of excel). Also, i need help understanding and implementing the complete map on this project, as i cannot understand the way the datasheet presents the memory map. I dont understand why it makes it so confused, or i am just a amateur.

So, check out the project, suggest changes, tell me about similar projects, give me a good complete memory map explanation or a link to it. 

 

Thanks, you are doing a great job in this forum. I hope someone is paying you all people.

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

Greetings and Welcome to AVR Freaks!

 

Other than the very few Microchip folks who occasionally stop by here, nobody is getting paid for any effort relative to the forum. We are all here because we love it or we can't get along without it (kind of like a marriage).

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

Last Edited: Thu. Aug 22, 2019 - 07:20 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I don't get it. The "map" you show is surely just the same as the "register summary" contained in almost every AVR datasheet?

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

 

As he points out he is going to do further work on it, to provide a useful aid.

I sure would like to have a better one than the data sheet, many things about it could be a lot more helpful, as I swap often between micros.

Waiting to see where it goes first before making assumptions.

 

 

Last Edited: Fri. Aug 23, 2019 - 01:47 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@clawson

I wanted to make this repo to help the newbies mainly.

The map is the same, but notice that these details help the newbies:

a)I added same color to similar registers, to help people distinguish them easily.

b) In every register, i have added comments. By doing this, you dont need to look up and down the pages on datasheet, but simply hover your mouse over the register.

c) I put all the registers in one page/screen, so instead of goind up and down the register summary of the datasheet, at one glane, one has all the registers in front of him.

 

Also: notice that i have added corrections to the datasheet. I have found many mistakes on the datasheet, like TCCR2B in datasheet (page 162), doesnt mentions that this register uses Timer/Counter2, but instead it says it uses Timer0. (Note that i havent tested this particular example mistake, its the next thing i want to check, but im pretty sure it wont be Timer0 ).

Also other similar/small mistakes involve mentioning timers without the number of timer, example: "Timer/Counter ", instead of "Timer/CounterX".

 

Then, notice that at the register summary, while it starts from 0x0 (0x20), when it reaches 0x3F (0x5F), instead of continuing normally making a actual map, it tries to show how you can use LD/ST instructions instead of IN/OUT. Im not sure how this helps someone that starts learning AVR-C, but i decided to remove it. This will be usefull when making libraries in avr-c or writing in assembly i guess? i havent made it ther yet.

 

I know that to some experts, this is not much of a help, but for me, and any college student or lower education level, having these is super-helpful.

 

Keep commenting my work tho, i will change the 'readme' a bit, stating that this repo is for newbies.