Re: 8 bit microcontroller market



Sure. But often we have to make do with the bare bones in CPU resources.
Turn every dime around and around. ...

That would make a real lot of dime turning... to save the few % power
(which you are bound to have anyway in your system if it can do the
task synchronously) it takes to do simple things like separating
buffering, processing and real time actions... Perhaps an
option if you have no real programmer around, I don't know.

Many times we use uCs as state machines and then they have to perform
the same way as if we had done it in logic chips. IOW totally
process-synchronous.

You certainly don't need to do those state machines 100% synchronously,
you just need to make sure the output states change when they have to
and you take the input signals you need. There is such a lot of
mechanisms
to do these things I really have a problem to pick an example, perhaps
a good
one would be the output compare timer mechanism introduced to me
many years ago with the HC11, or FIFO sort of things etc. It takes no
programming genius to do most of these (but it does take some
programming
literacy allright).

Dimiter

------------------------------------------------------
Dimiter Popoff Transgalactic Instruments

http://www.tgi-sci.com
------------------------------------------------------


Joerg wrote:
Hello Ulf,


Necessity to use assembler usually points to the inadequate processor
selection.

For hardcore realtime apps the is no alternative to assembler yet.

What is *you* definition of "hardcore realtime"? I do *hard* realtime all
the time. No need for assembler at all. Just do some thinking *before*
the coding and choose proper processor for the job.

Stopping or starting a process at precisely the same number of clock
cycles after event X, every single time. Reaching sleep mode exactly 225
clock cycles after event Y (not 224 or 226). And so on. When you are
receiving ultrasound signals over the same board you need to keep the
process 100% (not 99.99%) PRF-synchronous at all times or the image will
be noisy. In Doppler applications it's even more critical.

I would be much, much better to have a little extra performance
and a more advanced timer which would idle the CPU until a condition occurs.

#define CYCLE_TIME 0x4711

uint16 TIMER_CNT=0;
uint16 next_top = 0;
sbit(START_TIMER,TIMER_CTRL);

loop
TIMER_TOP_VALUE += CYCLE_TIME;
// do something...
sbit(WAIT_UNTIL_TOP_VALUE,TIMER_CTRL);
__sleep();
end loop;


Sure. But often we have to make do with the bare bones in CPU resources.
Turn every dime around and around. Then there is (usually) only one
timer besides the WDT which, of course, has already been taken. Just
like that big piece of top sirloin from the buffet.

Many times we use uCs as state machines and then they have to perform
the same way as if we had done it in logic chips. IOW totally
process-synchronous.

I have another app coming up that I am trying to do analog/mixed. But if
for some reason that doesn't pan out this would need three dozen uC per
system all doing the same thing but with other input data.

--
Regards, Joerg

http://www.analogconsultants.com

.



Relevant Pages

  • Re: messages in an UML system
    ... state machines combined with an event queue manager is probably the most ... in OOA/D the distinction is quite important. ... The timer triggering may be ... At the OOA/D level a hardware interrupt is a message that conceptually ...
    (comp.object)
  • Re: Separation of concerns
    ... and that has nothing to do with tasks nor procedual programming, ... state machines that carry behaviors related to ... it because NOBODY AGREES ON WHAT OOP REALLY IS. ... response was not a procedural-oriented definition, ...
    (comp.object)
  • Re: Iteration in lisp
    ... style of programming, I have found them to be quite useful ... Essentially a tail call is ... Ah, I thought you were seeking to define state machines as "functional", ... Not by DEFUN, ...
    (comp.lang.lisp)
  • Re: LPT square wave
    ... timer or just plain delays? ... Plain delays (for example 'for' loops) will be depended on the system speed. ... In a Windows program that I've coded for programming AVR ...
    (sci.electronics.design)
  • Re: LPT square wave
    ... timer or just plain delays? ... Plain delays (for example 'for' loops) will be depended on the system speed. ... In a Windows program that I've coded for programming AVR ...
    (sci.electronics.design)