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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/06/03 08:17
Read: times


 
#38380 - Check my Delay
Responding to: ???'s previous message
Let say i have to make a program for an LED which is connected to P1.0 to blink it continuously..

1) Using 12 Mhz Crystal.

Crystal/ 12 = 1 Mico-Second.

Time of Delay / 1 Micro-second = 1000000

so i need 1000000 instructions to create 1 second delay.

2) It means that 100*100*100 = 1000000

MOV R0,#101
MOV R1,#101
DELAY1, MOV R3,#101

DJNZ R3,$
DJNZ R1,DELAY1
DJNZ R0,DELAY1
CPL P1.0
RET
IS IT OK

List of 19 messages in thread
TopicAuthorDate
1 Minute Delay            01/01/70 00:00      
   RE: 1 Minute Delay            01/01/70 00:00      
   RE: 1 Minute Delay            01/01/70 00:00      
   RE: 1 Minute Delay            01/01/70 00:00      
   Check my Delay            01/01/70 00:00      
      checking on simulator            01/01/70 00:00      
         Now 1 Minute delay program in assembly            01/01/70 00:00      
         RE: delay of x minutes            01/01/70 00:00      
            I really tried hard but no use            01/01/70 00:00      
               RE: I really tried hard but no use            01/01/70 00:00      
   RE: Check my Delay            01/01/70 00:00      
   RE: 1 Minute Delay            01/01/70 00:00      
   RE: I really tried hard but no use            01/01/70 00:00      
      Ijaz is right            01/01/70 00:00      
         RE: Waqar            01/01/70 00:00      
   RE: Software            01/01/70 00:00      
   difference between counter and timer            01/01/70 00:00      
      RE: difference between counter and timer            01/01/70 00:00      
      RE: difference between counter and timer            01/01/70 00:00      

Back to Subject List