avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] very strange behaviour...


From: Reza Naima
Subject: [avr-gcc-list] very strange behaviour...
Date: Wed, 27 Jul 2005 15:26:28 -0700
User-agent: Mutt/1.4.1i

I've got a bizzare problem.  I'm trying to send out a fast waveform
which should result in a 4Mhz signal (F_CPU = 16Mhz, 4 single cycle
instruction per waveform, hence 16/4=4Mhz).  However, it's a lot
closer to 1Mhz when I look at it on the scope.  The code looks like this...

        asm volatile("clr r16":::"r16");
  a2:   00 27           eor     r16, r16
        asm volatile("ser r17":::"r17");
  a4:   1f ef           ldi     r17, 0xFF       ; 255
....
                on();
  b6:   12 bb           out     0x12, r17       ; 18
  b8:   00 00           nop
                off();
  ba:   02 bb           out     0x12, r16       ; 18
  bc:   00 00           nop
                on();
  be:   12 bb           out     0x12, r17       ; 18
  c0:   00 00           nop
                off();
  c2:   02 bb           out     0x12, r16       ; 18
  c4:   00 00           nop
                on();
  c6:   12 bb           out     0x12, r17       ; 18
  c8:   00 00           nop

any thoughts?
thxn,
reza




reply via email to

[Prev in Thread] Current Thread [Next in Thread]