06.11.2014 Views

Keil C51 Cross Compiler - gmitWEB

Keil C51 Cross Compiler - gmitWEB

Keil C51 Cross Compiler - gmitWEB

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Software Delay<br />

Using a decrementing for loop<br />

will generate a DJNZ loop.<br />

Loop execution time =<br />

204 machine cycles<br />

[1 + 1 + (100 *2) + 2]<br />

= 204usec for a 12MHz crystal.<br />

Change starting value to 98 to<br />

get a 200usec delay<br />

Embedded Systems 2 2 - 26 C Programming

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!