Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/13/05 20:13
Read: times


 
#94821 - Synchronization
Responding to: ???'s previous message
When you have a microcontroller operating at, say, 25 MIPS, and a mechanical process operating a, say 1 KHz, the latter operates pretty accurately due to flywheeling, etc, but still has speed variations due to mechanical effects, eccentricity, termperature and load variations, supply variations, differences in material, etc, that amount to a very small percentage of that 1 KHz, but vary over a very large number of instruction cycles.

Now, you can find a closed-loop process by means of which to manage the mechanical process, or you can control it by making some modest assumptions, verified by measurement, of how those processes work. Once in a while, you'll be wrong about the range over which those mechanical effects vary, and that's where your synchronization breaks down. If, in addition, there's a communication task or two involved, e.g. one MCU has to tell another that a given event has occurred, things can get messy. Closed-loop methods are really the best, but ... they cost a bit more ... often quite a bit more ... than open loop controls. If you have to build a sensor that verifies via a closed loop that your stepping motor has finished making its step, then you're going to spend a bit of money verifying that, particularly if each step in the acceleration and deceleration curve is of different duration. As a result, you build a table of periods for a sequence of steps which gets you from velocity A to velocity B. If one or another of those is "off", you may, once in a while, miss a step, perhaps because of load variation or because of system resonances, or any of a number of other causes. Normally, a slight tweak of the period of THAT step will make the overall problem go away. Of course it could make it worse, but you normally know, after a while, which way to go.

Another sort of sync problem occurs when you have a fixed window within which you have to respond to an input, but you have no local control over the time at which the input occurs. If you go about your normal business in the "usual" sequence, you may, on rare occasion, miss a, input during one cycle in your default process, causing you to miss the earliest occurrence of your input. Now, monitoring more frequently might not help, since it lengthens your loop. Sometimes simply changing the point in the loop when the event is monitored can help, or, as I've seen frequently, reducing the rate at which it's monitored might help as well. This sort of thing involves simple and small changes, removing a call, or adding a delay, increasing/reducing a baud rate, simulation of none of which is easily applied. You sometimes just have to go in and tweak a few things.

That's very easy and straightforward with a debug monitor, and produces readily observable results.

RE

List of 115 messages in thread
TopicAuthorDate
Full-function debugger?            01/01/70 00:00      
   Keil uVision?            01/01/70 00:00      
      Full-function resident debuger            01/01/70 00:00      
         Oh...            01/01/70 00:00      
   Proteus6 or ISIS 5.2 Professional            01/01/70 00:00      
      full-function resident debugger            01/01/70 00:00      
         Like a Dream!            01/01/70 00:00      
   paulmon?            01/01/70 00:00      
   many possibilities            01/01/70 00:00      
      resident monitor vs. simulator/ICE            01/01/70 00:00      
         pray tell which            01/01/70 00:00      
         Nonsense!            01/01/70 00:00      
   best rethink this ...            01/01/70 00:00      
      comments            01/01/70 00:00      
      Nonsense!            01/01/70 00:00      
      Slow?            01/01/70 00:00      
         there's the rub...            01/01/70 00:00      
            I think I know what you're asking for            01/01/70 00:00      
               so what if JTAG is dead slow            01/01/70 00:00      
                  exactly            01/01/70 00:00      
                  full function debugger            01/01/70 00:00      
               Full-Function debug monitor            01/01/70 00:00      
                  answers and questions            01/01/70 00:00      
                     Full-Function debugger            01/01/70 00:00      
                  Does size matter??            01/01/70 00:00      
                     Full-Function resident debug monitor            01/01/70 00:00      
                  JTAG is the INTERFACE ..            01/01/70 00:00      
                     Full-Function resident debug monitor            01/01/70 00:00      
            You Call That Convenient???            01/01/70 00:00      
               A Men !!!            01/01/70 00:00      
                  sadly not            01/01/70 00:00      
                     be specific            01/01/70 00:00      
                        specifics            01/01/70 00:00      
                        Specifics....            01/01/70 00:00      
               Full Function Resident Debugger            01/01/70 00:00      
   JTAG vs On-Chip Debug            01/01/70 00:00      
   Full-Function Resident Debug Monitor            01/01/70 00:00      
      fried baloney            01/01/70 00:00      
         full-function debugger            01/01/70 00:00      
            a few questions            01/01/70 00:00      
               Full-Function resident debug monitor            01/01/70 00:00      
                  Still don't see why it needs to be...            01/01/70 00:00      
                     Full-Function resident debug monitor            01/01/70 00:00      
                        nope.            01/01/70 00:00      
                           Full-function resident debug monitor            01/01/70 00:00      
                              NASA            01/01/70 00:00      
                                 Full-function resident debug monitor            01/01/70 00:00      
                                    JTAG ?            01/01/70 00:00      
                                       Sometimes not            01/01/70 00:00      
                                       JTAG            01/01/70 00:00      
                                    OH!            01/01/70 00:00      
                                       Synchronization            01/01/70 00:00      
                                          what does that have to do with            01/01/70 00:00      
                                             synchronization            01/01/70 00:00      
                                                that is not "synchronization"            01/01/70 00:00      
                                                   synchronization            01/01/70 00:00      
                                                      more            01/01/70 00:00      
                                                         and more            01/01/70 00:00      
                                                            re: and more (was "Synchronization:)            01/01/70 00:00      
                                                         re: more (was Synchronization)            01/01/70 00:00      
                                                            ask about sim, get answer about mon            01/01/70 00:00      
                                                               simulator vs. debugger            01/01/70 00:00      
                                                                  The end            01/01/70 00:00      
                                                                     thank goodness!            01/01/70 00:00      
                        ancient?            01/01/70 00:00      
                  different targets            01/01/70 00:00      
                     Full-function resident debug monitor            01/01/70 00:00      
                        I know what that is            01/01/70 00:00      
      But Why?            01/01/70 00:00      
         Full-function debugger            01/01/70 00:00      
            limitatitions?            01/01/70 00:00      
   to Richard            01/01/70 00:00      
      full-function resident debug monitor            01/01/70 00:00      
         Time Warp            01/01/70 00:00      
            Multiple target            01/01/70 00:00      
               Full-function resident debug monitor            01/01/70 00:00      
            Full Function resident debug monitor            01/01/70 00:00      
               This is a discussion forum            01/01/70 00:00      
                  Problem in resolution            01/01/70 00:00      
                     Off-Topic!            01/01/70 00:00      
               So you got a free bonus!            01/01/70 00:00      
                  beating a dead horse            01/01/70 00:00      
         seek and ye shall find            01/01/70 00:00      
   Dunfield Development Systems ??            01/01/70 00:00      
      Full-Function Debug Monitor            01/01/70 00:00      
   Some barebone monitors            01/01/70 00:00      
      BASIC            01/01/70 00:00      
         BASIC ???            01/01/70 00:00      
            Not pretending it is            01/01/70 00:00      
            on BASIC            01/01/70 00:00      
               Acorn ?            01/01/70 00:00      
                  asm in basic            01/01/70 00:00      
      Full function resident debug monitor            01/01/70 00:00      
         source            01/01/70 00:00      
            Full function resident debugger C-source            01/01/70 00:00      
            Giving away source            01/01/70 00:00      
               of course you would            01/01/70 00:00      
                  Ha            01/01/70 00:00      
                     Poor DA A            01/01/70 00:00      
                        Here is my stock            01/01/70 00:00      
                           DA A            01/01/70 00:00      
      seasoned hands??            01/01/70 00:00      
         ROM-emulator + debug monitor            01/01/70 00:00      
         In ROM monitor.            01/01/70 00:00      
            emulators            01/01/70 00:00      
         Seasoned hands            01/01/70 00:00      
      BASIC - and - MONITOR-51            01/01/70 00:00      
   Timer 0 isr howto            01/01/70 00:00      
      to Jonzon Yeow            01/01/70 00:00      
   back to the original question            01/01/70 00:00      
      There's an echo in here...            01/01/70 00:00      
         sorry for not crediting you            01/01/70 00:00      
      XCHD instructions.            01/01/70 00:00      
      Original question            01/01/70 00:00      
   re;synchronization            01/01/70 00:00      

Back to Subject List