This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

configuring timer 2

i wanted to configure timer 2 of at89c51ed2
can any one give code to do so and and tell how to obtain a specific frequency.

Parents
  • i got some more code from ny project for you.

    but plz donut show to everyone.

    int getBAUDSPEED( float SPEED)
    {
      float t, q;                 // variebles
    
      t = 1 / ( CLOCK / SPEED );  // sum it clock divided by speed
    
      t = t * 100 + 27;           // add magic amunt
    
      q = t * SPEED;              // change to variable
    
      return t + q / 113;         // return the asnwer
    }
    
    </pree>
    
    
    

Reply
  • i got some more code from ny project for you.

    but plz donut show to everyone.

    int getBAUDSPEED( float SPEED)
    {
      float t, q;                 // variebles
    
      t = 1 / ( CLOCK / SPEED );  // sum it clock divided by speed
    
      t = t * 100 + 27;           // add magic amunt
    
      q = t * SPEED;              // change to variable
    
      return t + q / 113;         // return the asnwer
    }
    
    </pree>
    
    
    

Children