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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/04/12 05:12
Modified:
  01/04/12 05:17

Read: times


 
#185293 - Check some small things
Responding to: ???'s previous message
Anil Kumar said:

sample[0] = f;
{
TL0=0;
TH0=0;
if (TH0 < 10)
{
if (scale > 9)
{
scale--;
}



Look at the code Here you first make TH0 = 0 & then you check the condition for TH0 < 10 which is always satisfied.Check your code for that view point.

I didn't get how you calculate the freq. but one thing I want to point out is TH0 & TL0 will become 0 after crossing 65535 (TH0TL0) count. at that time you should increment another counter to store how much roll over occurs while working with higher frequencies.

edit:
learn also how to post source code from
http://www.8052.com/faqs/120199



List of 7 messages in thread
TopicAuthorDate
frequency counter            01/01/70 00:00      
   Care for details            01/01/70 00:00      
      frequency counter            01/01/70 00:00      
         Still not correctly posted code. Still arbitrary floats...            01/01/70 00:00      
         Check some small things            01/01/70 00:00      
            typical            01/01/70 00:00      
   what a mess            01/01/70 00:00      

Back to Subject List