working on assembler

Go To Last Post
16 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Folks! I wanted to know who works with XMega parts here in assembler?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Have just started too.

Not a major leap to working on an ATMega/ATTiny/AT90 part in assembler.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have (just one project).

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've written some assembler routines when C can't do a specific function. Usually that's for stack/RETI manipulation and for some init code replacement.

Everything else is in C though. There's no reason to use assembler unless you have to, as the productivity of C is so much higher (that's why it was invented, after all).

Jeff Nichols

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
no reason to use assembler unless you have to
Or love to. :-)

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sometimes it's needed for speed, sometimes just for fun.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For all of my hobby projects!
No other language will give you so much coding freedom, speed and small code size = nice feeling you will get perfect effective code and you can use same cpu for long time and many tasks. Sure, first time much work to write code modules for every peripheral but later you can combine them easy. For more difficult tasks (Internet Access, Memory Card Access, sound generation and so on) you can use special devices using serial usart control.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I use assembler on the triggering functions of the Xprotolab oscilloscope, which need to be very responsive. You can check the source code here.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I used assembly so that I can have cpu cycle specific control meaning I will know exactly when things happen. An example is using the mcu as an audio dac where the sampling frequency is a 10 times slower than the clock frequency. This is not possible when using a timer if the period is very short like my example.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have written some assembler for the XMega. Stuff I wanted to be fast or small(or both). Functions for writing to a GLCD, for example, when I wanted the screen refresh to be as fast as possible.
And a bootloader, modified from my Mega version(which was originally modified from somebody elses).

Four legs good, two legs bad, three legs stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I started coding for the XMEGAs in Assembly Language, mainly because my only C experience was writing text parsers and screen scrapers for an hosted environment a couple of decades ago... After adjusting to C in an embedded environment, I only use Assembly Language when I have to.

Gamu The Killer Narwhal
Portland, OR, US
_________________
Atmel Studio 6.2
Windows 8.1 Pro
Xplained boards mostly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Assembly sucks... but I'm a control freak so I'm stuck with it! LOL.
I'm also adjusting to the Atmel technique of coding in assembly.. the one that will enable you to re-use your code on other AVR parts. well... beautiful agony.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

sydalmighty wrote:
the one that will enable you to re-use your code on other AVR parts

For me thats definitely no problem.
There is no need to change my favourite Xmega128a4u :D

Apart from this Xmegas have many things in common so re-use code will be possible in easy way.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I'm also adjusting to the Atmel technique of coding in assembly
And what is that? Is it any different from any non Atmel controller? :-)

You can reuse well written ASM code within any chip of the same family, in fact at times it is pretty easy to port ASM code from one brand of chip to another..... only the opcodes are different. :wink:

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Xmega performs excellently well with assembly. I am developing a controller for Grid connected Inverter- a very time critical application of XMEGA64A3-AU. The  controller uses 32 MHZ internal clock, scans the AC voltage @ 20KHz, performs no. of operations like Integration, differentiation and so many. The two ADCs (A and B) ,DAC,Timer,Interrupts,DMA and event system make the development easy and time frame can be accurately tracked.

 

 

Last Edited: Wed. Oct 29, 2014 - 03:04 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

pixel2001n wrote:

 There's no reason to use assembler unless you have to.

For me  There's no reason to not use assembler unless i have to :)

I'm more productive in assembly,but i admit that for copy paste code from others or team working,C/C++ is better.  

I'm also programing a xmega in assembler now.