The architecture of the microcontroller AT89S51 can be seen as follows:<\/span><\/p>\n Block diagram Figure 15 microcontroller 89S51<\/span><\/p>\n 8051 microcontroller and memory architecture can be seen in the picture<\/span><\/p>\n Figure 16 Memory Microcontroller Architecture 8051<\/span><\/p>\n Facility Timer and Counter<\/strong><\/span> Interruption Timer Counter<\/strong><\/span>
<\/a><\/p>\n
<\/a><\/p>\n
\n Many microcontroller applications require the counting of external events, such as the frequency of the pulse or the generation of internal time delay between computers.<\/span> Both of these examples can be performed using software techniques, but the loop software for counting or timing mejadikan overburdened processors.<\/span> Therefore, to avoid this we can use the facilities available in the microcontroller in the form of 16-bit up counter named T0 and T1.<\/span> Each counter may be programmed to count internal clock pulses, to act as a timer or be programmed as a counter to count external pulses.<\/span><\/p>\n
\n Counter has been incorporated into the chip, the processor can do the job sehigga counting and timing.<\/span> When a program wants to count a certain number of pulses internal or external events, a figure placed on the counter.<\/span> Counter is incremented from the initial figure to the maximum and then back to zero at the end of the pulse, and also set the timer flag.<\/span> Flag condition tested by a nstruksi to tell the program that the matter has been done or flags are used to meninterupsi program.<\/span><\/p>\n