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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/17/07 07:09
Read: times


 
#137353 - You are putting the cart before the horse
Responding to: ???'s previous message
Mike Stegmaier said:
So it seems that the equations in the tutorial are garbage to me.

No - you are just mis-applying them!




There is nothing there that attempts to determine the interval between characters in terms of machine cycles.

It seems now that the new equation is:

(Cs * St) / otc

where Cs is the crystal speed, St is the time it takes for a character to be received in seconds and otc is the number of oscillator ticks per cycle. In my 8051, it is 12.

Nothing new there!

Clearly, your serial character processing (including, but not only, the serial ISR) must be able to completely process one character in less time than it takes for the next character to arrive.
This is a Time limitation.
This is the 'St' term in the equation.

Now, you can calculate how many machine cycles you have available in that time - and you can increase the number of cycles by using a faster crystal.
This accounts for the 'Cs' and 'otc' terms in the equation.

Now the UART's baud rate clock is (usually) derived from the same clock as the machine cycles - so you could derive a formula that relates 'St' to 'Cs', and substitute that in your equation...

But it's probably easier to just stick with the time between characters (which is known directly from the baud rate) and work out the equivalent number of machine cycles from there.


List of 27 messages in thread
TopicAuthorDate
11.0592Mhz xtal and 56K - challenging            01/01/70 00:00      
   Character interrupts are not every machine cycle            01/01/70 00:00      
      Well done!            01/01/70 00:00      
   RTFM            01/01/70 00:00      
      I must have RTWFM            01/01/70 00:00      
         for the edification of others            01/01/70 00:00      
            the link            01/01/70 00:00      
               this?            01/01/70 00:00      
   Deja vu?            01/01/70 00:00      
      now you are telling me!            01/01/70 00:00      
         when referring to tomes            01/01/70 00:00      
            my manuals            01/01/70 00:00      
               Confirmation?            01/01/70 00:00      
                  10 or 11 bit times?            01/01/70 00:00      
                     sometimes            01/01/70 00:00      
                     Are you sure,,,            01/01/70 00:00      
                        Me too!            01/01/70 00:00      
                     No It is me            01/01/70 00:00      
         You are putting the cart before the horse            01/01/70 00:00      
            that works, this does too (and, in my opinion) is            01/01/70 00:00      
               less general is always simpler!            01/01/70 00:00      
                  and both were stated            01/01/70 00:00      
                     I dont use T1            01/01/70 00:00      
                        sure but what does that have to do with it?            01/01/70 00:00      
   Every machine cycle...            01/01/70 00:00      
      not quite            01/01/70 00:00      
         I shoul have said "in your case..."            01/01/70 00:00      

Back to Subject List