Re: 89C51ED2
- From: Eeyore <rabbitsfriendsandrelations@xxxxxxxxxxx>
- Date: Sat, 06 Sep 2008 05:36:48 +0100
Rich Grise wrote:
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.
Never used Motorola I'm afraid. I'm an Intel ( actually Atmel and NXP man). I did
do one job on a Z80 though.
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.
Ummm, there's 2 counter timers even in the basic 8051 IIRC.
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. ;-)
I can see having multiple compares would be nice. There's something similar IIRC
in the enhanced 8051 family. But maybe only one of them.
Graham
.
- 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
- From: Rich Grise
- Re: 89C51ED2
- Prev by Date: Re: OT: Global cooling gains momentum among scientists
- Next by Date: Re: OT: Did they take the backup feature out of MS-Works?
- Previous by thread: Re: 89C51ED2
- Next by thread: Re: 89C51ED2
- Index(es):
Relevant Pages
|