Page 1 of 1

AVR Studio with assembler example?

Posted: Fri Mar 14, 2008 5:14 pm
by mojo
I am looking at doing a USB VFD interface, but for performance reasons I want to use assembly code for the VFD interface.

Basically, I just want to send bytes to the AVR via USB, where an assembler routine will decode them. Data would enter a FIFO as it is transmitted, ready for processing with the assembler routines.

I use AVR Studio for development. I can't see any examples of this sort of thing in the reference implementations. In particular, interfacing C with assembler seems to be a bit tricky - what registers can be used, how to reference data, allocating sections of RAM to use etc.

Are there any suitable examples? I couldn't find any with Google.

Posted: Fri Mar 14, 2008 11:14 pm
by Grendel
Check out 3DProasm.S, 3DPro.c, & 3DPro.h from the 3DP-Vert project (look for the link "Project archive 2008-02-09" near the bottom of the page.)

More details about embedding AVR assembler can be found in the AVR Libc Reference Manual that's installed w/ WinAVR (AVR Studio --> Help --> avr-libc Reference Manual.)

Posted: Sat Mar 15, 2008 2:30 am
by mojo
Thanks, it looks interesting, hopefully it will put me on the right path.