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\$
  • \$\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 Feb 25 '11 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\$ – Kevin Vermeer May 11 '11 at 0:29
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.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Why? has the general "Robots/Electronics" group kinda moved away from using Assembly and stuck more with "more" reliable C code? \$\endgroup\$ – user3073 Feb 25 '11 at 18:50
  • \$\begingroup\$ reliable != accessible \$\endgroup\$ – posipiet Feb 25 '11 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 Mar 10 '11 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.

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy