Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > sci.electronics.design > #503376

Re: Atmel 328 ext. interupts

From Hul Tytus <ht@panix.com>
Newsgroups sci.electronics.design
Subject Re: Atmel 328 ext. interupts
Date 2018-04-24 15:58 +0000
Organization PANIX Public Access Internet and UNIX, NYC
Message-ID <pbnk6a$6l9$1@reader1.panix.com> (permalink)
References <pblfrk$pse$1@reader1.panix.com> <pbmtp7$73a$1@gioia.aioe.org>

Show all headers | View raw


Bingo. The EICRA address was correct but the EIMSK didn't have the 0x20 
adder. Thanks again.

Hul

Johann Klammer <klammerj@nospam.a1.net> wrote:
> On 04/23/2018 10:31 PM, Hul Tytus wrote:
> > sci.electronics.design
> > Atmel 328 external interupts
> > 
> >       I'm debugging an Atmel AVR 328 that won't generate an external #0 
> > interupt. At present, the timer1 is generating an overflow interupt as would 
> > be expected. The input for the #0 ext. interupt (pin 4, d port #2) has been 
> > set to generate a mimic signal on another pin, which worked well.
> >       The setup for interupt 0 is:
> >   ldi areg, 2                 ; external interupt #0 occurrs on fallling edge
> >   sts EICRA, areg
> >   ldi areg, 1                 ; enable interupt #0
> >   sts EIMSK, areg
> >       The possibly of a "power management" bit needing attention exists or maybe 
> > a variation between the 328 and the 168 device that I've missed. 
> > 
> > Anyone have a suggestion?
> > 
> > Hul
> > 
> Check the addresses. the io regs are mapped into the ram with an offset of 0x20.
> The defines might be wrong.. I believe there's a -D flag to turn the offset on/off.
> and maybe some macro to convert aswell..

> for sts they should be:
> 0x69 EICRA
> 0x3D EIMSK

> And try not to use traditional assembler macros with gas. the local labels don't 
> quite work. 

> There's other assemblers that are supposedly better (avra?)

Back to sci.electronics.design | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Atmel 328 ext. interupts Hul Tytus <ht@panix.com> - 2018-04-23 20:31 +0000
  Re: Atmel 328 ext. interupts DemonicTubes <tlackie@gmail.com> - 2018-04-23 13:51 -0700
    Re: Atmel 328 ext. interupts Hul Tytus <ht@panix.com> - 2018-04-23 21:08 +0000
      Re: Atmel 328 ext. interupts DemonicTubes <tlackie@gmail.com> - 2018-04-23 14:18 -0700
  Re: Atmel 328 ext. interupts bitrex <user@example.net> - 2018-04-23 17:30 -0400
  Re: Atmel 328 ext. interupts bitrex <user@example.net> - 2018-04-23 17:59 -0400
  Re: Atmel 328 ext. interupts mpm <mpmillard@aol.com> - 2018-04-23 20:00 -0700
  Re: Atmel 328 ext. interupts Johann Klammer <klammerj@NOSPAM.a1.net> - 2018-04-24 11:35 +0200
    Re: Atmel 328 ext. interupts Hul Tytus <ht@panix.com> - 2018-04-24 15:29 +0000
    Re: Atmel 328 ext. interupts Hul Tytus <ht@panix.com> - 2018-04-24 15:58 +0000
      Re: Atmel 328 ext. interupts Johann Klammer <klammerj@NOSPAM.a1.net> - 2018-04-25 11:45 +0200
        Re: Atmel 328 ext. interupts Hul Tytus <ht@panix.com> - 2018-04-25 12:30 +0000

csiph-web