Author Topic: I want to learn AVR Assembler.  (Read 1995 times)

0 Members and 1 Guest are viewing this topic.

Offline LXETopic starter

  • Jr. Member
  • **
  • Posts: 24
  • Helpful? 0
I want to learn AVR Assembler.
« on: September 08, 2010, 08:15:53 AM »
Hello, I'm new around here because I've been to another website community and got banned for no reason at all.
So I've decided to come here to SOR, Pleased to meet you!  ;D

I'm not going to say which community, because it's a well known one and I highly respect it so therefore it's rude to point the finger.

So I want to learn how to program AVR chips in AVR Assembler, and I would like to know where to find good sources of information.

I know you need a programmer and AVR-ISP, STK600 or something like that and I've got experience with the Arduino as well.
So please help me!
« Last Edit: September 08, 2010, 08:18:24 AM by LXE »

Offline garrettg84

  • Robot Overlord
  • ****
  • Posts: 187
  • Helpful? 8
  • Armchair Roboticist Extraordinaire
Re: I want to learn AVR Assembler.
« Reply #1 on: September 08, 2010, 09:07:22 AM »
So I want to learn how to program AVR chips in AVR Assembler, and I would like to know where to find good sources of information.

Good luck! Here's a link:
http://www.avr-asm-tutorial.net/avr_en/index.html
Any reason you've chosen assembly and not C? I use AVR Studio 4 by the way. It has the ability to compile C and ASM.

I know you need a programmer and AVR-ISP, STK600 or something like that and I've got experience with the Arduino as well.
So please help me!


You said you have experience with Arduino, if you actually HAVE an Arduino, you may not need a programmer.
http://code.google.com/p/mega-isp/wiki/AvrispArduino

I have an AVR-ISP and it works great. I haven't tried the above solution, but it should work fine.
-garrett

Offline LXETopic starter

  • Jr. Member
  • **
  • Posts: 24
  • Helpful? 0
Re: I want to learn AVR Assembler.
« Reply #2 on: September 08, 2010, 06:44:51 PM »
Don't worry, I do have one. It's a NICTA ed1 board which is Arduino Duemilanove compatible and most of the I/O have been taken up leaving the serial connection and two analog I/O. I'm planning on getting a new AVR microcontroller and hence I want to learn AVR assembler.
If I learn AVR assembler, I'll have more options of chips to work with.

And please don't assume that newcomers don't know anything, I've been on my previous Robot community more then long enough to know the difference between an AVR and an Arduino.
« Last Edit: September 08, 2010, 06:48:14 PM by LXE »

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: I want to learn AVR Assembler.
« Reply #3 on: September 09, 2010, 06:32:21 AM »
Hi,

If I learn AVR assembler, I'll have more options of chips to work with.
Au contraire.
Using assembler, you are bound to a certain core, with a high level language, you can recompile code for "any" core (perhaps with small adjustments).


And please don't assume that newcomers don't know anything, I've been on my previous Robot community more then long enough to know the difference between an AVR and an Arduino.
Well, an Arduino is a board driven by an AVR controller, so I don't see the relevance in that comparison (it's like saying "I know the difference between a car and a car engine"). Had you stayed a bit longer on that other board, you would have known the assembler/high level language thing too.

I'd advice a bit of Googling and reading, then you can ask informed questions, showing that you did your own foot work, instead of just expecting others to do it.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline LXETopic starter

  • Jr. Member
  • **
  • Posts: 24
  • Helpful? 0
Re: I want to learn AVR Assembler.
« Reply #4 on: September 09, 2010, 08:11:18 AM »
AVR is the car and Arduino is the engine to make it run faster.

Well, I want to learn it because it does expand my options. Which means, I can also program non- Arduino compatible AVR chips as well.

Attiny, and Xmega aren't Arduino compatible you know.

Offline amando96

  • Robot Overlord
  • ****
  • Posts: 187
  • Helpful? 1
Re: I want to learn AVR Assembler.
« Reply #5 on: September 09, 2010, 08:24:11 AM »
Quote
Arduino is the engine to make it run faster.


Actually no, the arduino really slows down processing speed, the digitalWrite() function takes like 121(?) clock cycles to change the pin state. which I quite a lot.

Quote
don't assume that newcomers don't know anything


Never saw such an assumption, just a user being nice and helpful.

I recommend learning C, I learned ASM for PICs, but it takes a while to get used to, and more complicated code is hell in ASM, in C it's much easier, especially with arduino background.
« Last Edit: September 09, 2010, 03:17:31 PM by amando96 »
Rorcle, 60% complete
AATV, 5% complete

Offline LXETopic starter

  • Jr. Member
  • **
  • Posts: 24
  • Helpful? 0
Re: I want to learn AVR Assembler.
« Reply #6 on: September 09, 2010, 08:41:14 AM »
OMG Is that you amando96 from LMR?

Offline z.s.tar.gz

  • Supreme Robot
  • *****
  • Posts: 540
  • Helpful? 5
  • Linux Guru
Re: I want to learn AVR Assembler.
« Reply #7 on: September 09, 2010, 11:14:55 AM »
OMG is that the stupidest comment ever on SoR? (sadly it's not...)

Seriously though asm is a good thing to learn. Not because it's an easy or efficient to program in language (because it's not) but because you learn how the controller works.

In tune with your car analogies, it's like taking off everything but the driver's seat, frame, and engine and driving around. It isn't exactly fun or practical for the long term but you get to see all the moving parts.
Save yourself the typing. Just call me Zach.

Offline Ro-Bot-X

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
Re: I want to learn AVR Assembler.
« Reply #8 on: September 09, 2010, 03:20:20 PM »
In tune with your car analogies, it's like taking off everything but the driver's seat, frame, and engine and driving around. It isn't exactly fun or practical for the long term but you get to see all the moving parts.

Nicely said!
Check out the uBotino robot controller!

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,132
  • Helpful? 108
Re: I want to learn AVR Assembler.
« Reply #9 on: September 09, 2010, 05:48:00 PM »
Assembler is hard to learn, hard to write, and a pain to debug! Portability of assembler is non-existent and can result in spectacular system crashes!

But having said that: it does run fast if written properly (or slow if written badly!). So can be of use in time critical sections of code.

So its a question of whether you are able to write better assembler than the optimising compiler generates for your C code.

In most conditions then the answer is: just use C.

I've got many decades of assembler experience (over a large selection of cpus) under my belt and when viewing the code from a decent C compiler then its often hard to know how to do it better.


Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline garrettg84

  • Robot Overlord
  • ****
  • Posts: 187
  • Helpful? 8
  • Armchair Roboticist Extraordinaire
Re: I want to learn AVR Assembler.
« Reply #10 on: September 09, 2010, 07:50:50 PM »
Don't worry, I do have one. It's a NICTA ed1 board which is Arduino Duemilanove compatible and most of the I/O have been taken up leaving the serial connection and two analog I/O. I'm planning on getting a new AVR microcontroller and hence I want to learn AVR assembler.
If I learn AVR assembler, I'll have more options of chips to work with.

And please don't assume that newcomers don't know anything, I've been on my previous Robot community more then long enough to know the difference between an AVR and an Arduino.

I wasn't meaning to offend, just pointing you in the best direction I could with your post info. I make no assumptions on anyone's skills. Good luck on your adventure.

There is ZERO difference between AVR and Arduino. Arduino is a simple implementation of an AVR chip with the added benefit of an integrated development environment, a boot loader for USB/Serial ISP, a common library, and a common hardware pin out design. You can program a naked AVR chip from the Arduino IDE, just the same as you can program an Arduino from AVR Studio.
-garrett

 


Get Your Ad Here

data_list