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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/23/06 07:12
Read: times


 
#118924 - details
Responding to: ???'s previous message
Erik Malund said:
"why it not block further burst of "LLLL...." " http://www.8052.com/forum/read.phtml?id=118878


The devil is in the details.

jnb is a 2-cycle instruction. In jnb ti,$, ti is sampled only once per the 2 cycles, and the whole instruction is, of course, uninterruptible. If you are "lucky", ti gets set so that jnb succeeds to sample it before the interrupt occurs. If you are not, the interrupt occurs first, clears ti, and jnb ti,$ ends up looping infinitely.

"Luck" here means the timing relationship between the state of timer (which is the source of baudrate) at the moment when mov sbuf,a occurs and jnb ti,$. You can even try it: insert an odd number of nop-s between mov sbuf,a and jnb ti,$, and there will be no more continouos train of L-s, only a single L after reset.

This behaviour can be simulated only on simulators which exactly simulate the internal timing of '51 down to the individual states within the 12-clock cycle.

Jan Waclawek


List of 29 messages in thread
TopicAuthorDate
PC sending Not Received at MCU            01/01/70 00:00      
   pin numbers are meaningless ...            01/01/70 00:00      
   back to the roots            01/01/70 00:00      
      Sorry, All helper            01/01/70 00:00      
         as usual            01/01/70 00:00      
            PACKAGES            01/01/70 00:00      
               Oscillator Speed            01/01/70 00:00      
                  Oscillator is 11.0592MHZ            01/01/70 00:00      
               PACKAGES            01/01/70 00:00      
               DB9 is probably not what you use!            01/01/70 00:00      
   Use terminal program            01/01/70 00:00      
   if PC send nothing you should get 'LLLLL            01/01/70 00:00      
      'LLLL' untill PC send something            01/01/70 00:00      
   Pinnacle 52            01/01/70 00:00      
      Yes, Its working in Pinnacle52            01/01/70 00:00      
         Did you try with a terminal program?            01/01/70 00:00      
            Terminal program......            01/01/70 00:00      
               No need ... now.            01/01/70 00:00      
   Try this            01/01/70 00:00      
   the solution            01/01/70 00:00      
      which I'm sure you would if it had been            01/01/70 00:00      
      But why it still bursting 'LLLLLLLLLL.."            01/01/70 00:00      
         problem solved...Question is still there            01/01/70 00:00      
            Question is still there and comments are            01/01/70 00:00      
               which question?            01/01/70 00:00      
                  posted by Ali jus above - no comments            01/01/70 00:00      
                     details            01/01/70 00:00      
            Problem solved. Really?            01/01/70 00:00      
               Oh yes,Delay is just for testing            01/01/70 00:00      

Back to Subject List