Re: 89C51ED2



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



.



Relevant Pages

  • Re: device driver for the SGI system clock, mmtimer
    ... Here is the driver with the interrupt support "killed". ... The timer hardware was designed around the multimedia timer specification by ... +static int mmtimer_ioctl; ... * of the page where the registers are mapped) for the counter in question. ...
    (Linux-Kernel)
  • Re: SetTimer not working
    ... I have a welcome dialog which registers my users to a web server just after ... have the message pump stop. ... The problem is the timer isn't working while the lengthy procesing is ... Start a thread or an asynchronous I/O operation and return to the main message pump. ...
    (microsoft.public.vc.mfc)
  • SetTimer not working
    ... I have a welcome dialog which registers my users to a web server just after ... void CWelcomeDlg::OnBnClickedOK ... The problem is the timer isn't working while the lengthy procesing is ...
    (microsoft.public.vc.mfc)
  • Re: 89C51ED2
    ... clock, of course) and you set "timer compare" registers, which toggle ... I'm not sure how many of these timer compare register it has, ... number of events as long as your ISR is quick enough to not block other ...
    (sci.electronics.design)
  • Re: Arm development systems
    ... There are two ways of doing this: one is to spin on a timer ... stuff in a timer ISR and do the housekeeping loop thing in main. ... so it's a live input that can steal resources from you at ANY time. ... you couldn't come up with sophisticated control solutions (IIRC, ...
    (sci.electronics.design)