AVR Studio with assembler example?

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
mojo
Rank 1
Rank 1
Posts: 39
Joined: Tue Mar 04, 2008 3:57 pm

AVR Studio with assembler example?

Post by mojo » Fri Mar 14, 2008 5:14 pm

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.

Grendel
Rank 4
Rank 4
Posts: 167
Joined: Sat Dec 16, 2006 9:53 pm
Location: Oregon, USA
Contact:

Post by Grendel » Fri Mar 14, 2008 11:14 pm

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.)

mojo
Rank 1
Rank 1
Posts: 39
Joined: Tue Mar 04, 2008 3:57 pm

Post by mojo » Sat Mar 15, 2008 2:30 am

Thanks, it looks interesting, hopefully it will put me on the right path.

Post Reply