| ??? 03/22/09 19:09 Read: times |
#163775 - get some hardware soon Responding to: ???'s previous message |
it's much more fun than with a simulator.
#include <8051.h>
#define DELAY_TIME 10000
void Delay(void) {
volatile unsigned short int i;
i = DELAY_TIME;
while (i > 0) {
i--;
}
}
void main(void) {
while(1) {
P3 = 0xAA;
Delay();
P3 = 0x55;
Delay();
}
}
For a reasonable speed when running on a simulator, set DELAY_TIME to some small number, 2-5 or so. Enjoy! Jan Waclawek |
| Topic | Author | Date |
| SDCC help | 01/01/70 00:00 | |
| Hardware? | 01/01/70 00:00 | |
| No harware | 01/01/70 00:00 | |
| get some hardware soon | 01/01/70 00:00 | |
Thanks | 01/01/70 00:00 |



