| ??? 02/18/03 21:18 Read: times |
#39388 - RE: calculating a delay ms and us Responding to: ???'s previous message |
you should try byte var instead of int like:
void 2usdelay(unsigned char d) { unsigned char i; for(i=0;i<d;d++) } this will probably compiled into djnz command in assembly. but if you use int var it will involve some multibyte addition and will consume 6 times more time as Erik Malund has said. |
| Topic | Author | Date |
| calculating a delay ms and us | 01/01/70 00:00 | |
| RE: calculating a delay ms and us | 01/01/70 00:00 | |
| RE: calculating a delay ms and us | 01/01/70 00:00 | |
| RE: calculating a delay ms and us | 01/01/70 00:00 | |
| RE: calculating a delay ms and us | 01/01/70 00:00 | |
| RE: calculating a delay ms and us | 01/01/70 00:00 | |
| RE: calculating a delay ms and us | 01/01/70 00:00 | |
| RE: calculating a delay ms and us | 01/01/70 00:00 | |
| RE: calculating a delay ... addendum | 01/01/70 00:00 | |
RE: calculating a delay ... addendum | 01/01/70 00:00 |



