delay program

Status
Not open for further replies.

Peter Nabil

New Member
hi every one
i have a 89c51 microcontroller and i need to make a program to make a delay for 1ms would u help me plz
 
Dear Peter

in order to calculate the time delay you have to tell us what is the speed of your crystal oscillator that you use
 
For 8051's you should asume 12 clocks per instruction. So If you have 51 running @ 12Mhz, it gives you 1us per instruction. Just make a program that will have 1000 instructions to make 1ms delay. Use DJNZ and JMP instructions...
 
Hi Josephselim,Jay.slovak( nice photo by the way )and bmcculla

thanks for your support but i managed to do a one second delay using NOP instructions thank u again bye
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…