www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2007/11/02/04:12:32

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Recipient: djgpp AT delorie DOT com
From: "JM Rams" <josepmaria AT turomas DOT com>
To: <djgpp AT delorie DOT com>
Subject: RE: PM interrupt handling - how to call old old ISR with slower rate than my new ISR
Date: Fri, 2 Nov 2007 09:42:37 +0100
MIME-Version: 1.0
X-Mailer: Microsoft Office Outlook, Build 11.0.5510
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
Thread-Index: Acgc6IY6durpmQyHRMqDgNEnH7h/AwAQuIow
In-Reply-To: <1193963270.088377.101010@22g2000hsm.googlegroups.com>
Message-Id: <20071102084237.F194B5703AF@panel.abserver.es>
X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on panel.abserver.es
X-Spam-Level:
X-Spam-Status: No, score=-2.8 required=4.0 tests=ALL_TRUSTED autolearn=ham
version=3.0.3
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

I had the same problem as you. I need an interrupt every 1 ms or less. First
I not chain my new interrupt and I called old interrupt when necessary but I
had problems. Now I chain my interrupt and after I gets down timer counter.

Note: "div" is the my new timer divisor (Old is 0).




void executa_timer()
{
ara_toca=ara_toca+div;
if(ara_toca>=0x10000){
  	ara_toca=ara_toca-0x10000;
	}
else{
	fes_int0_2();
    }
}

void fes_int0_2()
{
long int tics;

tics=_farpeekb(_dos_ds, 0x440);
if(tics!=0)tics++;
_farpokeb(_dos_ds, 0x440,tics);

tics=_farpeekl(_dos_ds, 0x46c);
tics--;
_farpokel(_dos_ds, 0x46c,tics);
}


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019