| ??? 03/02/12 13:02 Read: times |
#186356 - Delay Responding to: ???'s previous message |
By the way - spend some time picking up the wibes on using a busy-loop as delay:
void delay(unsigned int ms) {
unsigned char n;
unsigned int i;
for(n=0;n<ms;n++) {
for(i=0;i<count;i++) ;
}
}
Exactly how do you know this function really gives a delay of "ms" milliseconds? Why not use a delay that base the delay time on real, clocked hardware - like for example a hw timer? Wouldn't it be a huge advantage if the delay isn't greatly changed by compiler version or compiler options? |
| Topic | Author | Date |
| Help me | 01/01/70 00:00 | |
| Descriptive? | 01/01/70 00:00 | |
| Delay | 01/01/70 00:00 | |
| Why loop with char for int parameter? | 01/01/70 00:00 | |
| Tips | 01/01/70 00:00 | |
| Satish, you're not helping yourself here ... | 01/01/70 00:00 | |
is this the "helping yourself" you refer to? | 01/01/70 00:00 |



