bmn123
Banned

on delay atmega32
Guys, I am trying to use a delay function in Atmega32. I tried the one given by Bibin John and somehow, AVRstudio doesn't handle it properly. I found this function:-
void del100us(unsigned int n){
//delay n 100us
unsigned int x;
while(n--){
x=?????;
while(x--);
}
}
What value of x should I use for the following frequencies?
1M,4M,8M,16M? The value for 16M is given to be 260
Guys, I am trying to use a delay function in Atmega32. I tried the one given by Bibin John and somehow, AVRstudio doesn't handle it properly. I found this function:-
void del100us(unsigned int n){
//delay n 100us
unsigned int x;
while(n--){
x=?????;
while(x--);
}
}
What value of x should I use for the following frequencies?
1M,4M,8M,16M? The value for 16M is given to be 260