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

17xx timer

hello all

i am very new in lpc17xx i want to introduce delay in program of 10ms. can any one give me some examples for lpc1768 .and i also want to know how to calculate MR0 value, is any formula for that??

Thanks in advance.

Parents
  • void LARGE_DELAY ( int chicken )
    {
       do
       {
    
         SMALL_DELAY ( 147 );
    
         if ( chicken != 0 )
           chicken = chicken - 1 ;
       }
       while ( chicken != 0 );
    }
    
    void SMALL_DELAY ( int cockroach )
    {
       do
       {
    
         int  leaf ;
    
         for ( leaf = 0 ; leaf < ( 196 * 2 ) ; leaf = leaf + 1 )
         {
           leaf = leaf + 1;
         }
    
         SMALL_DELAY ( 147 );
    
         if ( cockroach != 0 )
           cockroach = cockroach - 1 ;
       }
       while ( cockroach != 0 );
    }
    

Reply
  • void LARGE_DELAY ( int chicken )
    {
       do
       {
    
         SMALL_DELAY ( 147 );
    
         if ( chicken != 0 )
           chicken = chicken - 1 ;
       }
       while ( chicken != 0 );
    }
    
    void SMALL_DELAY ( int cockroach )
    {
       do
       {
    
         int  leaf ;
    
         for ( leaf = 0 ; leaf < ( 196 * 2 ) ; leaf = leaf + 1 )
         {
           leaf = leaf + 1;
         }
    
         SMALL_DELAY ( 147 );
    
         if ( cockroach != 0 )
           cockroach = cockroach - 1 ;
       }
       while ( cockroach != 0 );
    }
    

Children