поискавой системы для электроныых деталей
  Russian  ▼
ALLDATASHEETRU.COM

X  

STC89C53RC датащи(PDF) 155 Page - STCmicro Technology Co,.Ltd

номер детали STC89C53RC
подробное описание детали  Enhanced 80C51 Central Processing Unit ,6T or 12T per machine cycle
PDF  165 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
производитель  STC [STCmicro Technology Co,.Ltd]
домашняя страница  http://www.stcmicro.com/
Logo STC - STCmicro Technology Co,.Ltd

STC89C53RC датащи(HTML) 155 Page - STCmicro Technology Co,.Ltd

Back Button STC89C53RC Datasheet HTML 151Page - STCmicro Technology Co,.Ltd STC89C53RC Datasheet HTML 152Page - STCmicro Technology Co,.Ltd STC89C53RC Datasheet HTML 153Page - STCmicro Technology Co,.Ltd STC89C53RC Datasheet HTML 154Page - STCmicro Technology Co,.Ltd STC89C53RC Datasheet HTML 155Page - STCmicro Technology Co,.Ltd STC89C53RC Datasheet HTML 156Page - STCmicro Technology Co,.Ltd STC89C53RC Datasheet HTML 157Page - STCmicro Technology Co,.Ltd STC89C53RC Datasheet HTML 158Page - STCmicro Technology Co,.Ltd STC89C53RC Datasheet HTML 159Page - STCmicro Technology Co,.Ltd Next Button
Zoom Inzoom in Zoom Outzoom out
 155 / 165 page
background image
Appendix B: 8051 C Programming
ADVANTAGES AND DISADVANTAGES OF 8051 C
The advantages of programming the 8051 in C as compared to assembly are:
Offers all the benefits of high-level, structured programming languages such as C, including the ease of
writing subroutines
Often relieves the programmer of the hardware details that the complier handles on behalf of the
programmer
Easier to write, especially for large and complex programs
Produces more readable program source codes
Nevertheless, 8051 C, being very similar to the conventional C language, also suffers from the following
disadvantages:
Processes the disadvantages of high-level, structured programming languages.
Generally generates larger machine codes
Programmer has less control and less ability to directly interact with hardware
To compare between 8051 C and assembly language, consider the solutions to the Example—Write a program
using Timer 0 to create a 1KHz square wave on P1.0.
A solution written below in 8051 C language:
sbit portbit = P1^0;
/*Use variable portbit to refer to P1.0*/
main ( )
{
TMOD = 1;
while (1)
{
TH0 = 0xFE;
TL0 = 0xC;
TR0 = 1;
while (TF0 !=1);
TR0 = 0;
TF0 = 0;
portbit = !(P1.^0);
}
}
A solution written below in assembly language:
ORG
8100H
MOV
TMOD, #01H
;16-bit timer mode
LOOP:
MOV
TH0, #0FEH
;-500 (high byte)
MOV
TL0, #0CH
;-500 (low byte)
SETB
TR0
;start timer
WAIT:
JNB
TF0, WAIT
;wait for overflow
CLR
TR0
;stop timer
CLR
TF0
;clear timer overflow flag
CPL
P1.0
;toggle port bit
SJMP
LOOP
;repeat
END
•
•
•
•
•
•
•
155



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


датащи скачать

Go To PDF Page


ссылки URL



Вашему бизинису помогли Аллдатащит?  [ DONATE ] 

Что такое Аллдатащит   |   реклама   |   контакт   |   Конфиденциальность   |   Ссылка на техническое описание    |   обмен ссыками   |   поиск по производителю
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com