VidyaSaagar Malawade
Newbie level 1
- Joined
- Sep 10, 2013
- Messages
- 1
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 6
please help
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Code C - [expand] 1 2 3 4 #define _XTAL_FREQ 20000000 // in top for(i = 0; i < 40; i++) __delay_ms(25);
#define _XTAL_FREQ 20000000 // in top
// OR you can use configuration bits also
#pragma config FOSC=HSMP ,PLLCFG=OFF,IESO=OFF
void delay_ms(unsigned int time) // Here TIME is in MILLISECONDS
{
//Delay part
unsigned char pause, i = 0; //DECLARE PAUSE AS UNSIGNED CHAR
short int temp = 0;
temp = time;
for (i = 0; i < 4; i++) {
time = temp;
while (time > 0) //LOOP UNTIL TIME IS GREATER THAN ZERO
{
pause = 112; //INITIALIZE PAUSE TO 255
while (pause--); //DECREMENT PAUSE UNTIL IT BECOMES ZERO
time--; //DECREMENT TIME AND LOOP BACK UNTIL IT BECOMES ZERO
}
}
}