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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/11/03 14:46
Read: times


 
#60437 - RE: how many second ??
Responding to: ???'s previous message
You will have to count the instruction cycles your self to see how many times you can make it around the loop within the period of time allowed via the 0x21 to 0x7F RAM address interval you setup. Alternatively you could run your program in an 8051 simulator that has a built in cycle counting function.

At a higher level I'm not quite sure how this program is meant to function. If you had intended to have it store every sample of P0.0 after the first non-zero byte then I think there is a mistake in the logic. Right now the code will store every non-zero byte and when a value is zero will not write it into the first location. So if you had actualy intended to store every sample after the first non zero one then the code needs to be written a bit different......such as:
    ...
    JNC   CON_IN
    CJNE  R0, #21H, DATA_IN   ;if not @ buff[0] then store all
    CJNE  A, #00H, DATA_IN    ; store first sample if =/= 0
    JMP   CON_IN
    ...


It is also not clear if the aim of this program is anything other than acting as some type of bit sampling logic analyzer for P0.0 inputs. If you were actually intending this to gather some bits that were arriving at P0.0 as a serial steam of bits that represented data of some sort it would seem to me that you need also some other signal on another pin to act as a clock for the incoming data bits. Of course if this were the case you then would need additional logic to poll and synchronize to that signal before sampling P0.0.

Michael Karas


List of 15 messages in thread
TopicAuthorDate
how many second ??            01/01/70 00:00      
   RE: how many second ??            01/01/70 00:00      
      RE: how many second ??            01/01/70 00:00      
         RE: how many second ??            01/01/70 00:00      
         RE: how many second ??            01/01/70 00:00      
            RE: how many second ??            01/01/70 00:00      
               RE: how many second ??            01/01/70 00:00      
                  RE: how many second ??            01/01/70 00:00      
                  RE: how many second ??            01/01/70 00:00      
                     RE: how many second ??            01/01/70 00:00      
                     RE: how many second ??            01/01/70 00:00      
   RE: how many second ??            01/01/70 00:00      
      RE: how many second ??            01/01/70 00:00      
         RE: how many second ??            01/01/70 00:00      
   RE: how many second ??            01/01/70 00:00      

Back to Subject List