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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/01/03 21:34
Read: times


 
#42727 - 400hz square wave upto 20 seconds
Hi all,
Iam looking forward to create a 400Hz square wave at P2.0 for 20 seconds and after that program ends when ever the bit P1.0 is receives a logical high signal.
I have made the following program using Timer 0 producing 1250 micro-second and then complement, I have used timer mode 16 bit and used DPTR so that square wave continue to go on output upto 20 seconds.
But when i checked the program on simulator AVS51 it showed that it only produce 6.83 seconds ...whats wrong with program ?

further is there any window based shareware which can be used for linker, simultor and assemler purpose ?

Also how i can check that 400Hz square wave is generated upto 20 seconds on the simulator as i can only see that how much the time has passed ?


ORG 00H
JMP MAIN

ORG 000BH
CPL P2.0
INC DPTR
RETI

MAIN:
MOV DPH,#0
MOV DPL,#0
JNB P1.0,$
JMP DIAL

DIAL:
MOV TMOD,#01B
CLR TR0
MOV TH0,#FBH
MOV TL0,#1EH
SETB TR0
SETB ET0
SETB EA
MOV A,DPH
CJNE A,#C8H,NOT
MOV A,DPL
CJNE A,#50H,NOT

NOT:
SJMP $
END





List of 12 messages in thread
TopicAuthorDate
400hz square wave upto 20 seconds            01/01/70 00:00      
   RE: 400hz square wave upto 20 seconds            01/01/70 00:00      
   RE: 400hz square wave upto 20 seconds            01/01/70 00:00      
      iam not asking any one to design            01/01/70 00:00      
         RE: iam not asking any one to design            01/01/70 00:00      
   RE: 400hz square wave upto 20 seconds            01/01/70 00:00      
   RE: 400hz square wave upto 20 seconds            01/01/70 00:00      
   RE: 400hz square wave upto 20 seconds            01/01/70 00:00      
   RE: 400hz square wave upto 20 seconds            01/01/70 00:00      
      RE: 400hz square wave upto 20 seconds            01/01/70 00:00      
         using only one timer for 400Hz & 20sec            01/01/70 00:00      
            RE: using only one timer for 400Hz & 20sec            01/01/70 00:00      

Back to Subject List