Mdelay

Mdelay Library

Mdelay library basically useful for microcontrollers delay. In this library has some functions like Mdelay_ms(1) for delay 1 milliseconds and Mdelay_us(1) for 1 microsecond delay. If this library is not calculating equal to 1 Second Mdelay_ms(1000) in defiant prescaler and postscaler (Microcontrollers Clock dividing rules ) then you can adjust it by using Set_delay_MScaler(value) function.

Following functions can be used by this library.
  • Mdelay_mc_us(unsigned long us_count) // for delay machine cycles using unsigned long value
  • Mdelay_us(unsigned long us_count) // for delay Microseconds 
  • Mdelay_ms(unsigned long ms) //for delay microseconds Milliseconds 
  • Mdelay_tck(int us_count) // for delay machine cycles using Int value (for low ram microcontrollers) 
Note:

Mdelay_tck() for low ram microcontroller or unsupported microcontroller. so this library give a error like Mdelay.h does not work with your selected microcontroller. If you want to use it, See the line number 72 in Mdelete.h file. in this case you can define (#define _MDELAY_INT) in your project file and then you can use Mdelay_tck() delay function for unsupported devices

Admin
Author: Admin

Leave a Reply