Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

Re: [AVR-Chat] Speed of execution

Re: [AVR-Chat] Speed of execution

2009-02-24 by John Samperi

At 07:43 AM 25/02/2009, you wrote:
>GICR  |= (0<<INT0)|(1<<INT1);   // Disable INT0, Enable INT1

Remember that 0<<xx does NOTHING. :-)

You need to disable INT0 with

GICR  &= ~(1<<INT0);

Then enable INT1 or set up a mask in a uint8_t with the
bits you want and then

GICR  = mask;

Oh what a tangled web we weave when we first plan to use C....


Regards

John Samperi

********************************************************
Ampertronics Pty. Ltd.
11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
Tel. (02) 9674-6495       Fax (02) 9674-8745
Website  http://www.ampertronics.com.au
*Electronic Design * Custom Products * Contract Assembly
********************************************************

Re: [AVR-Chat] Speed of execution

2009-02-24 by David VanHorn

> Remember that 0<<xx does NOTHING. :-)


Right, thanks, but that isn't my latency problem.

It may be that GCC is saving "the world" before it enters my code..
@$!@$@#!$@#%$@%$
That would seem to be roughly the right order of magnitude.. 32 pushes..

In ASM, I'd have reserved a couple of registers specifically for the
ISRs, and another one for SREG, so getting in and out would be like
this:

ISR:
     in STEMP,SREG

     (ISR code, rarely needing to push anything at all..)

     out SREG,STEMP
     reti

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.