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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/07/09 12:43
Read: times


 
#161358 - Less variations in TL0 but still error
Responding to: ???'s previous message
Hello Sir,
I have tried the way you suggetsed and the variation in the count of TL0 I was getting is much reduced now. But the contents of TL0 are still varying from 21 to 28,whereas the count in TH0 remains constant i.e 03. The frequency of 555 observed on CRO is 781Hz and according to LCD count it is 3*256+21=789Hz. And considering the maximum count 28, the frequency is 3*256+28=796Hz.
Are the variations because of frequency source IC 555 used as astable multivibrator
The new code is as follows. Is it as per your suggestion

       

 ;1 SECOND DELAY GENERATION USING TIMER1

        MOV TMOD,#15H        ;TIMER1- MODE1,TIMER 0-MODE 1, C/T=1,
AA:     SETB TR0             ;START  TIMER 0
        MOV TL0,#00H         ;CLEARING TIMER0 REGISTERS
        MOV TH0,#00H     
        MOV R5,#20
AGAIN:  MOV TL1,#0FDH        ;VALUES LOADED FOR A DELAY OF 0.05ms
        MOV TH1,#4BH
        SETB TR1             ;START TIMER1
  BACK: JNB TF1,BACK
        CLR TR1              ;STOP TIMER1
        CLR TF1              ;CLEAR TIMER1 FLAG 
        DJNZ R5,AGAIN

        CLR TR0              ;STOP TIMER 0
        MOV 60H,TH0
        MOV 61H,TL0    
        ACALL DISPLAY        ;GOES TO DISPLAY ROUTINE TO DISPLAY THE COUNT
        
        


List of 13 messages in thread
TopicAuthorDate
Frequency (Event) Counter Problem            01/01/70 00:00      
   less than 1% error            01/01/70 00:00      
      Error % is incremental.            01/01/70 00:00      
   ;STARTING BOTH THE TIMERS AT THE SAME TIME            01/01/70 00:00      
      Less variations in TL0 but still error            01/01/70 00:00      
         I do not know, but            01/01/70 00:00      
            CRO Frequency Measurement            01/01/70 00:00      
         Better But Still An Issue            01/01/70 00:00      
         How stabile is your signal source?            01/01/70 00:00      
            Very Good Point...            01/01/70 00:00      
               Easier if 89c52 is used            01/01/70 00:00      
            How stabile is your signal source?            01/01/70 00:00      
               NE555 is popular but not a precision device            01/01/70 00:00      

Back to Subject List