2
\$\begingroup\$

So I've been learning AVR assembly in my own time, I rather like it and I understand registers/counters and such.

But the problem is...most of the websites I read online/tutorials don't really talk about actually using them with stuff like Servo's/Motors/LEDs/etc

They more talk about just doing I guess math/logic, but I'm actually wanting to control LEDs/MOTORS/Servos (especially servo's/motors...haven't seen an example yet)

Any ideas of where I could find this info?

\$\endgroup\$
2
  • \$\begingroup\$ No one really programs in Assembly anymore because its easier to debug, quicker to develop and porting to different version uControllers like from AVR mega to AVR Tiny, is easier. \$\endgroup\$
    – Dean
    Commented Feb 25, 2011 at 19:10
  • \$\begingroup\$ AVR assembly is a very nice introduction to assembly language! Just because it's not necessary for the ATmega doesn't mean it's a dead art. There's a lot of microcontrollers that must be programmed in assembly. \$\endgroup\$ Commented May 11, 2011 at 0:29

2 Answers 2

2
\$\begingroup\$

Currently, and for good reason, people dont do this in assembly much anymore. Most stuff can easily be done in other programming languages, like C. Maybe you want to look at Arduino (arduino.cc)

To learn more about hardware programming the AVR, you may want to look into any of the excellent books available on the topic, although most literature features C as a language. Most of the C oriented books will give you good hints at the programming. You may then use that in assembler.

Of course, you should also look at the papers at Atmel. They have an extensive library online.

Imho, unless you've proven C is not sufficient for your needs, you sould try that, and see how far you get.

Apart from that, Barrett "Atmel AVR Microcontroller Primer" has a decend description of the registers.

\$\endgroup\$
3
  • \$\begingroup\$ Why? has the general "Robots/Electronics" group kinda moved away from using Assembly and stuck more with "more" reliable C code? \$\endgroup\$
    – user3073
    Commented Feb 25, 2011 at 18:50
  • \$\begingroup\$ reliable != accessible \$\endgroup\$
    – posipiet
    Commented Feb 25, 2011 at 18:54
  • \$\begingroup\$ @Sauron: I think "Robots/Electronics group" has moved away from Assembly for better long time ago. Assembly is not more reliable, unless you can write perfect code. And that's pretty hard task. \$\endgroup\$
    – Olli
    Commented Mar 10, 2011 at 10:26
2
\$\begingroup\$

I wrote quite a lot about AVR assembly with servos here: http://www.lhexapod.com which was my blog for my 'hexapod robot from scratch' project which was doing well before my baby son arrived and borrowed all my spare time ;)

It's fun to program in assembler. The AVR is an easy platform to get started on.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.