Let's Make Robots!

Assembler question out of curiosity

I'm just curious if anybody of you uses assembler to program the µC on his robot.

I have had a look at AVR assembler and I know you can create super efficient programs (regarding code size and execution time) but I find it somewhat cumbersome to set a whole bunch of labels and comparisons up just for a simple for loop + delay.

Ok in the end everything ends up being an assembler listing and then a hex-file but I find it much easier to work with higher level languages like C because of ease of debugging (where ease is relative :P) and because it's simpler to read. 

I'm asking because on a german forum I have seen a guy programming a hexapod (and you know these guys ain't that easy to program) completely in assembler (couple of thousand lines of code). Anyone else doing this?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I use assembler for all my smaller micro projects. I learnt assembler so I'd have a better understanding of low-level coding and microcontroller architecture, but now that I'm familiar with it I find it quite easy to use for simple projects. No need to worry about library compatibility or running out of program memory etc.

At work I use several C/C++ style programming IDEs, as well as ladder logic, flowcharting/SFC, function block diagrams...
So it's nice to use something different for my personal projects.

I still use C for bigger personal projects, but because I know assembler I can always go back and optimise the compiler output afterwards. Using a mid/high-level language and then optimising the output gives you the best of both worlds =)