0
11kviews
If the crystal frequency of 8051 is 12 MHz, while its assembly language program to do the following: Generate a delay of 2 ms.

Subject : Microcontroller and Embedded Programming

Topic : Asynchronous Serial Data Connection

Difficulty : Medium

1 Answer
1
550views

Generate a delay of 2 ms.

Crystal frequency - 12 MHz

T = 12/ 12 X 106 = 1 μs

Let us determine the count to get a delay of 1ms

1ms/1us = 1000 clocks

Count = 65536 -1000

Count = 64536

Count = FC18H

To get a delay of 2 msec we have to represent the delay of timer 0 , 2 times

PROGRAM

enter image description here

Please log in to add an answer.