Re: 89C51ED2
- From: Rich Grise <rich@xxxxxxxxxxx>
- Date: Fri, 05 Sep 2008 21:25:34 GMT
On Fri, 05 Sep 2008 18:35:53 +0100, Eeyore wrote:
Rich Grise wrote:
Eeyore wrote:
Rich Grise wrote:
If I could get an 8051 equivalent but with Motorola's timer system (see
68HC11, e.g.), I'd be in hog heaven. ;-)
What's so great about Motorola's timers ?
It's way, way, easier to use than the 8051's simple little counter. At
least I found it to be so. I've done 8051 (8035 + eprom, actually) and
68HC11, and the 68HC11 makes the 8051 look like a boat anchor. ;-)
Can you give an example of how it's easier ?
I was kinda hoping you're familiar with the respective architectures.
The 8051 has one counter - set it, let it time out, and there's your
interval. ONE time interval per event; then you have to reset it for
the next one, and so on.
The HC11 (and others by Moto) have a free-running counter (sunc to the
clock, of course) and you set "timer compare" registers, which toggle
the output and trigger an interrupt when the counter reaches that value;
I'm not sure how many of these timer compare register it has, but there
are at least two that I know of, and with a little bit of cleverness, you
can manipulate the registers in the ISR, and have an almost arbitrary
number of events as long as your ISR is quick enough to not block other
interrupts. The "timer capture" input just responds to the timer input
by writing the current value to the timer capture register, which then
your ISR can use at its leisure. ;-)
Hope This Helps!
Rich
.
- Follow-Ups:
- Re: 89C51ED2
- From: Eeyore
- Re: 89C51ED2
- References:
- Re: 89C51ED2
- From: mpm
- Re: 89C51ED2
- From: Rich Grise
- Re: 89C51ED2
- From: Eeyore
- Re: 89C51ED2
- From: Rich Grise
- Re: 89C51ED2
- From: Eeyore
- Re: 89C51ED2
- Prev by Date: Re: PSpice Logic Levels
- Next by Date: Re: 89C51ED2
- Previous by thread: Re: 89C51ED2
- Next by thread: Re: 89C51ED2
- Index(es):
Relevant Pages
|