DPRG
DPRG List  



DPRG: Strategy

Subject: DPRG: Strategy
From: Clay Timmons ctimmons at asic.sc.ti.com
Date: Tue Jul 29 09:45:45 CDT 1997

- ---snip---

> The 8051 has an external pin for one of the counters, which you could
> hook up directly, without a counter chip.  Then it would generate an
> interrupt when the internal 16-bit counter rolls over.  Does the HC11
> have the same? 

Yes the HC11 has a similar pin called the pulse accumulator, see chapter
11 of the reference manual (pink book).  It has two modes of operation
and can generate interrupts.  It is only 8 bit but the book explains
how to extend this to 16 bits.


- ---snip---

> > Another strategy I have imagined is using the RTI to
> > cycle through my subroutines and poll the count on every RTI. This way I
> > wouldn't have to worry about counter overflows, and so I could forego the
> > binary counter scheme. Comments?
> >
> I do not know the HC11 so I am not familiar with the term RTI. So I can
> not comment.


RTI is return from interrrupt. 

Putting all your code in the interrupt handler might work. Generally
you try and keep interrupt handlers as short as possible.  If your
code is lengthy you must make sure that you will not get another
interrupt before your handler has completed.



- -Clay Timmons   ctimmons at asic.sc.ti.com

------------------------------

More information about the DPRG mailing list