EE 308
Homework #4
Due Feb. 16, 1998
#define DELAY 667 void delay_10ms(void) { int i; i = 0; while (i < DELAY) { i = i + 1; } }
Write a C function called "delay(n)" which will call "delay_10ms()" n times. For example, to create a 1 second delay, do the following:
delay(100);
PC 1 | PC 0 | Port B Function |
---|---|---|
0 | 0 | Up Counter |
0 | 1 | Down Counter |
1 | 0 | Flasher |
1 | 1 | Turn Signal |